The program's completion bar is "`column === "triage"` reaches zero".
This measures what that bar actually covers, and checks the measurement
in so it cannot drift.
## The number, measured by the checked-in tool
```
lifecycle-column-census: scanned 1956 source files
COLUMN guards (the backlog): 1031
ROLE comparisons (not guards): 10
DELIBERATE-LITERAL (reviewed): 4
by column id:
313 done
217 in-review
201 in-progress
177 archived
83 todo
40 triage
top files:
151 packages/engine/src/executor.ts
136 packages/engine/src/self-healing.ts
50 packages/dashboard/app/components/TaskCard.tsx
44 packages/core/src/task-store/moves.ts
34 packages/dashboard/app/components/TaskDetailModal.tsx
```
**`triage` is under 4% of the class.** Every one of those 1031 sites is
the same defect: a lifecycle decision made by column NAME, which stops
matching the moment a board renames a column. The bar can be met in full
while 991 identical guards remain — and two files hold a quarter of
them.
## The tracked count is wrong in three directions at once
Each of these cost real work this week, which is why this is a PR and
not a comment.
1. **Vocabulary.** It measures one of six legacy ids.
2. **Receiver.** It is anchored on locals named
`column`/`toColumn`/`fromColumn`, so it never saw the three real guards
in `executor.ts` written against `from` and `originColumn`. One of those
meant completed-but-stranded work was never recovered on a renamed
board, with nothing else owning that state (converted in #2628).
3. **Collision.** `role === "triage"`, `agentType === "triage"`,
`entry.agent === "triage"` compare an **AGENT ROLE**. The planner *lane*
is named `triage` and keeps that name — U11 removed the *column*. Ten
such sites were counted as backlog, and the "obvious" fix (renaming the
role) silently empties the planner's prompt template and mis-binds its
model markers.
A count that is too high and too low simultaneously sends work to the
wrong files while hiding the files that need it. So the census reports
**three separate numbers** and never nets them.
## Proven to fail on the original defect
Not asserted — exercised:
```
$ # reintroduce `task.column === "triage" || task.column === "todo"` into live-agent-count.ts
$ node scripts/lifecycle-column-census.mjs --strict; echo "exit=$?"
packages/core/src/live-agent-count.ts: 10 -> 12
exit=1
$ # restore the file
$ node scripts/lifecycle-column-census.mjs --strict >/dev/null; echo "exit=$?"
exit=0
```
The CLI also exits 1 when its own file list comes back empty — a guard
that reports success without checking anything is worse than no guard.
## 12 regression cases, split by what they defend
Must catch: all six ids; a guard on a local named `from`/`originColumn`
(verbatim the executor.ts shape); single quotes; negation; several
comparisons on one line.
Must **not** catch: role comparisons; comment prose (two tracked
"guards" in `replan-target.ts` were prose about a filter that lives in
another file); a trailing `// … === "triage"` on a code line; sites
carrying a `DELIBERATE-LITERAL` marker.
Plus: **one marker cannot launder a distant guard in the same file** —
that is how allowlists rot.
## Report-only, deliberately
`--strict` compares per-file counts against
`scripts/lib/lifecycle-column-census-baseline.json` and fails when any
file's count **rises**. It is **not** wired into the merge gate: a
thousand-site backlog cannot be a blocking check the day it is first
measured, and a guard nobody can pass is a guard everyone disables.
Owners tightening their own area re-record the baseline in the PR that
lowers it. This is the ratchet shape the `DELIBERATE-LITERAL` markers
scattered through the program already anticipate.
## Stated limitation
Classification is by receiver **name**, so a future field named `agent`
that holds a column would be misclassified as a role comparison.
Recorded at the site, and it is precisely why the two classes are
reported separately instead of netted into one figure.
## Verification
- 12/12 new cases
(`packages/engine/src/__tests__/lifecycle-column-census.test.ts`)
- `pnpm test:gate` **71/71**; `pnpm lint` clean
- `pnpm census:lifecycle-columns`, `--json`, and `--strict` all
exercised end to end
- documented in `docs/testing.md`; no production code touched
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
162 lines
8.2 KiB
JSON
162 lines
8.2 KiB
JSON
{
|
|
"generatedFrom": "node scripts/lifecycle-column-census.mjs --strict --update-baseline (AST classifier)",
|
|
"totals": {
|
|
"column": 854,
|
|
"role": 12,
|
|
"status": 182,
|
|
"deliberate": 3
|
|
},
|
|
"byColumnId": {
|
|
"done": 210,
|
|
"in-progress": 153,
|
|
"in-review": 218,
|
|
"archived": 152,
|
|
"triage": 38,
|
|
"todo": 83
|
|
},
|
|
"byFile": {
|
|
"packages/engine/src/self-healing.ts": 126,
|
|
"packages/engine/src/executor.ts": 112,
|
|
"packages/dashboard/app/components/TaskCard.tsx": 45,
|
|
"packages/core/src/task-store/moves.ts": 44,
|
|
"packages/dashboard/app/components/TaskDetailModal.tsx": 34,
|
|
"packages/engine/src/scheduler.ts": 28,
|
|
"packages/core/src/default-workflow-hooks.ts": 25,
|
|
"packages/dashboard/src/routes/register-task-workflow-routes.ts": 22,
|
|
"packages/core/src/store.ts": 12,
|
|
"packages/engine/src/project-engine.ts": 12,
|
|
"packages/cli/src/commands/task.ts": 11,
|
|
"packages/dashboard/app/components/TaskContextMenu.tsx": 11,
|
|
"packages/core/src/live-agent-count.ts": 10,
|
|
"packages/dashboard/app/components/Column.tsx": 10,
|
|
"packages/engine/src/mission-execution-loop.ts": 10,
|
|
"packages/core/src/task-store/async-comments-attachments.ts": 9,
|
|
"packages/dashboard/src/github-tracking-comments.ts": 9,
|
|
"packages/dashboard/src/github-tracking-reconciler.ts": 9,
|
|
"packages/engine/src/notification/notification-service.ts": 9,
|
|
"packages/cli/src/commands/dashboard.ts": 8,
|
|
"packages/core/src/task-store/update-task-deps.ts": 7,
|
|
"packages/engine/src/agent-tools.ts": 7,
|
|
"packages/core/src/task-merge.ts": 6,
|
|
"packages/core/src/task-store/branch-group-ops.ts": 6,
|
|
"packages/core/src/task-store/task-artifacts-ops.ts": 6,
|
|
"packages/dashboard/app/components/ListView.tsx": 6,
|
|
"packages/dashboard/src/reliability-metrics.ts": 6,
|
|
"packages/engine/src/runtimes/in-process-runtime.ts": 6,
|
|
"packages/cli/src/extension.ts": 5,
|
|
"packages/core/src/task-store/merge-queue-ops-2.ts": 5,
|
|
"packages/dashboard/app/hooks/useTaskDiffStats.ts": 5,
|
|
"packages/dashboard/app/utils/taskActivity.ts": 5,
|
|
"packages/engine/src/merger.ts": 5,
|
|
"packages/engine/src/mission-feature-sync.ts": 5,
|
|
"packages/engine/src/restart-recovery-coordinator.ts": 5,
|
|
"packages/core/src/agent-store.ts": 4,
|
|
"packages/core/src/blocker-fanout.ts": 4,
|
|
"packages/core/src/task-age-staleness.ts": 4,
|
|
"packages/core/src/task-store/comments-ops.ts": 4,
|
|
"packages/core/src/task-store/task-store-helpers.ts": 4,
|
|
"packages/dashboard/app/components/command-center/MissionControlPanel.tsx": 4,
|
|
"packages/dashboard/app/components/DocumentsView.tsx": 4,
|
|
"packages/dashboard/app/components/TaskReviewTab.tsx": 4,
|
|
"packages/dashboard/app/components/taskSorting.ts": 4,
|
|
"packages/dashboard/app/utils/worktreeGrouping.ts": 4,
|
|
"packages/dashboard/src/gitlab-tracking-comments.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/async-mission-store.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/TaskChangesTab.tsx": 3,
|
|
"packages/dashboard/app/components/TaskChatTab.tsx": 3,
|
|
"packages/dashboard/src/chat.ts": 3,
|
|
"packages/dashboard/src/routes/register-chat-routes.ts": 3,
|
|
"packages/engine/src/cli-agent/state-machine.ts": 3,
|
|
"packages/engine/src/gridlock-detector.ts": 3,
|
|
"packages/engine/src/planner-overseer.ts": 3,
|
|
"packages/engine/src/worktree-pool.ts": 3,
|
|
"packages/cli/src/commands/dashboard-tui/app.tsx": 2,
|
|
"packages/core/src/assigned-task-ranking.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/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/team-analytics.ts": 2,
|
|
"packages/core/src/workflow-analytics.ts": 2,
|
|
"packages/dashboard/app/components/Board.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/merger-scope-auto-widen.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.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/DashboardLoader.tsx": 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/gitlab-issue-comment.ts": 1,
|
|
"packages/dashboard/src/gitlab-source-issue-reconciler.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/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/cli-agent/telemetry-hub.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/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
|
|
}
|
|
}
|