Skip to content

fix(test): the artifact block's timeout belongs to the block, not one case (#542) - #546

Merged
SUaDtL merged 1 commit into
mainfrom
fix/542-artifact-block-timeout
Jul 29, 2026
Merged

fix(test): the artifact block's timeout belongs to the block, not one case (#542)#546
SUaDtL merged 1 commit into
mainfrom
fix/542-artifact-block-timeout

Conversation

@SUaDtL

@SUaDtL SUaDtL commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Reopens and completes #542.

What I got wrong the first time

#542 reported one timing-out case, so I measured that case and gave it a budget. It was the heaviest in the file — 12 tasks at FARM_CONCURRENCY 6 — and the numbers were real:

isolated, developer box 3553 ms against a 5000 ms default
under load, CI runner 5331 ms

But the rest of the block stayed on the default, and on the next PR seven cases in it timed out together on windows-latest, turning the ca coverage-union cell red again.

The actual cause

The slow thing was never that case's concurrency. Every case in farm artifact publication launches real farm subprocesses, and process creation on a hosted Windows runner is far slower than on a developer box. The heaviest case simply crossed the line first.

Sizing from the one case the report named was always going to find the next-slowest case next.

The fix

The budget belongs to the block. The redundant per-case timeout is removed — two sources of truth for one budget is how they drift apart.

30s remains ~6× the slowest measured run and is still bounded, so a genuine hang fails rather than sitting until the job timeout. The cases themselves are untouched: FARM_CONCURRENCY stays 6 and every assertion stands (#515 AC-4, #542 AC-2).

Verification

farm.test.ts 45 passed, typecheck clean. farm.js rebuilds unchanged and the payload gate confirms no shipped payload change, so no version bump.

The real proof is this PR's own Coverage union <os: windows-latest> cell, which is what caught the incomplete fix.

… case (#542)

Second pass. My first fix sized the budget from the ONE case #542 named - the
heaviest, 12 tasks at FARM_CONCURRENCY 6 - and left the rest of the block on the
5000ms default. SEVEN cases then timed out together on windows-latest, and the
ca coverage-union cell went red again on the very next PR.

The slow thing was never that case's concurrency. It is that EVERY case in this
block launches real farm subprocesses, and process creation on a hosted Windows
runner is far slower than on a developer box. Sizing from the one case the report
happened to name was always going to find the next-slowest case next.

Budget moved to the describe block; the redundant per-case timeout is removed,
because two sources of truth for one budget is how they drift apart. 30s remains
~6x the slowest measured run and is still bounded, so a genuine hang fails rather
than sitting until the job timeout.

Test-only: farm.js rebuilds unchanged and the payload gate agrees, so no version
bump.

Claude-Session: https://claude.ai/code/session_01WJgVfZw7J81PB7mwpHyUxx
@SUaDtL
SUaDtL merged commit d0d02e0 into main Jul 29, 2026
39 checks passed
@SUaDtL
SUaDtL deleted the fix/542-artifact-block-timeout branch July 29, 2026 14:37
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.

1 participant