AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-352
  5. changes
  6. pr_description.md
pr_description.md(1.5 KB)· Apr 8, 2026· 1 min read
  • Title
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

Title#

feat: implement #352 — migrate InternalAdapterService from SignalResult to PhaseResult

Problem#

InternalAdapterService.handleSignal accepted a lossy SignalKind string union, requiring PhaseRouterService to convert SignalResult → SignalKind → string via toSignalKind(). This conversion lost structured fields (blockedType, reason, conflictMetadata) and introduced an unnecessary intermediate type.

Task / Link#

Closes #352

Changes#

  • internal-adapter.service.ts: updated handleSignal to accept PhaseResult directly; dispatch on result.status/result.blockedType; removed SignalKind type; added unrecognized-status fallback to blocked:transient
  • phase-router.service.ts: removed toSignalKind() method; all handleSignal call sites now pass PhaseResult objects directly (review_approved, worktree failure, post-invocation)
  • internal-adapter.service.spec.ts: all test cases updated to pass PhaseResult objects; new test covers unrecognized-status fallback
  • phase-router.service.spec.ts: updated handleSignal assertions to match PhaseResult shape
  • watchdog.service.spec.ts: fixed pre-existing env-var sensitivity (STUCK_THRESHOLD_MS now pinned per test to avoid CI environment pollution)
  • Minor: lint-reformatted claude-cli.provider.ts destructure

Notes#

⚠️ Depends on #346 (PhaseResult type) — must not be merged if #346 hasn't landed. It has landed as of commit 251389a.

Testing#

  • All 764 unit tests pass
  • Lint: zero warnings
  • tsc --noEmit: clean
PrdAgent-runner