From 7749e4f16e4985b55159652ad6ca5cc36854e568 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Thu, 11 Jun 2026 17:24:08 -0400 Subject: [PATCH] docs(#1065): record DEFECT.INVENTORY-MERGE-UNDERCOUNT in CONTEXT.md (#1066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The INVENTORY.md "CLI Modules (N shipped)" headline is an ABSOLUTE filesystem count, not a delta. Two branches each adding a bin/lib module both bump N->N+1, so the merge under-counts and tests/inventory-counts.test.cjs hard-fails on the CI merge-commit across all platforms — even though each branch passed local gsd-test (which runs branch-only, not branch+next). Hit #844 and #1059. Adds a DEFECT.INVENTORY-MERGE-UNDERCOUNT predicate (.symptom/.detect/.fix-forward/ .prevention) after DEFECT.INVENTORY-DRIFT: re-derive the count from the filesystem + regen the manifest BEFORE every push on module-adding branches. Closes #1065 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 --- CONTEXT.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTEXT.md b/CONTEXT.md index f443ea245..5bba9c4d5 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -544,6 +544,10 @@ The canonical lint infrastructure adopted in ADR 452 (`docs/adr/452-eslint-lint- `DEFECT.INVENTORY-DRIFT.examples=#3309 planner-human-verify-mode.md (caught by tests/inventory-counts.test.cjs + tests/inventory-manifest-sync.test.cjs)` `DEFECT.INVENTORY-DRIFT.detect=tests/inventory-* fails with "References (N shipped) disagrees with filesystem" or "New surfaces not in manifest"` `DEFECT.INVENTORY-DRIFT.fix-forward=update INVENTORY.md headline count + row entry + footnote count; run node scripts/gen-inventory-manifest.cjs --write to regen INVENTORY-MANIFEST.json; only families.workflows is canonical (top-level workflows key is stale)` +`DEFECT.INVENTORY-MERGE-UNDERCOUNT.symptom=docs/INVENTORY.md "## CLI Modules (N shipped)" (and the other family headlines) is an ABSOLUTE count of gsd-core/bin/lib/*.cjs, NOT a delta; two branches that each add a module both bump N->N+1, so merging them keeps N+1 while the merged filesystem has N+2` +`DEFECT.INVENTORY-MERGE-UNDERCOUNT.detect=tests/inventory-counts.test.cjs HARD-FAILS ("CLI Modules (N shipped) matches gsd-core/bin/lib/", "headline counts match the filesystem") on the CI MERGE-COMMIT across ALL platforms (macos/ubuntu/windows) even though the branch passed local gsd-test; gsd-test runs the branch ALONE, CI tests branch MERGED with current next, so concurrent module-adds on next are invisible locally (hit #844, #1059)` +`DEFECT.INVENTORY-MERGE-UNDERCOUNT.fix-forward=after merging origin/next into ANY branch that adds/removes an inventoried artifact (bin/lib module, references/*, workflows/*), rebuild then RE-DERIVE the count from "ls gsd-core/bin/lib/*.cjs | wc -l" (plus per-family counts), set the INVENTORY.md headline to match, run node scripts/gen-inventory-manifest.cjs --write; NEVER trust the merged headline integer` +`DEFECT.INVENTORY-MERGE-UNDERCOUNT.prevention=for any module-adding branch, merge origin/next + reconcile INVENTORY BEFORE EVERY push (not only at branch creation); the longer the branch lives the more certain the drift` `DEFECT.AGENT-FILE-SIZE-CAP-BREACH.symptom=adding to agents/gsd-planner.md (or other large agent files) exceeds the 45K char extraction-evidence threshold` `DEFECT.AGENT-FILE-SIZE-CAP-BREACH.state=gsd-planner.md is already 49,121 chars on main (over 45K); test fails on main; net-new content makes it strictly worse`