From 52a574fefcaebd9fb35655940452961f94fa85a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:58:38 +0000 Subject: [PATCH] test(ui): give the whole-tree comment-mask process case a measured budget The "exits 0 as a process" case spawns check-hand-rolled-comment-mask.mjs over the live tree and ran under the 15 s default testTimeout; queue runners measured it at 15.1 s and 19.1 s and timed it out. The case now carries a 60 s budget, and the spawn's own timeout (50 s) sits below it so a hung sweep fails the assertion as status null instead of on vitest's timer. Claude-Session: https://claude.ai/code/session_01ADHkmRH4UCX1tvddXMS7cq Co-authored-by: Claude --- .../__tests__/check-hand-rolled-comment-mask.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/scripts/__tests__/check-hand-rolled-comment-mask.test.ts b/ui/scripts/__tests__/check-hand-rolled-comment-mask.test.ts index 086f6c7e520..d64bac70126 100644 --- a/ui/scripts/__tests__/check-hand-rolled-comment-mask.test.ts +++ b/ui/scripts/__tests__/check-hand-rolled-comment-mask.test.ts @@ -64,8 +64,13 @@ const JSDOC_PAIR = `const bare = body.replace(${SLASH}${OPEN}${STAR}${ANY}${CLOS /** The exact projection `LineItemsPanel.parentIdNoCast-9333` carried before this card. */ const HYBRID_PAIR = `const out = src.replace(${SLASH}${OPEN}${ANY}${CLOSE}${SLASH}g, (m) => m).replace(${SLASH}${LINE}[^${B}n]*${SLASH}g, '');`; +// The whole-tree spawn measured 15.1 s and 19.1 s on queue runners, over the 15 s default (objectstack#34523). +const WHOLE_TREE_CASE_MS = 60_000; +// Below the case budget, so a hung sweep fails the assertion as `status: null`, not on vitest's timer. +const SPAWN_TIMEOUT_MS = 50_000; + function run(args: string[]): { status: number | null; stdout: string; stderr: string } { - const r = spawnSync(process.execPath, [SCRIPT, ...args], { encoding: 'utf8', timeout: 300_000 }); + const r = spawnSync(process.execPath, [SCRIPT, ...args], { encoding: 'utf8', timeout: SPAWN_TIMEOUT_MS }); return { status: r.status, stdout: r.stdout ?? '', stderr: r.stderr ?? '' }; } @@ -240,7 +245,7 @@ describe('this tree, today', () => { it('exits 0 as a process, which is what CI reads', () => { expect(run([]).status).toBe(0); - }); + }, WHOLE_TREE_CASE_MS); }); describe('wiring -- a gate nobody runs is indistinguishable from a gate that passes', () => {