Public: anyone can read this; the crew can change it.
Full suite red: test/boot-production.test.ts #14015
Check · Review · Land · Live done — Landed and live in production.
test/boot-production.test.ts no longer fails when the machine is loaded. I changed only the test, not main.ts. The file passes here (6 of 6).
shipped production is serving it deploy 4adf612
test/boot-production.test.ts no longer fails when the machine is loaded. I changed only the test, not main.ts. The file passes here (6 of 6). I did not run --rerun-each 10, and I could not reproduce the failure under load in this sandbox. scripts/gate.ts --fix and bun x tsc --noEmit came back clean.
Cause: in the failing run the main thread was blocked for about 2.5 s while the full suite ran files side by side. The boot did not log "forge is up" until about 8 s after it started. The test held the child for 8 s, saw /healthz answer 200, and copied the output at that moment, before the rest of the boot had logged. Three assertions then failed on missing lines. They were "forge is up", "engine shape: one thread serves and works", and "the engine is up" for the worker boot.
Change: before a boot's output is taken, the test now waits up to 30 s for "forge is up". For the worker boot it also waits up to 10 s for "the engine is up" or "the engine's Worker is given up". It stops waiting at once if the child exits. The beforeAll timeout went from HOLD_MS + 60_000 to HOLD_MS + 90_000 to cover the extra wait. All the assertions are unchanged, so a boot that never finishes still fails.
Nothing more to change. The owner reports the full suite green again on main (e5f3b40), which was green without my change, so the failure was a flake under load. The branch already holds the fix, in test/boot-production.test.ts: the test now waits for the boot's closing lines ("forge is up", and for the worker boot the engine's start line) before it reads the output, instead of stopping at the first /healthz answer. That change is pushed, and I have made no further edits.
Test-only change with no UI, input, auth, terminal or README impact. It waits for the boot's closing lines ("forge is up", and the Worker start line for the worker boot) instead of stopping at the first /healthz 200. It exits early if the child dies, and the assertions are unchanged, so a boot that never finishes still fails. The deadlines (30 s plus 10 s) fit inside the raised beforeAll timeout (HOLD_MS + 90 s). Two things I would do next: (1) fold the two copy-pasted polling loops into one small waitFor(predicate, ms) helper; the for (const waited = ...; cond; ) with an empty update clause is hard to read. (2) Run bun test --rerun-each 10 on this file under load; the fix is reasoned from the log and was not reproduced.
test/boot-production.test.tsno longer fails when the machine is loaded. I changed only the test, notmain.ts. The file passes here (6 of 6). I did not run--rerun-each 10, and I could not reproduce the failure under load in this sandbox.scripts/gate.ts --fixandbun x tsc --noEmitcame back clean.Cause: in the failing run the main thread was blocked for about 2.5 s while the full suite ran files side by side. The boot did not log "forge is up" until about 8 s after it started. The test held the child for 8 s, saw
/healthzanswer 200, and copied the output at that moment, before the rest of the boot had logged. Three assertions then failed on missing lines. They were "forge is up", "engine shape: one thread serves and works", and "the engine is up" for theworkerboot.Change: before a boot's output is taken, the test now waits up to 30 s for "forge is up". For the
workerboot it also waits up to 10 s for "the engine is up" or "the engine's Worker is given up". It stops waiting at once if the child exits. ThebeforeAlltimeout went fromHOLD_MS + 60_000toHOLD_MS + 90_000to cover the extra wait. All the assertions are unchanged, so a boot that never finishes still fails.Closes #14013