test(ci): Windows budget-edge flake class — family ledger and rolling evidence
What this issue is
The rolling evidence home for the Windows CI budget-edge class: tests that die at ~5000ms against the default per-test budget on windows-latest while passing everywhere else. Successor to #2882, which was scoped to the @archon/workflows suite and correctly closed when that suite was fixed — the class itself is repo-wide and alive (all evidence from 28 Aug landed on the closed issue; see its comment thread from issuecomment-5451096794 onward).
Class definition and triage toolkit
A sample belongs here when the failure carries Bun's BODY-timeout string near the budget line. Two discriminators classify any Windows failure from CI logs alone:
- Body vs hook message (Bun 1.3.11): body overrun prints
this test timed out after Xms; a slow beforeEach/afterEach printsa beforeEach/afterEach hook timed out for this test. Note afterEach time is charged to the test's clock (removeTempTree retries can add ~450ms/root), and beforeAll has its OWN 5000ms ceiling — hoisting many spawns into one hook blows the hook. - Duration vs the test's own pass band, plus expect count: a failure inside the normal pass distribution failed at normal speed (not budget); the executed expect() count attributes the failure to a specific line.
Standing decisions (operator, 28 Aug)
- No runner change for now. The contention floor is accepted as environmental: one zero-subprocess 14ms-local test hit 5016ms on a runner, so a global stall can land on any test. Per-test spawn-cost reduction is the only active lever.
- Never fix by budget bump or Windows skip. If a test blows the budget, it is spending on something it shouldn't; remove the accidental cost (AGENTS.md rule). Irreducible one-spawn tests near the floor are declared runner-floor residual here, not surgically forced.
Family ledger
| Family | Location | Status |
|---|---|---|
| @archon/workflows suite timing | packages/workflows | FIXED — timing campaign + #2883 (original #2882 scope) |
| exec-code fixtures | packages/workflows fixture tests | FIXED — #2915 (setup owned 43%: per-test git repo construction → build-once + cpSync) |
| detached-owner shutdown | packages/cli specs | NOT this class — assertion/teardown failures, fully attributed and fixed (#2916 + e250a58b) |
| cli main-catch envelope | packages/cli cli.test.ts | FIXED — #2922 (test froze 383-file workflow source before failing name resolution → --dry-run) |
| migrate-state-dir C5 | scripts/migrate-state-dir.test.ts | RUNNER-FLOOR RESIDUAL — subprocess is 88% of body and IS the contract; attribution in the file's BUDGET docblock (#2922) |
| downloadWebDist | packages/cli/src/commands/serve.ts | REOPENED 28 Aug — recurred post-fix on PR #2923's windows leg (5016ms, dangling tar, ca8df725 verified ancestor of the failing head: issuecomment-5456532315). Pipe-side is closed with evidence; remaining suspects are filesystem-side (Defender scanning the extraction target). Prior pipe fix: #2928. Not a budget-edge sample after attribution: tar was killed as a dangling child (exit 143) after sitting 5s blocked on a stdin Bun never fed, while the pass band on the same runner image is 16–156ms. Bun.spawn(…, { stdin: <Uint8Array> }) leaves the parent owning the child's stdin, and on windows that pump can stall — an unbounded hang in archon serve, not test cost. Evidence: issuecomment-5453633121 |
Acceptance
This issue closes when every known family is FIXED or declared runner-floor residual with its attribution recorded, and no new family has appeared for a meaningful stretch of Windows runs. New samples: apply the toolkit, attribute to a family or open a new row, never just rerun-and-forget.
Source: coleam00/Archon