Problem
tests/unit/TreeShaking.test.ts runs Bun.build four times across three test bodies, none of which declares a third argument, so all four run against bun's 5 000 ms per-test default. It is the same shape as #1392 — bounded work with no failure budget, sitting on the runner's clock — and it carries more exposure than the test that actually timed out.
It has not been observed failing. This is preventive, and filed at priority: low for that reason.
Evidence
Per-test durations, junit reporter, this worktree at a21ea07b, bun 1.4.0, Windows 11, idle machine:
| test |
isolated |
under --coverage |
package.json declares sideEffects: false |
0.6 ms |
0.6 ms |
importing Actor does not drag in the embedded DevTools UI |
66.5 ms |
19.4 ms |
the canary is a real one — the DevTools entry does carry the UI |
30.1 ms |
30.8 ms |
a narrow import is a rounding error next to the whole barrel |
109.7 ms |
75.7 ms |
The worst body is 109.7 ms against 29.1 ms for CoreStaticImports' failing test — 3.7x the exposure, on the same cap, with the same absence of a declared timeout. The multiplier that took 29.1 ms to 6 723.89 ms would take 109.7 ms to roughly 25 s.
a narrow import is a rounding error is the worst because it builds twice (narrow and everything), and its narrow build compiles a source string byte-identical to the one importing Actor does not drag in the embedded DevTools UI already built — so one of the four builds is pure duplication.
Proposed fix
The same remedy as #1392, for the same reason: hoist the builds to module scope, which carries no per-test timeout. bundleSize is async, so this needs top-level await — already used in the test tree at tests/integration/in-process/persistence/journals/NodeSqliteDriver.test.ts:22.
Hoisting also removes the duplicate build, taking four down to three, and the test bodies become assertions over precomputed bundles.
Explicitly not proposed: a third argument. Same argument as #1392 — that remedy is for a failure budget meant to expire and print a label, and a bundle build has none.
Acceptance
Related: #1392, #1376.
Problem
tests/unit/TreeShaking.test.tsrunsBun.buildfour times across three test bodies, none of which declares a third argument, so all four run against bun's 5 000 ms per-test default. It is the same shape as #1392 — bounded work with no failure budget, sitting on the runner's clock — and it carries more exposure than the test that actually timed out.It has not been observed failing. This is preventive, and filed at
priority: lowfor that reason.Evidence
Per-test durations, junit reporter, this worktree at
a21ea07b, bun 1.4.0, Windows 11, idle machine:--coveragepackage.json declares sideEffects: falseimporting Actor does not drag in the embedded DevTools UIthe canary is a real one — the DevTools entry does carry the UIa narrow import is a rounding error next to the whole barrelThe worst body is 109.7 ms against 29.1 ms for
CoreStaticImports' failing test — 3.7x the exposure, on the same cap, with the same absence of a declared timeout. The multiplier that took 29.1 ms to 6 723.89 ms would take 109.7 ms to roughly 25 s.a narrow import is a rounding erroris the worst because it builds twice (narrowandeverything), and itsnarrowbuild compiles a source string byte-identical to the oneimporting Actor does not drag in the embedded DevTools UIalready built — so one of the four builds is pure duplication.Proposed fix
The same remedy as #1392, for the same reason: hoist the builds to module scope, which carries no per-test timeout.
bundleSizeisasync, so this needs top-level await — already used in the test tree attests/integration/in-process/persistence/journals/NodeSqliteDriver.test.ts:22.Hoisting also removes the duplicate build, taking four down to three, and the test bodies become assertions over precomputed bundles.
Explicitly not proposed: a third argument. Same argument as #1392 — that remedy is for a failure budget meant to expire and print a label, and a bundle build has none.
Acceptance
Bun.buildcall runs inside atest()body.sideEffects: false; the narrow bundle must not containUiAssets; the DevTools entry must; and the narrow bundle must be under both 5 % of the full barrel and 50 000 bytes.ACTOR_TS_SKIP_FLAKY_MNS=1 bun run test:coverage:gate.Related: #1392, #1376.