AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-441
  5. plan
  6. prd.json
prd.json(1.8 KB)ยท Apr 12, 2026
{
  "issueNumber": 441,
  "branchName": "feat/441-crash-recovery",
  "generatedAt": "2026-04-12T12:00:00Z",
  "stories": [
    {
      "id": "S1",
      "title": "Add recoverResult() to InvocationResultListener with duplicate-delivery guard",
      "priority": 1,
      "dependsOn": [],
      "acceptanceCriteria": [
        "recoverResult() looks up task by jobId, reads current phase/status, and advances pipeline via InternalAdapterService if not already advanced",
        "Duplicate result for already-advanced phase is logged and discarded",
        "Missing task for jobId logs error and returns early",
        "Unit tests cover happy path, duplicate delivery, and no-task-found"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S2",
      "title": "Smart stale job detection in SqliteJobQueue.onModuleInit()",
      "priority": 2,
      "dependsOn": [],
      "acceptanceCriteria": [
        "Jobs with existing ai-done.json are treated as completed results and trigger recovery",
        "Jobs with live ai.pid (process.kill(pid, 0) succeeds) stay in processing status",
        "Jobs with no done file and no live PID are marked failed",
        "Jobs with no taskDir in payload are marked failed",
        "Unit tests cover live PID, done file, truly stale, and no-taskDir scenarios"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S3",
      "title": "Add configurable timeout to waitForResult()",
      "priority": 3,
      "dependsOn": [],
      "acceptanceCriteria": [
        "waitForResult() rejects with TimeoutError after CLAUDE_TIMEOUT_SECS + 100s buffer (~3,700,000 ms)",
        "On timeout, the pending map entry is deleted",
        "Unit test verifies timeout rejection and map cleanup"
      ],
      "passes": false,
      "completedAt": null
    }
  ]
}
PlanPr description