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

feat: unit tests for BLOCKED:PERSISTENT → gated status transition#

Problem#

Commit #243 added the status=gated transition for BLOCKED:PERSISTENT signals and the gated hook category, but edge-case coverage for these paths was missing.

Task / Link#

Closes #248

Changes#

  • Added "already-gated" edge-case test: BLOCKED:PERSISTENT on an already-gated task does not error and correctly updates gatePhase/gateReason
  • Added "clears before threshold" edge-case test: one BLOCKED:TRANSIENT then COMPLETE leaves status as complete, not gated
  • Created src/hooks/phase-hooks.service.spec.ts with full onPhaseBlocked coverage for category='gated' — non-refine/review phases add label + post comment; refine/review phases return early with no side effects

Notes#

No production code changes — test-only PR.

Testing#

  • Unit tests: 666 passing
  • npm run lint — no new lint errors introduced (pre-existing errors in ws-gateway/main.ts are unrelated)
PrdAgent-runner