From e12b526e073a053ee19d59cc2e4aef1be49473ec Mon Sep 17 00:00:00 2001 From: Gergo Magyar Date: Sat, 30 May 2026 09:38:32 +0000 Subject: [PATCH] test(go): tighten O(n^2) tripwire budget 10s -> 5s (#1848 U3) The fixed path is ~250ms; a quadratic regression at 400 structs is ~25s. 5s keeps ~20x headroom over the fixed path while tripping a ~20x regression (vs the prior ~40x). Correctness is guarded separately by the U1 golden test, so this stays a pure perf tripwire. Co-Authored-By: Claude Opus 4.8 (1M context) --- gitnexus/test/integration/go-pipeline-benchmark.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitnexus/test/integration/go-pipeline-benchmark.test.ts b/gitnexus/test/integration/go-pipeline-benchmark.test.ts index 287a6456f..273424721 100644 --- a/gitnexus/test/integration/go-pipeline-benchmark.test.ts +++ b/gitnexus/test/integration/go-pipeline-benchmark.test.ts @@ -438,7 +438,7 @@ describe('Go scope-capture O(n^2) regression tripwire', () => { it('parses a 400-struct file in well under the O(n^2) tripwire budget', () => { const STRUCT_COUNT = 400; - const BUDGET_MS = 10_000; // coarse: ~40x the fixed path, ~3x under a quadratic regression + const BUDGET_MS = 5_000; // coarse: ~20x the fixed path (~250ms), trips a ~20x regression; a quadratic regression at 400 structs is ~25s const src = generateGoStructSource(STRUCT_COUNT); emitGoScopeCaptures(src, 'tripwire-warmup.go'); // warm up the parser/query JIT