Public: anyone can read this; the crew can change it.
The spawn, boot, rehearsal and drill test files run under the test budget, by shape not deletion #12386
Check · Review · Land · Live done — Landed and live in production.
This pull makes four of the seven slow files in #12381 run in less than half the time, mostly by cutting real waiting. No assertion is deleted. The three spawn-cell files are not changed: they need bwrap/socat and unix sockets, which my sandbox skips, so I couldn't time or check any change to them.
-
Reviews
ApprovedApproved. The four changes shorten real waiting without deleting assertions, and the new
held > 0probe in boot-beside-peer keeps that test honest. TheticksandsettleMsseams are optional and default to the old behaviour. No user-facing surface changed. The work is only partly done: all seven boxes stay open. Next, two things. (1) Do the three spawn-cell files on a host that can run cells; scout found that spawn-cell-e2e repeats the first half of the recover run in spawn-small-cell, so merging them saves a child spawn. (2) Measure the four files on the gate box and put real numbers in the SLOW reasons in scripts/gate.ts. Those numbers are currently estimated from a local ratio. The four files are still over the per-test budget and stay on the SLOW list, so none of the boxes is met. Also, the comment at test/drill-400mb.test.ts:32 sits after the imports with no code it belongs to. Move it next to theticksdefinition, which already says the same. -
Checks
shipped production is serving it deploy 73c1fa5
-
History
- SLOW: the drill, roll rehearsal, boot-beside-peer and handover reasons say what shrank them (#12381) e0fd927
- The release handover's push trickles over 8 s, not 30 (#12381) 766f1d7
- Boot beside a peer: a 10 s peer, probes ending a second after it exits, and a count proving some ran under its lock (#12381) da56f59
- The real roll rehearsal ends a second after the old forge exits, not at 30 s (#12381) f38f8a9
- The 400 MB drill moves an injected clock by the wire time instead of sleeping it (#12381) ffd98cb
- Health's ok means the forge is serving: each need is marked broken or todo, and only broken makes ok false (#12222) 405fa2a
- A look's browser profile, a replaced deployment's checkout and a run's temp directory are removed off the serving thread e8d1618
- The watch reads its process trees off the serving thread, once for all of them, from a tree's cgroup where it has one 9d6fc71
- Confine ANTHROPIC_* and CLAUDE_CODE_* env construction to the runner module (#12293) 5595b9f
- Every cookie the forge sets is HttpOnly, SameSite and Secure behind TLS, and a test lists them all (#12340) 84c60a0
- A small pod keeps room for the forge: a cell gets the pod's memory less the forge's own (#12354) b070674
- A site admin's health names a broken cost-ledger chain, from a verdict kept at boot and once a day (#12281) da65c36
- A pull's latest check reads as plain text at /<owner>/<repo>/pulls/<n>/check.txt for anyone who can read the pull (#12226) 309b41e
- Keying kept results reads each file once a run, not once a test (#12178) 78f82e5
- A verification cut off by a restart or by its budget is asked again of main's tip, not of the commit it began on (#12178) 2aec53f
- Automate a review finding as a lint or test: Screenshots: the pull has no before/after of the open prompt in light and dark ( (#12364) dc8790b
- Cost ledger: the chain is committed to git in signed batches, so another forge can verify it (#12282) 45be4c2
- Every open route answers with the security floor, 404s and errors included, proven by one test over the route table (#12339) 4ad7a6a
- The full gate is red over the test budget, with SLOW filled from the gate box's own times as read in the pull's check log (#12229) ef63cd6
- Group the home's per-app reads (Later gate, per-repo issue counts) so a cold / is fast (#12311) a9b30ef
This pull makes four of the seven slow files in #12381 run in less than half the time, mostly by cutting real waiting. No assertion is deleted. The three spawn-cell files are not changed: they need bwrap/socat and unix sockets, which my sandbox skips, so I couldn't time or check any change to them.
| File | Before → after (local, whole file) | What changed |
|---|---|---|
test/drill-400mb.test.ts | 52 s → 12.6 s | runDrill gets an optional ticks clock (defaults to performance.now; added in src/snapshot/drill.ts). The throttled store now moves that clock forward by the wire time instead of sleeping through it. The phases still record the full wire time, so the "download takes at least the wire time" assertion still holds. |
test/rehearsal-real.test.ts | 73 s → 29 s | RehearsalArgs gets an optional settleMs: the requests stop that long after the old forge exits, with seconds as the upper limit. The test passes 1000 ms. Running scripts/rehearse-roll.ts by hand still behaves as before. Most of what is left is the time each real forge takes to boot (about 4.5 s). |
test/boot-beside-peer.test.ts | 36 s → 16 s | The peer holds the lock for 10 s instead of 20 s, and the healthz probes stop a second after the peer exits rather than a fixed 20 s after the forge is up. A new assertion checks that at least one probe ran while the peer still held the lock, so a slow boot can't make the test pass without testing anything. |
test/release-handover.test.ts | 36 s → 15 s | The in-flight push is sent over 8 s instead of 30 s. That still covers the new forge starting, the old one's drain starting and more than 100 health requests. |
In scripts/gate.ts, only these four SLOW entries changed. Each reason now says what shrank it, the old gate-box time and an estimated new time per test. I worked out the new times from the local before/after ratio because I can't measure on the gate box. All four are still over the 2 s per-test budget, because they boot real processes or pack 400 MB, so they stay in the list. scripts/test-times.json has no entry for any of these files, so it is unchanged.
Not done:
- The three spawn-cell files (
spawn-small-cell,spawn-cell-e2e,spawn-cell) — #12381 stays open for them. One finding for whoever takes them: the run behindspawn-cell-e2e(test/helpers/real-spawn-e2e.ts) does exactly the first half of therecoverrun inspawn-small-cell. Moving e2e's four checks into the small-cell test would save a whole child spawn, but it needs a host that can run cells. - The issue plan and estimate tools (
keep_plan,estimate) weren't available in this session, so the issue's plan wasn't updated and no estimate was recorded.
Checks run: bun scripts/gate.ts passes, bun x tsc --noEmit passes, and the four changed files plus test/gate*, test/drill* and test/rehearsal* all pass (142 tests). To try it: bun test test/drill-400mb.test.ts test/rehearsal-real.test.ts test/boot-beside-peer.test.ts test/release-handover.test.ts.
🤖 Generated with Claude Code
Left #12381 open: 7 unticked items remain (test/spawn-small-cell.test.ts (33 s); test/spawn-cell-e2e.test.ts (25 s); test/spawn-cell.test.ts (22 s); …).
This pull makes four of the seven slow files in #12381 run in less than half the time, mostly by cutting real waiting. No assertion is deleted. The three spawn-cell files are not changed: they need bwrap/socat and unix sockets, which my sandbox skips, so I couldn't time or check any change to them.
test/drill-400mb.test.tsrunDrillgets an optionalticksclock (defaults toperformance.now; added insrc/snapshot/drill.ts). The throttled store now moves that clock forward by the wire time instead of sleeping through it. The phases still record the full wire time, so the "download takes at least the wire time" assertion still holds.test/rehearsal-real.test.tsRehearsalArgsgets an optionalsettleMs: the requests stop that long after the old forge exits, withsecondsas the upper limit. The test passes 1000 ms. Runningscripts/rehearse-roll.tsby hand still behaves as before. Most of what is left is the time each real forge takes to boot (about 4.5 s).test/boot-beside-peer.test.tstest/release-handover.test.tsIn
scripts/gate.ts, only these fourSLOWentries changed. Each reason now says what shrank it, the old gate-box time and an estimated new time per test. I worked out the new times from the local before/after ratio because I can't measure on the gate box. All four are still over the 2 s per-test budget, because they boot real processes or pack 400 MB, so they stay in the list.scripts/test-times.jsonhas no entry for any of these files, so it is unchanged.Not done:
spawn-small-cell,spawn-cell-e2e,spawn-cell) — #12381 stays open for them. One finding for whoever takes them: the run behindspawn-cell-e2e(test/helpers/real-spawn-e2e.ts) does exactly the first half of therecoverrun inspawn-small-cell. Moving e2e's four checks into the small-cell test would save a whole child spawn, but it needs a host that can run cells.keep_plan,estimate) weren't available in this session, so the issue's plan wasn't updated and no estimate was recorded.Checks run:
bun scripts/gate.tspasses,bun x tsc --noEmitpasses, and the four changed files plustest/gate*,test/drill*andtest/rehearsal*all pass (142 tests). To try it:bun test test/drill-400mb.test.ts test/rehearsal-real.test.ts test/boot-beside-peer.test.ts test/release-handover.test.ts.🤖 Generated with Claude Code
Closes #12381