From e36c4881bc1fb1716fb20cad2c857d0cb5fb3202 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 15 Aug 2026 16:00:10 -0700 Subject: [PATCH] test: tree-ratchet readers join the serial phase (quiet tree by construction) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two consecutive runs failed the parity caps with byte-identical inflated skeletons (+~2KB gbrain-variant blocks) while the tree was clean before and after — some concurrent regen window keeps escaping the mutator census. Rather than hunt every present and future mutator, the tests that MEASURE the shared tree (parity caps, size budgets, carve guards) now run in the serial phase after the parallel shards: a quiet tree by construction, immune to any regen we haven't found. Co-Authored-By: Claude Fable 5 --- scripts/test-free-shards.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/test-free-shards.ts b/scripts/test-free-shards.ts index 8f0bb746e..b350e540d 100755 --- a/scripts/test-free-shards.ts +++ b/scripts/test-free-shards.ts @@ -230,6 +230,19 @@ export const WORKER_HOSTILE: Record = { * readers never race a mutator. (CI's --shards matrix is unaffected: each CI * shard has its own checkout.) Each mutator restores default state itself. */ +/** + * TREE-SERIAL files: run in ONE serial shard AFTER the parallel shards. + * Two kinds live here: + * - MUTATORS: tests that regenerate shared repo artifacts in place. + * - RATCHET READERS: tests that MEASURE the shared tree (parity caps, + * size budgets). Measuring while any concurrent test regenerates is + * undefined behavior — two runs failed with byte-identical inflated + * skeletons while the tree was clean before and after, so rather than + * hunt every present and future mutator, the measurers get a quiet + * tree by construction. + * Serial order within the shard: readers are appended after mutators by the + * assignment below, and every mutator restores default state itself. + */ export const TREE_MUTATING: Record = { 'test/catalog-mode-full.test.ts': 'regenerates ALL SKILL.md in full-catalog mode, then restores', 'test/spec-template-sync.test.ts': 'regenerates all SKILL.md in place to compare spec/SKILL.md', @@ -238,6 +251,10 @@ export const TREE_MUTATING: Record = { 'test/skill-validation.test.ts': 'regenerates .agents/ (codex host) artifacts in place (3 sites)', 'test/gbrain-detection-override.test.ts': 'regenerates SKILL.md in place with --respect-detection (gbrain variant), then git-restores — readers see inflated skeletons mid-window', + // 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', + 'test/carve-guard-checks.test.ts': 'RATCHET READER — carve-guard skeleton checks measure the live tree', }; export function normalizeRelativePath(filePath: string): string {