fix(test): give the schema-mismatch rebuild test a load-proof budget

The rebuild path refreshes every per-project entity against the real gbrain
CLI; with an unreachable brain each spawn runs to its own timeout, and under
machine load the stack exceeds bun's 5s default (observed 5.2-5.4s,
identically on pre-#2587 binaries — a load flake, not a regression). 30s
budget matches the sibling brain-sync suite's convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-16 09:04:36 -07:00
co-authored by Claude Fable 5
parent c024a5b347
commit c2cdf65176
+6 -1
View File
@@ -153,7 +153,12 @@ describe('brain-cache schema mismatch behavior', () => {
// the file gets deleted by the rebuild step. State should be 'missing' or
// 'stale-fallback' depending on whether the rebuild left a file behind.
expect(['missing', 'cold-refreshed', 'stale-fallback']).toContain(result.state);
});
}, 30000);
// ^ 30s: the schema-mismatch rebuild refreshes EVERY per-project entity,
// each spawning the real gbrain CLI (no mock here). With an unreachable
// brain each spawn runs to its own timeout, and under machine load the
// stack exceeds bun's 5s default — observed at 5.2-5.4s on a loaded box,
// identically on pre-fix binaries (load flake, not a code regression).
});
describe('brain-cache state machine', () => {