From 7ed17bf76d1f7646509377e0b6b1d354ae3d884e Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 16 Aug 2026 08:38:24 -0700 Subject: [PATCH] fix(test): classify catalog-trim.test.ts as tree-mutating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Discovered while landing the duplicate-{{PREAMBLE}} guard: importing scripts/gen-skill-docs.ts executes its top-level body, which regenerates the entire claude host (71 GENERATED files) at import time. catalog-trim.test.ts does that import from a PARALLEL shard — the same read-during-regeneration hazard class as #2532, invisible only because the regen is byte-identical on a fresh tree. Move it to the serial tree-mutating window. Co-Authored-By: Claude Fable 5 --- scripts/test-free-shards.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/test-free-shards.ts b/scripts/test-free-shards.ts index 4ac9c69cc..4c0bc021e 100755 --- a/scripts/test-free-shards.ts +++ b/scripts/test-free-shards.ts @@ -357,6 +357,8 @@ export const TREE_MUTATING: Record = { 'regenerates SKILL.md in place with --respect-detection (gbrain variant), then git-restores — readers see inflated skeletons mid-window', 'test/host-config.test.ts': 'golden tests read .agents/.factory artifacts produced by gen-skill-docs.test.ts, and its beforeAll generates them when missing (#2532) — must not race the parallel readers or run before the mutators window', + 'test/catalog-trim.test.ts': + 'imports scripts/gen-skill-docs.ts, whose top-level body regenerates the full claude host at import time (71 files; idempotent on a fresh tree, but a stale tree gets rewritten mid-window) — same hazard class as #2532', // Ratchet readers (measure the tree; need it quiet): 'test/parity-suite.test.ts': 'RATCHET READER — parity caps measure live SKILL.md/section bytes', 'test/skill-size-budget.test.ts': 'RATCHET READER — per-skill and corpus size budgets measure the live tree',