From d2f47acedda6949bd53520da41aca958ebce41bb Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Thu, 30 Jul 2026 12:49:27 -0700 Subject: [PATCH] =?UTF-8?q?fix(tests):=20the=20core=20half=20of=20#2783's?= =?UTF-8?q?=20bookkeeping=20=E2=80=94=20archived-gate=20inventory=20(#2817?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## The 6th red from #2783 #2814 cleared the 5 **engine** reds #2783 left on `main`. This is the sixth, in **core** — I found it after #2814 was already open, and it merged before I could fold this in. ``` archived-column-gate-parity > all three encodings of the archived gate stay in lockstep with the audited inventory AssertionError: TypeScript encoding changed. ``` ## Same cause, same shape as #2786 #2783 converted three more sites off raw `column === "archived"` comparisons and did not update the inventory in the same commit — which the guard's own failure text explicitly asks for. | file | before → after | |---|---| | `async-mission-store.ts` | 2 → 0 | | `task-store/symbol-locks.ts` | 1 → 0 | | `task-store/archive-lifecycle-2.ts` | 2 → 1 | **Verified each is a real conversion, not a dropped gate.** All three now seed a legacy lane set and extend it from the workflow: ```ts const lanes = new Set(["done", "archived"]); … for (const id of columnsWithFlag(ir, "archived")) lanes.add(id); ``` The literal still in `archive-lifecycle-2.ts:46` is `column: "archived"` as a **move destination**, not a gate comparison — the same distinction the planner-lane move targets get. ## Verified NOT a split-brain That is the thing this file exists to catch — TypeScript moving to the resolved role while the SQL sides keep comparing the raw string. The **Drizzle and raw-sql inventories are unchanged and both pass**. Worth stating explicitly because those assertions run *after* the TypeScript one: a plain red tells you nothing about them, so they had to be re-run green to know. ## One thing I nearly got wrong My first edit was a whole-file string replace and it threw on an assertion count. That turned out to be load-bearing: **these paths appear in more than one inventory in this file** (`AUDITED_TS_SITES` and the raw-sql inventory both list `async-mission-store.ts`). An unscoped replace would have silently edited the raw-sql inventory too — making the parity guard agree with itself and defeating the exact cross-encoding check it exists for. The edit is now scoped to `AUDITED_TS_SITES` by line range. ## Evidence - Guard still bites: appending a real `task.column === "archived"` to an audited file → **fails**. - Core **4773 passed / 0 failed** · engine **10988 passed / 0 failed** · gate **732 green** · lint clean. Test-only; `agent-store.ts` restored clean after the mutation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) --- .../core/src/__tests__/archived-column-gate-parity.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/core/src/__tests__/archived-column-gate-parity.test.ts b/packages/core/src/__tests__/archived-column-gate-parity.test.ts index 9486f761ba..7f20f00dc4 100644 --- a/packages/core/src/__tests__/archived-column-gate-parity.test.ts +++ b/packages/core/src/__tests__/archived-column-gate-parity.test.ts @@ -57,19 +57,17 @@ import { describe, expect, it } from "vitest"; const AUDITED_TS_SITES: Readonly> = { "packages/core/src/agent-store.ts": 1, "packages/core/src/async-mission-store-queries.ts": 2, - "packages/core/src/async-mission-store.ts": 2, "packages/core/src/eval-signal-collector.ts": 1, "packages/core/src/live-agent-count.ts": 1, "packages/core/src/mission-store.ts": 1, "packages/core/src/store.ts": 1, "packages/core/src/task-merge.ts": 2, - "packages/core/src/task-store/archive-lifecycle-2.ts": 2, + "packages/core/src/task-store/archive-lifecycle-2.ts": 1, "packages/core/src/task-store/async-comments-attachments.ts": 8, "packages/core/src/task-store/audit-ops.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/moves.ts": 1, - "packages/core/src/task-store/symbol-locks.ts": 1, "packages/core/src/task-store/task-id-integrity.ts": 1, "packages/core/src/task-store/update-task-deps.ts": 1, };