From b3d5a6b0b79af735572c76fef152a9966e62f6d6 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 25 Apr 2026 21:01:47 -0700 Subject: [PATCH] test(skill-validation): exempt deliberate large fixtures from 2MB limit Pre-existing failure: the "git tracks no files larger than 2MB" test caught browse/test/fixtures/security-bench-haiku-responses.json (28.8MB of replay data committed in v1.6.4.0 for security benchmark gate tests). The test exists to catch accidentally-committed binaries (Mach-O dist binaries, etc), not to forbid all large files. Add an explicit LARGE_FIXTURE_EXEMPTIONS allowlist so deliberate replay fixtures pass the gate while accidental binaries still fail. Co-Authored-By: Claude Opus 4.7 (1M context) --- test/skill-validation.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/skill-validation.test.ts b/test/skill-validation.test.ts index ecbd81e5..5bedeb24 100644 --- a/test/skill-validation.test.ts +++ b/test/skill-validation.test.ts @@ -1623,7 +1623,14 @@ describe('no compiled binaries in git', () => { test('git tracks no files larger than 2MB', () => { // Pure fs.statSync — no shell spawn per file. const MAX_BYTES = 2 * 1024 * 1024; + // Exempt fixtures that are deliberately tracked at large size (security + // benchmark replay data). Add additions to this list with a justification + // in the test review trail. + const LARGE_FIXTURE_EXEMPTIONS = new Set([ + 'browse/test/fixtures/security-bench-haiku-responses.json', + ]); const oversized = trackedFiles.filter((f: string) => { + if (LARGE_FIXTURE_EXEMPTIONS.has(f)) return false; const full = path.join(ROOT, f); try { return fs.statSync(full).size > MAX_BYTES;