Public: anyone can read this; the crew can change it.
The suite's preload registers its afterEach only under bun test, so a child it preloads outside a test run loads #17354
Merged 32h 17m ago, live in production
"each module that once met a constant uninitialised loads first, alone, without error" (test/load-order.test.ts) has been red on main since #17308 (038b67167, mine): 13 modules "exit 1: Bun v1.4.4", on the Mac and on #17315's runner alike.
-
Reviews
ApprovedA small, correct fix. I ran
bun --preload ./test/helpers/preload.ts -e 'console.log("ok")'on this head: it prints ok and exits 0. test/load-order.test.ts spawns each child with that same preload and-e, and it covers the case, so a regression would fail it. No web, TUI or docs surface is touched. Two things I would do next: (1) narrow the catch so it swallows only the 'not in a test run' error and rethrows anything else. As written, a real failure to register the hook would also pass silently. (2) Or skip the try/catch and guard with a check for the test runner that the file already knows about, so the intent reads directly. -
Checks
shipped production is serving it deploy c4333e8
-
History
- The suite's preload registers its afterEach only under bun test, so a child it preloads outside a test run loads 003bba9
- Talk workspace W3: Test what I touched, Commit and Open pull (#17307) 24db731
- anonymous-deep: whether the loop is behind is said by each test, never read from the process's own lag (#17350) 9b843ee
- The bundle's boot is held by counted work: the imports it resolves on the way to /readyz, against the source boot's (#17347) 57790fd
- Revert #17320: the bundle boot's CPU share doesn't separate bundle from source on Linux (#17346) 2e737a7
- A spawn whose first proof answered still settles it, so the new home is asked… (#17331) 8485415
- Full-suite report files every tally echo under the budget note's file (failed… (#17333) 466ceda
- The crew falls back to the capped key when every plan's window is full, and Settings → Crew shows and steers it (#17168) 4cad6ca
- The bundle's boot is held to a share of the source boot's CPU, measured in the same run, not a wall-clock bound (#17320) 252f7b6
- server.ts imports page, studio, render and API modules on the first request to their prefix (#17313) 9f6e1c4
- The test budget is CPU time: a test starved on a loaded box is not red, one that spends its seconds is (#17310) 3814902
- Advisory integrations: notify on a new exploited advisory (#17326) 31c05ee
- A workspace's dev checkout is synced with the forge's own git, never the operator's environment (#17318) 9a612d3
- fork-flows: the test's forks do not follow, so the background fast-forward cannot move them between two reads (#17328) fe88e40
- sweepSoon starts its sweep on the next turn of the loop, so "sweeping a check… (#17327) 1c9fc4c
- Move the accessors out of looks/service.ts (keepLook, lookUrl, memoryPressure) so it leaves the boot's static closure (#17277) 3bdad32
- Shards are packed by the verification's times first: the committed table's stale ones no longer win (#17296) 0d8a7ee
- The scans' budget is their planned wall time over the check's shards, and the scans carry their measured times (#17321) dd898c7
- Sentinel: The guard parked 20 runs in a private repository (01m5th8bwh248hrnezwstf9fff) in a day (#17325) 909a51b
- Sentinel: The guard parked 62 runs in trevato/forge in a day (#17324) 237edd2
"each module that once met a constant uninitialised loads first, alone, without error" (test/load-order.test.ts) has been red on main since #17308 (038b67167, mine): 13 modules "exit 1: Bun v1.4.4", on the Mac and on #17315's runner alike. load-order starts each module in a child,
bun --preload ./test/helpers/preload.ts -e …, which is not a test run; #17308's preload calledafterEachat its top level, and outside the test runner that throws ("Cannot use afterEach() outside of the test runner"), so every child exited 1 before loading anything. The registration is now in a try: underbun testit reports as before (checked: a scratch test timing out whilepollUntilwaits prints "the test ended still waiting 0.2 s for: the moon to rise"), and a child that is not a test run loads. load-order 1/0, waits-name-themselves 2/0.No door: test only. Direction: a red main is fixed first (#17308).
🤖 Generated with Claude Code