From 958f27a2b86fc623b1628de7e76a56b14b6bb327 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 01:22:31 +0000 Subject: [PATCH] test(W7h): retire the literal 75 KB autoplan budget duplicate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit W7h retirement (t04 F18). test/skill-preflight-budget.test.ts asserted the same four-skill autoplan sum twice: once against AUTOPLAN_PREFLIGHT_BUDGET_BYTES * 3 (25,600 x 3 = 76,800 = 75 KiB) and once against a literal 75 * 1024, which would drift silently if the constant changed. Retirement card: - test: skill-preflight-budget.test.ts 'autoplan total under 25 KB instruction cap × 3 (75 KB instruction budget)'. - detects: the four plan-* skills' brain preflight + refresh + write-back instructions exceeding 75 KiB. - non_test_callers: none. - stronger_proof / replacement: 'autoplan: sum across 4 plan-* skills stays under AUTOPLAN_PREFLIGHT_BUDGET_BYTES × 3 (instructions)' in the same file, which reads the constant from scripts/brain-cache-spec.ts. - history: c118e24 v1.64.1.0. - validation: bun test test/skill-preflight-budget.test.ts. Controls (scratch worktree): shrinking AUTOPLAN_PREFLIGHT_BUDGET_BYTES below the current total, or growing the eng write-back instructions by 80 KB, turns the kept constant-based check red (2/2). Log: .context/mutation-skill-preflight-budget.md. --- test/skill-preflight-budget.test.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/skill-preflight-budget.test.ts b/test/skill-preflight-budget.test.ts index 37d2e35f8..b9f8c5f2b 100644 --- a/test/skill-preflight-budget.test.ts +++ b/test/skill-preflight-budget.test.ts @@ -77,14 +77,6 @@ describe('per-skill preflight token budget', () => { }); describe('autoplan total preflight budget (T21 / D7)', () => { - test('autoplan total under 25 KB instruction cap × 3 (75 KB instruction budget)', () => { - const autoplanSkills = ['plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'plan-devex-review']; - const total = autoplanSkills.reduce((sum, s) => sum + totalBrainBytes(s), 0); - // The 75 KB cap on instructions across the 4-skill autoplan; runtime - // digest budget is the lower 25 KB cap, separately tested above. - expect(total).toBeLessThan(75 * 1024); - }); - test('per-skill subset emits its expected entity references in the preflight block', () => { for (const [skill, subset] of Object.entries(SKILL_DIGEST_SUBSETS)) { const preflight = generateBrainPreflight(buildCtx(skill));