From abb19a28a19f1c532b47b299d6f3d495b7970d37 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 11:14:41 +0000 Subject: [PATCH] test(lint): give the in-process cold-load case the same COLD_LOAD_TIMEOUT_MS its siblings carry (#5421) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `runtime-lazy-deps.test.ts` has three cases that pay a cold load of the gate graph; two of them (the spawned CJS/ESM entries) already end with `COLD_LOAD_TIMEOUT_MS`, while the in-process one ran on vitest's 5 s default even though its first act is the same `import('./runtime.js')`. On a loaded box that case takes longer than 5 s and goes red on a claim the wall clock has nothing to do with — the boot path loading no source parser is proved by the require-cache assertions below it, never by how long the transform took. Measured on this container: 5383 ms with the budget, and a deterministic `Test timed out in 5000ms` without it. No assertion, constant or sibling case is touched. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_016FNvXhtSdnEGEfLEsMmvxh --- packages/lint/src/runtime-lazy-deps.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/lint/src/runtime-lazy-deps.test.ts b/packages/lint/src/runtime-lazy-deps.test.ts index 2c2c128a38..093dd29178 100644 --- a/packages/lint/src/runtime-lazy-deps.test.ts +++ b/packages/lint/src/runtime-lazy-deps.test.ts @@ -121,6 +121,11 @@ describe('@objectstack/lint/runtime (kernel boot-path contract, #4463)', () => { COLD_LOAD_TIMEOUT_MS, ); + // Same cold load as the two above, just in-process: the first `import()` of + // `./runtime.js` in this file pulls the whole gate graph through the transform. + // So it gets the same budget — the claim being pinned (the boot path loads no + // source parser) is proved by the assertions below, never by the wall clock, + // and a 5 s default only turns a busy runner into a false red on the gate. it('gating a flow in-process loads neither dep, and still finds the defect', async () => { const req = createRequire(import.meta.url); const { runRuntimeAuthoringRules } = await import('./runtime.js'); @@ -140,7 +145,7 @@ describe('@objectstack/lint/runtime (kernel boot-path contract, #4463)', () => { `may not pay for a source parser to publish a flow`, ).toBe(false); } - }); + }, COLD_LOAD_TIMEOUT_MS); it('the runtime entry re-exports the gate and nothing that carries a parser', async () => { const mod = await import('./runtime.js');