mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 03:35:09 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user