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

Title#

Add integration test: BLOCKED:PERSISTENT → gated → refine eligibility

Problem#

No end-to-end test validated the handoff between #243 (BLOCKED:PERSISTENT sets status=gated) and #237 (refine directive rejects non-gated tasks). The two behaviours were tested in isolation but not as a combined state-machine path.

Task / Link#

Closes #245

Changes#

  • Add test/integration/blocked-persistent-to-refine.integration.spec.ts
  • Wires InternalAdapterService, DirectiveService, and TaskStateService against in-memory SQLite
  • Test 1: BLOCKED:PERSISTENT signal transitions task to status=gated with gatePhase and gateReason set (#243)
  • Test 2: gated task accepts /agent refine, clears gate, enqueues phase_refine (#237)
  • Test 3: non-gated (active) task rejects /agent refine and does not enqueue

Notes#

  • Lint errors in src/main.ts and src/ws-gateway/ws-gateway.gateway.ts are pre-existing on master and not introduced by this PR

Testing#

  • All 3 integration test cases pass: npx jest blocked-persistent-to-refine
  • Mocked only external I/O (GitHub API, job queue, hooks); DB and TaskStateService are real
PrdAgent-runner