Skip to content

fix(test): give script-shelling measurement tests explicit 60s budgets (unblocks main) - #1321

Merged
mohidmakhdoomi merged 1 commit into
mainfrom
hotfix/1280-test-timeouts
Aug 1, 2026
Merged

fix(test): give script-shelling measurement tests explicit 60s budgets (unblocks main)#1321
mohidmakhdoomi merged 1 commit into
mainfrom
hotfix/1280-test-timeouts

Conversation

@waleedkadous

Copy link
Copy Markdown
Contributor

main is red — my test. Unblocks CI for every open PR, including #1320.

spec-1280-measurement-instrument.test.ts > honours PHASE_ITERS as a comparison constant
timed out at vitest's 5000ms default on a loaded CI runner (5,690ms). It passed on the
faster runner in #1319, which is why it landed.

Same class as #1302 (send-integration afterAll): tests that shell out to real scripts do
real work and need real budgets.

This was a latent failure, not a flake

On an unloaded machine these tests take 3.9–4.0s against a 5s budget — ~80% consumed
before any contention. The sibling test emits byte-identical output twice at the same commit
recorded 4,576ms in the same CI run; it was next in line regardless.

Scope

12 blocks in one file that invoke run() — 11 tests plus the beforeAll that populates the
shared measurement output. Identified by parsing the file for blocks whose body calls
run()
, not by eyeballing, so nothing that shells out was missed.

Non-shelling tests in the same file are pure fs reads and keep the default budget: a timeout
on a test that cannot be slow is noise, and would obscure a future regression in exactly the
tests that can be slow.

60_000 per the #1302 precedent. Nothing else is in the diff.

Follow-up, deliberately not here

The underlying cost is that measure-prompt-surface.sh spawns python3 once per file for
include expansion. Making that a single pass would cut seconds off every invocation. Worth
doing — not worth coupling to an unblock-main commit.

main is red: 'honours PHASE_ITERS as a comparison constant' timed out at
vitest's 5000ms default on a loaded CI runner (5,690ms). This blocks green CI
for every open PR. Same class as #1302 (send-integration afterAll): tests that
shell out to real scripts do real work and need real budgets.

Not a flake - a latent failure. On an UNLOADED machine these tests take
3.9-4.0s against the 5s default, i.e. ~80% of budget before any contention.
The sibling 'emits byte-identical output twice' hit 4,576ms in the same CI run;
it was next.

Scope: 12 blocks in one file that invoke run() (11 tests + the beforeAll that
populates the shared measurement output). Identified by parsing the file for
blocks whose body calls run(), not by eyeballing. Non-shelling tests in the
same file are pure fs reads and keep the default budget - a timeout on a test
that cannot be slow is noise.

60_000 per the #1302 precedent. Nothing else in the diff.

Follow-up, deliberately NOT in this hotfix: the underlying cost is that
measure-prompt-surface.sh spawns python3 once per file for include expansion.
Making that a single pass would cut seconds off every invocation. Worth doing;
not worth coupling to an unblock-main commit.
@mohidmakhdoomi
mohidmakhdoomi merged commit b2798f1 into main Aug 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants