AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. meridian-backend
  4. gh-14
  5. plan
  6. prd.json
prd.json(1.8 KB)· Apr 2, 2026
{
  "issueNumber": 14,
  "branchName": "fix/14-search-index-oom-guard",
  "generatedAt": "2026-04-02T12:00:00Z",
  "stories": [
    {
      "id": "S1",
      "title": "Add rebuild guard with AbortController cancellation to SearchIndexService",
      "priority": 1,
      "dependsOn": [],
      "acceptanceCriteria": [
        "Only one buildIndex() runs at a time — concurrent calls abort the in-flight rebuild",
        "AbortController signal is checked between task iterations in buildIndex()",
        "rebuildPending flag triggers a follow-up rebuild after the current one completes or aborts",
        "handleFileChangeDetail() skips incremental updates when rebuildPending is true"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S2",
      "title": "Create ecosystem.config.js and update start-backend.sh with --max-old-space-size=512",
      "priority": 2,
      "dependsOn": [],
      "acceptanceCriteria": [
        "ecosystem.config.js exists at repo root with app name viewerv2-backend and node_args --max-old-space-size=512",
        "ecosystem.config.js includes max_memory_restart: 512M",
        "start-backend.sh exec line includes --max-old-space-size=512"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S3",
      "title": "Update SearchIndexService unit tests for rebuild guard and cancellation",
      "priority": 3,
      "dependsOn": [
        "S1"
      ],
      "acceptanceCriteria": [
        "Test: concurrent handleFileChange() calls result in single active rebuild",
        "Test: aborted rebuild does not swap index (old index preserved)",
        "Test: rebuildPending triggers follow-up rebuild after current completes",
        "All existing tests continue to pass"
      ],
      "passes": false,
      "completedAt": null
    }
  ]
}
PlanPr description