**Claimed on #2728 before starting.** The merge path: `merge-queue-ops-2.ts` + `merger.ts` — **10 → 2**, both survivors flagged with reasons. ## A merged PR never advanced its task on a renamed board `applyPrMergedTransition` is what moves a card when GitHub reports a PR merged. Every guard in it was a default-lineage literal, and they all failed **in the same direction**: | guard | renamed board | |---|---| | `column === "done"` → skip as already-done | never matched, so a complete card was re-processed | | `column !== "in-review"` → bail `wrong-column` | always matched, so a card **sitting in review** bailed | Net effect: **a PR merged on GitHub never advances its Fusion task.** The operator sees a merged PR whose card sits in review forever — which reads as a broken webhook, so it gets debugged in the wrong place entirely. That is the most expensive property of this defect class: it does not just fail, it misdirects. One snapshot now covers the pre-check, the deliberate **re-read** (a merge can land between checks), and the **move target**. The target is asserted in the test alongside the guards, because converting guards alone would admit the card and then move it to a column the board does not declare. ## merger.ts - **The orphan-stash liveness guard** classified every finished task as unfinished on a renamed board, so orphaned stashes were never cleaned up. Unioned with the legacy ids: too strict here leaves clutter, too loose **discards a stash whose task is still running**, so over-inclusion is the safe direction. - **The worktree-conflict scan** filters by worktree *path* before resolving lanes. The naive order — resolve, then filter — is exactly what made the github-tracking reconciler scan proportional to task history (#2714 review). Lesson transferred rather than re-learned. - The deprecated `aiMergeTask` already-finalized guard. ## Two flagged, not converted **`merge-queue-ops-2`'s sync enqueue guard** runs inside `store.db.transactionImmediate`. A synchronous lane resolution reads `getTaskWorkflowSelectionImpl`, which returns `undefined` **unconditionally in PostgreSQL mode** — so a "conversion" there would drop the census by one and behave exactly as the literal (the finding from #2703). Converting it properly means making the path async or pushing the trait read into SQL: store architecture, not a call site. Left literal **with that note**, so the next worker does not turn it into a false green. `merger.ts`'s last comparison is the same class. ## Pre-existing red, reported not folded **22 failures in `packages/dashboard/src/__tests__/routes-github.test.ts`** — spec revise/rebuild and approve/reject-plan, all asserting moves to **`triage`, the column U11 deleted**. Verified by reverting my diff and re-running: identical 22. Same stale-literal-in-a-test class as the two assertions #2720 fixed, and it is 22 tests pinning a column that does not exist — worth someone owning deliberately rather than as a rider here. ## Verification census **10 → 2** · `pnpm test:gate` **487 / 71** · 23/23 across three merger suites · 4 new cases, **2 red on revert** · `tsc` clean in core and engine · `pnpm lint` clean. ## Also examined and deliberately left alone - **`live-agent-count.ts` (6 guards)** — every literal there is the *documented degradation path* for a task shape that was not enriched, and both production callers already enrich (`useExecutorStats`, `fn project`). Converting them converts nothing; deleting them removes the fallback that fixtures rely on. The invariant that matters is **caller enrichment**, which is not a literal at all. - **`task-merge.ts` (6 guards)** — `getTaskMergeBlocker` is a **pure** function with no store; its callers inject `resolveTask`. Resolving lanes needs a matching injected resolver, which is an interface change across every caller. Also worth a decision first: its dependency check accepts `in-review` as satisfied while the store's `blockedBy` computation (#2720) does not — **two definitions of "dependency satisfied" in one codebase**, and I am not settling that one silently inside a vocabulary sweep. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
194 lines
11 KiB
JSON
194 lines
11 KiB
JSON
{
|
|
"generatedFrom": "node scripts/lifecycle-column-census.mjs --strict --update-baseline",
|
|
"byFile": {
|
|
"packages/engine/src/self-healing.ts": 110,
|
|
"packages/engine/src/executor.ts": 15,
|
|
"packages/core/src/store.ts": 12,
|
|
"packages/engine/src/scheduler.ts": 12,
|
|
"packages/core/src/task-store/async-comments-attachments.ts": 9,
|
|
"packages/dashboard/app/components/TaskContextMenu.tsx": 9,
|
|
"packages/dashboard/src/github-tracking-reconciler.ts": 9,
|
|
"packages/engine/src/notification/notification-service.ts": 9,
|
|
"packages/core/src/default-workflow-hooks.ts": 7,
|
|
"packages/dashboard/app/components/Column.tsx": 7,
|
|
"packages/core/src/live-agent-count.ts": 6,
|
|
"packages/core/src/task-merge.ts": 6,
|
|
"packages/core/src/task-store/task-artifacts-ops.ts": 6,
|
|
"packages/dashboard/app/components/ListView.tsx": 6,
|
|
"packages/engine/src/runtimes/in-process-runtime.ts": 6,
|
|
"packages/dashboard/src/routes/register-task-workflow-routes.ts": 5,
|
|
"packages/engine/src/agent-tools.ts": 5,
|
|
"packages/engine/src/project-engine.ts": 5,
|
|
"packages/engine/src/restart-recovery-coordinator.ts": 5,
|
|
"packages/core/src/task-store/branch-group-ops.ts": 4,
|
|
"packages/dashboard/app/components/TaskDetailModal.tsx": 4,
|
|
"packages/dashboard/app/components/TaskReviewTab.tsx": 4,
|
|
"packages/dashboard/app/components/taskSorting.ts": 4,
|
|
"packages/dashboard/src/routes/register-git-github.ts": 4,
|
|
"packages/engine/src/agent-heartbeat.ts": 4,
|
|
"packages/engine/src/replan-target.ts": 4,
|
|
"packages/engine/src/triage.ts": 4,
|
|
"packages/engine/src/usage-limit-detector.ts": 4,
|
|
"packages/core/src/async-mission-store-queries.ts": 3,
|
|
"packages/core/src/task-priority.ts": 3,
|
|
"packages/core/src/task-store/async-merge-coordination.ts": 3,
|
|
"packages/core/src/task-store/task-update.ts": 3,
|
|
"packages/dashboard/app/components/DockTaskList.tsx": 3,
|
|
"packages/dashboard/app/components/TaskCard.tsx": 3,
|
|
"packages/dashboard/app/components/TaskChangesTab.tsx": 3,
|
|
"packages/dashboard/app/components/TaskChatTab.tsx": 3,
|
|
"packages/dashboard/app/hooks/useTaskDiffStats.ts": 3,
|
|
"packages/dashboard/app/utils/taskActivity.ts": 3,
|
|
"packages/dashboard/app/utils/worktreeGrouping.ts": 3,
|
|
"packages/dashboard/src/chat.ts": 3,
|
|
"packages/engine/src/gridlock-detector.ts": 3,
|
|
"packages/engine/src/planner-overseer.ts": 3,
|
|
"packages/engine/src/worktree-pool.ts": 3,
|
|
"packages/core/src/agent-store.ts": 2,
|
|
"packages/core/src/assigned-task-ranking.ts": 2,
|
|
"packages/core/src/async-mission-store.ts": 2,
|
|
"packages/core/src/duplicate-intake.ts": 2,
|
|
"packages/core/src/near-duplicate-canonical.ts": 2,
|
|
"packages/core/src/node-override-guard.ts": 2,
|
|
"packages/core/src/task-move-disposer.ts": 2,
|
|
"packages/core/src/task-store/archive-lifecycle-2.ts": 2,
|
|
"packages/core/src/task-store/audit-ops.ts": 2,
|
|
"packages/core/src/task-store/comments-ops.ts": 2,
|
|
"packages/core/src/task-store/moves.ts": 2,
|
|
"packages/core/src/task-store/project-store-ops.ts": 2,
|
|
"packages/core/src/task-store/reads.ts": 2,
|
|
"packages/core/src/task-store/symbol-locks.ts": 2,
|
|
"packages/core/src/task-store/task-id-integrity.ts": 2,
|
|
"packages/core/src/task-store/update-task-deps.ts": 2,
|
|
"packages/core/src/team-analytics.ts": 2,
|
|
"packages/core/src/workflow-analytics.ts": 2,
|
|
"packages/dashboard/app/components/Board.tsx": 2,
|
|
"packages/dashboard/app/components/DocumentsView.tsx": 2,
|
|
"packages/dashboard/app/components/effective-model-resolution.ts": 2,
|
|
"packages/dashboard/app/components/WorkflowResultsTab.tsx": 2,
|
|
"packages/dashboard/app/utils/prFeedback.ts": 2,
|
|
"packages/dashboard/app/utils/taskRevert.ts": 2,
|
|
"packages/dashboard/app/utils/taskTiming.ts": 2,
|
|
"packages/dashboard/src/github-tracking-state.ts": 2,
|
|
"packages/dashboard/src/routes/register-project-routes.ts": 2,
|
|
"packages/dashboard/src/routes/register-session-diff-routes.ts": 2,
|
|
"packages/dashboard/src/routes/register-system-maintenance-routes.ts": 2,
|
|
"packages/dashboard/src/server.ts": 2,
|
|
"packages/engine/src/agent-reflection.ts": 2,
|
|
"packages/engine/src/auto-merge-finalization.ts": 2,
|
|
"packages/engine/src/cli-agent/state-machine.ts": 2,
|
|
"packages/engine/src/merger-scope-auto-widen.ts": 2,
|
|
"packages/engine/src/mission-execution-loop.ts": 2,
|
|
"plugins/fusion-plugin-even-cards/src/cards/board-cards.ts": 2,
|
|
"plugins/fusion-plugin-reports/src/store/report-store.ts": 2,
|
|
"packages/cli/src/commands/pr.ts": 1,
|
|
"packages/core/src/eval-automation.ts": 1,
|
|
"packages/core/src/eval-signal-collector.ts": 1,
|
|
"packages/core/src/in-review-stall.ts": 1,
|
|
"packages/core/src/mission-store.ts": 1,
|
|
"packages/core/src/plugin-store.ts": 1,
|
|
"packages/core/src/stalled-review-detector.ts": 1,
|
|
"packages/core/src/task-store/branch-and-pr-entities.ts": 1,
|
|
"packages/core/src/task-store/lifecycle-ops.ts": 1,
|
|
"packages/core/src/task-store/merge-queue-ops-2.ts": 1,
|
|
"packages/core/src/task-store/merge-queue-ops.ts": 1,
|
|
"packages/core/src/task-timing.ts": 1,
|
|
"packages/dashboard/app/components/ChangesDiffModal.tsx": 1,
|
|
"packages/dashboard/app/components/command-center/liveSnapshotMetrics.ts": 1,
|
|
"packages/dashboard/app/components/DevServerView.tsx": 1,
|
|
"packages/dashboard/app/components/MergeDetails.tsx": 1,
|
|
"packages/dashboard/app/components/PrPanel.tsx": 1,
|
|
"packages/dashboard/app/components/ResearchTaskActionModal.tsx": 1,
|
|
"packages/dashboard/app/components/RoutingTab.tsx": 1,
|
|
"packages/dashboard/app/components/TaskPlannerChatTab.tsx": 1,
|
|
"packages/dashboard/app/hooks/useExecutorStats.ts": 1,
|
|
"packages/dashboard/app/hooks/useTasks.ts": 1,
|
|
"packages/dashboard/app/utils/inReviewStallCopy.ts": 1,
|
|
"packages/dashboard/app/utils/quickAddStart.ts": 1,
|
|
"packages/dashboard/app/utils/stalePausedReviewCopy.ts": 1,
|
|
"packages/dashboard/app/utils/taskStuck.ts": 1,
|
|
"packages/dashboard/src/github-issue-comment.ts": 1,
|
|
"packages/dashboard/src/github-tracking-comments.ts": 1,
|
|
"packages/dashboard/src/gitlab-issue-comment.ts": 1,
|
|
"packages/dashboard/src/gitlab-source-issue-reconciler.ts": 1,
|
|
"packages/dashboard/src/gitlab-tracking-comments.ts": 1,
|
|
"packages/dashboard/src/knowledge-index-refresh.ts": 1,
|
|
"packages/dashboard/src/planning-board-tools.ts": 1,
|
|
"packages/dashboard/src/research-routes.ts": 1,
|
|
"packages/dashboard/src/routes/register-agent-core-routes.ts": 1,
|
|
"packages/dashboard/src/routes/register-chat-routes.ts": 1,
|
|
"packages/dashboard/src/task-planner-chat-context.ts": 1,
|
|
"packages/dashboard/src/task-planner-chat-metrics.ts": 1,
|
|
"packages/dashboard/src/test/mockCoreEngine.ts": 1,
|
|
"packages/engine/src/auto-recovery-handlers/branch-worktree.ts": 1,
|
|
"packages/engine/src/backlog-pressure-reporter.ts": 1,
|
|
"packages/engine/src/cli-agent/task-session.ts": 1,
|
|
"packages/engine/src/ephemeral-worker-manager.ts": 1,
|
|
"packages/engine/src/merger-integration-worktree.ts": 1,
|
|
"packages/engine/src/merger-orphan-rehome.ts": 1,
|
|
"packages/engine/src/merger.ts": 1,
|
|
"packages/engine/src/plugin-runner.ts": 1,
|
|
"packages/engine/src/pr-comment-handler.ts": 1,
|
|
"plugins/fusion-plugin-even-realities-glasses/src/notifications/diff.ts": 1,
|
|
"plugins/fusion-plugin-reports/src/store/report-types.ts": 1
|
|
},
|
|
"deliberateByFile": {
|
|
"packages/dashboard/src/reliability-metrics.ts\u0000in-review": 4,
|
|
"packages/dashboard/app/components/TaskCard.tsx\u0000triage": 2,
|
|
"packages/dashboard/app/components/TaskDetailModal.tsx\u0000triage": 2,
|
|
"packages/engine/src/scheduler.ts\u0000in-progress": 2,
|
|
"packages/engine/src/scheduler.ts\u0000in-review": 2,
|
|
"packages/cli/src/commands/task.ts\u0000archived": 1,
|
|
"packages/cli/src/commands/task.ts\u0000done": 1,
|
|
"packages/cli/src/extension.ts\u0000archived": 1,
|
|
"packages/cli/src/extension.ts\u0000done": 1,
|
|
"packages/core/src/task-store/task-store-helpers.ts\u0000in-progress": 1,
|
|
"packages/core/src/task-store/task-store-helpers.ts\u0000todo": 1,
|
|
"packages/dashboard/app/components/command-center/MissionControlPanel.tsx\u0000done": 1,
|
|
"packages/dashboard/app/components/command-center/MissionControlPanel.tsx\u0000in-review": 1,
|
|
"packages/dashboard/app/components/command-center/MissionControlPanel.tsx\u0000todo": 1,
|
|
"packages/dashboard/app/components/RoutineEditor.tsx\u0000triage": 1,
|
|
"packages/dashboard/app/components/ScheduleForm.tsx\u0000triage": 1,
|
|
"packages/dashboard/app/components/ScheduleStepsEditor.tsx\u0000triage": 1,
|
|
"packages/dashboard/app/components/TaskCard.tsx\u0000todo": 1,
|
|
"packages/dashboard/app/components/TaskContextMenu.tsx\u0000triage": 1,
|
|
"packages/dashboard/app/components/TaskDetailModal.tsx\u0000todo": 1,
|
|
"packages/dashboard/app/utils/columnRoles.ts\u0000todo": 1,
|
|
"packages/dashboard/src/reliability-metrics.ts\u0000done": 1,
|
|
"packages/dashboard/src/reliability-metrics.ts\u0000in-progress": 1,
|
|
"packages/dashboard/src/routes/register-task-workflow-routes.ts\u0000todo": 1,
|
|
"packages/dashboard/src/routes/register-task-workflow-routes.ts\u0000triage": 1,
|
|
"packages/engine/src/hold-release.ts\u0000archived": 1,
|
|
"packages/engine/src/hold-release.ts\u0000done": 1,
|
|
"packages/engine/src/hold-release.ts\u0000in-review": 1,
|
|
"packages/engine/src/scheduler.ts\u0000archived": 1,
|
|
"packages/engine/src/scheduler.ts\u0000done": 1,
|
|
"packages/engine/src/triage.ts\u0000triage": 1
|
|
},
|
|
"queryByFile": {
|
|
"packages/engine/src/self-healing.ts": 48,
|
|
"packages/engine/src/project-engine.ts": 7,
|
|
"packages/engine/src/backlog-pressure-reporter.ts": 3,
|
|
"packages/core/src/task-store/async-persistence.ts": 2,
|
|
"packages/core/src/task-store/merge-queue-ops.ts": 2,
|
|
"packages/core/src/task-store/moves.ts": 2,
|
|
"packages/engine/src/executor.ts": 2,
|
|
"packages/engine/src/stale-task-reporter.ts": 2,
|
|
"packages/cli/src/extension.ts": 1,
|
|
"packages/core/src/async-mission-store.ts": 1,
|
|
"packages/core/src/eval-automation.ts": 1,
|
|
"packages/core/src/store.ts": 1,
|
|
"packages/core/src/task-store/archive-lifecycle-2.ts": 1,
|
|
"packages/core/src/task-store/async-archive-lineage.ts": 1,
|
|
"packages/core/src/task-store/async-self-healing.ts": 1,
|
|
"packages/core/src/task-store/task-artifacts-ops.ts": 1,
|
|
"packages/core/src/task-store/task-store-helpers.ts": 1,
|
|
"packages/dashboard/src/routes/register-gitlab.ts": 1,
|
|
"packages/engine/src/agent-tools.ts": 1,
|
|
"packages/engine/src/auto-merge-finalization.ts": 1,
|
|
"packages/engine/src/restart-recovery-coordinator.ts": 1,
|
|
"packages/engine/src/scheduler.ts": 1,
|
|
"packages/engine/src/workflow-node-handlers.ts": 1
|
|
}
|
|
}
|