From 581e6fba43da90d7aeeec0b72858f95a98f3c1b4 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 31 Jul 2026 03:13:09 -0700 Subject: [PATCH] =?UTF-8?q?chore(core):=20mark=20the=20async-mission=20fal?= =?UTF-8?q?lback=20arms=20DELIBERATE-LITERAL=20(census=20108=E2=86=92106)?= =?UTF-8?q?=20(#3056)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fleet phase. Claimed `packages/core/src/async-mission-store-queries.ts` — **the only census file with no branch, no worktree, and no open PR against it.** Claim published by pushing the branch before doing any work. ## Census before / after | | total | this file | deliberate | |---|---|---|---| | before | **108** | 2 | 128 | | after | **106** | 0 | **130** | `--strict` exits 0, baseline re-recorded in the same commit. **This is a reclassification, not a conversion.** The same two lines are still there. A reader comparing 108 → 106 against my #3047's 126 → 121 should know only the latter changed behaviour. ## Why marking is the right answer here Both sites are the **fallback arm** of the three-state rule: ```ts terminalColumns?.complete ? terminalColumns.complete.has(column) : column === "done"; ``` `terminalColumns` undefined means the caller could not resolve lanes. The legacy id is then the only answer that keeps the query working at all — converting it would delete the fallback and make an unresolvable caller return nothing. The census counts the literal, but **the literal is the design**. The file's own comment shows a previous worker already reached this conclusion. Nothing recorded it in a form the tool reads, so it stayed in `byFile` as apparent backlog for the next pass to re-derive. ## The finding this makes concrete I checked five unclaimed files this phase (`agent-store`, `github-tracking-state`, `planner-overseer`, `auto-merge-finalization`, this one). **Every site in them was either a fallback arm or an already-documented deliberate leave** — `agent-store.ts:236` carries a comment from today's fleet phase explaining why it stays. So the remaining count is not a work queue. A meaningful share is correct code the tool cannot distinguish from owed work, and each fleet pass pays to re-derive that. Marking them is cheap, mechanical, and makes the number mean "conversions owed" — which is what every worker reads it as when picking a cluster. I marked only the file I claimed. The others belong to whoever holds them. ## Verification - `census --strict` exit 0; `tsc --noEmit` **0 errors** - `check:fnxc-future-dates`, `check:lane-wiring`, `check:sql-column-literals`, `check:inert-flag-seams` — all exit 0 - No behaviour change: the two expressions are byte-identical, only comments added ## Note on the marker's granularity The first marker covered only `isComplete` — the census attaches markers by *preceding comment*, so the sibling `isArchived` needed its own. Caught by re-running the census (2 → 1, not 2 → 0) rather than by reading. Worth knowing before marking a group of related literals. Co-authored-by: Claude Opus 5 (1M context) --- packages/core/src/async-mission-store-queries.ts | 14 ++++++++++++++ scripts/lib/lifecycle-column-census-baseline.json | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/core/src/async-mission-store-queries.ts b/packages/core/src/async-mission-store-queries.ts index e499ced0c9..04fc109bdb 100644 --- a/packages/core/src/async-mission-store-queries.ts +++ b/packages/core/src/async-mission-store-queries.ts @@ -2253,8 +2253,22 @@ export async function getTerminalTaskEvidence( third deferral of mine to dissolve on inspection, which is why the premise is now recorded next to the fix rather than in a note claiming it cannot be done. */ + /* + FNXC:LifecycleColumnCensus 2026-07-31-11:30 (fleet phase — RECLASSIFICATION, not a conversion): + DELIBERATE-LITERAL — these two ids are the FALLBACK ARM of the three-state rule, not backlog. + + `terminalColumns` undefined means the caller could not resolve lanes; the legacy id is then the only + answer that keeps this query working, exactly as it did before lanes existed. Converting them would + delete the fallback and make an unresolvable caller return nothing — the census counts the literal, + but the literal IS the design. + + Marked rather than converted because every fleet pass re-derives this and leaves it, and an unmarked + correct site is indistinguishable from owed work in `byFile`. The marker moves it to + `deliberateByFile`, which is what the count should mean. + */ const isComplete = (column: string) => terminalColumns?.complete ? terminalColumns.complete.has(column) : column === "done"; + /* DELIBERATE-LITERAL — same fallback arm as `isComplete` above; see the note there. */ const isArchived = (column: string) => terminalColumns?.archived ? terminalColumns.archived.has(column) : column === "archived"; diff --git a/scripts/lib/lifecycle-column-census-baseline.json b/scripts/lib/lifecycle-column-census-baseline.json index 01a71ded05..247f84f264 100644 --- a/scripts/lib/lifecycle-column-census-baseline.json +++ b/scripts/lib/lifecycle-column-census-baseline.json @@ -4,9 +4,7 @@ "packages/engine/src/self-healing.ts": 38, "packages/engine/src/notification/notification-service.ts": 5, "packages/engine/src/executor.ts": 4, - "packages/engine/src/restart-recovery-coordinator.ts": 4, "packages/core/src/agent-store.ts": 2, - "packages/core/src/async-mission-store-queries.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, @@ -32,6 +30,7 @@ "packages/engine/src/backlog-pressure-reporter.ts": 1, "packages/engine/src/ephemeral-worker-manager.ts": 1, "packages/engine/src/merger.ts": 1, + "packages/engine/src/restart-recovery-coordinator.ts": 1, "packages/engine/src/runtimes/in-process-runtime.ts": 1, "packages/engine/src/triage.ts": 1 }, @@ -66,6 +65,8 @@ "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/async-mission-store-queries.ts\u0000archived": 1, + "packages/core/src/async-mission-store-queries.ts\u0000done": 1, "packages/core/src/live-agent-count.ts\u0000archived": 1, "packages/core/src/live-agent-count.ts\u0000done": 1, "packages/core/src/plugin-store.ts\u0000done": 1,