{
"meta": {
"agent": "planner",
"task_id": "245",
"title": "Integration test: BLOCKED:PERSISTENT → gated → refine eligibility",
"created_at": "2026-04-02T06:30:00Z"
},
"inputs": [
{
"name": "issue-245",
"type": "context",
"ref": "https://github.com/AgentSDE/agent-core/issues/245",
"notes": "Integration test for combined #243 + #237 flow"
},
{
"name": "internal-adapter.service.ts",
"type": "file",
"ref": "src/internal-adapter/internal-adapter.service.ts",
"notes": "handleSignal() + handlePersistentBlock() — sets status=gated"
},
{
"name": "directive.service.ts",
"type": "file",
"ref": "src/directive/directive.service.ts",
"notes": "applyDirective() refine pre-validation — rejects non-gated"
},
{
"name": "task-state.service.ts",
"type": "file",
"ref": "src/task-state/task-state.service.ts",
"notes": "createTask(), setGate(), clearGate()"
},
{
"name": "existing-integration-tests",
"type": "file",
"ref": "test/integration/",
"notes": "Pattern reference for test module setup"
}
],
"outputs": [
{
"name": "plan.md",
"type": "plan",
"format": "md",
"content": "Implementation plan for integration test"
}
],
"files": [
{
"path": "test/integration/blocked-persistent-to-refine.integration.spec.ts",
"action": "create",
"reason": "New integration spec covering the BLOCKED:PERSISTENT → gated → refine eligibility flow"
}
],
"steps": [
{
"id": "S1",
"summary": "Create integration test with NestJS testing module wiring InternalAdapterService, DirectiveService, and TaskStateService against in-memory SQLite",
"acceptance": [
"Test file exists at test/integration/blocked-persistent-to-refine.integration.spec.ts",
"A task emitting BLOCKED:PERSISTENT transitions to status=gated",
"A gated task is accepted by refine pre-validation",
"A non-gated task is rejected by refine pre-validation",
"Test descriptions reference #243 and #237",
"npm run test passes with zero failures",
"npm run lint reports zero warnings"
],
"depends_on": []
}
],
"risks": [
{
"risk": "DirectiveService has many constructor dependencies requiring mocks",
"mitigation": "Mock only external I/O (GitHub API, job queue, hooks); use real DB and real TaskStateService"
}
],
"assumptions": [
"InternalAdapterService.handleSignal() is the public entry point for signal processing",
"DirectiveService.applyDirective() is the public entry point for directive handling"
],
"open_questions": []
}