From 9d4a75b558906a4c551dc7504cf68c8d7062b5f1 Mon Sep 17 00:00:00 2001 From: "gfargo-horizon-agent[bot]" <294710345+gfargo-horizon-agent[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 11:29:23 +0000 Subject: [PATCH] fix(tests): raise timeout for tree-sitter WASM cold-start tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI failed on macos-latest with the same commit that had passed twice before, timing out on the first two tests that pay the one-time web-tree-sitter Parser.init() cold-start cost — unrelated to the cache-hit-rate changes in this PR. Bump those two tests past Jest's default 5000ms so slower/loaded CI runners don't flake. --- .../default/__tree_sitter__/tsTreeSitterParser.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/parsers/default/__tree_sitter__/tsTreeSitterParser.test.ts b/src/lib/parsers/default/__tree_sitter__/tsTreeSitterParser.test.ts index 2a44015c..c1231863 100644 --- a/src/lib/parsers/default/__tree_sitter__/tsTreeSitterParser.test.ts +++ b/src/lib/parsers/default/__tree_sitter__/tsTreeSitterParser.test.ts @@ -43,6 +43,11 @@ describeWithWasm('treeSitterTsParser (.wasm-backed)', () => { }) it('names a top-level export function (matches regex output)', async () => { + // This is the first test to actually invoke the parser, so it pays + // the one-time WASM `Parser.init()` cold-start cost. That cost is + // usually well under a second, but can exceed Jest's default 5000ms + // timeout on a loaded/cold CI runner (observed on macos-latest) — + // bump the timeout rather than risk a flaky failure here. const diff = [ '@@ -1,1 +1,1 @@', '-export function legacyParse() {}', @@ -52,7 +57,7 @@ describeWithWasm('treeSitterTsParser (.wasm-backed)', () => { expect(out).toContain('Updated TypeScript `src/p.ts`') expect(out).toContain('parseRequest()') expect(out).toContain('legacyParse()') - }) + }, 20_000) it('classifies an arrow-function export as a function, not a const (regex miss)', async () => { // Regex extractor returns `const handler` for this line because @@ -68,7 +73,7 @@ describeWithWasm('treeSitterTsParser (.wasm-backed)', () => { expect(out).toContain('Updated TypeScript `src/api.ts`') expect(out).toMatch(/handler\(\)/) expect(out).not.toMatch(/const handler/) - }) + }, 20_000) it('returns undefined for body-only edits (no structural signal)', async () => { const diff = [