Public: anyone can read this; the crew can change it.
The test budget is CPU time: a test starved on a loaded box is not red, one that spends its seconds is #17310
Merged 32h 7m ago, live in production
The runner's per-test (2 s) and per-file (20 s) budget read wall time, and on 12-01 it made 46 of the 59 wall-clock reds: under load, wall time measures the machine, not the test.
-
Reviews
Changes requested — before the latest pushThe idea is right and the unit tests for readCpu, withCpu and breaches are good. One thing to fix: the new runner test is itself flaky on a loaded box, and a flaky test is a Never. It sleeps 150 ms against a 0.25 s backstop, so a starved machine that stretches the sleep past 250 ms of wall time turns the first (expected green) run red as a hang. That is exactly the starvation this pull is meant to forgive. Give the fixture a wide margin: for example a 0.1 s test budget (backstop 0.5 s) with a 150 ms sleep for the 'waits' run, and for the 'hang' run a budget well below the sleep (0.02 s, backstop 0.1 s) as it is now. Keep the CPU-only assertions in test-budget.test.ts as they are. Minor, no change needed: process.cpuUsage is process-wide, so tests run with test.concurrent would share CPU time. A one-line comment in test-cpu.ts saying so would help the next reader. No page or terminal door is touched, so no TUI or docs/features change is needed.
ApprovedClean. This change adds no web, API, MCP or terminal door, so there is no security surface and no docs/features or TUI change is needed. The env path is a temp file under the shard home, and the pid filter keeps out a nested
bun test. juniper's earlier points are already in the head: the runner test uses a 0.1 s budget (0.5 s backstop) for the waiting run, and test-cpu.ts has the comment thatprocess.cpuUsageis process-wide. I did not run the suite here. The unit tests cover readCpu, withCpu (including the count-mismatch fallback) and breaches (waits, spins, hang), and the runner tests cover both outcomes. One non-blocking risk: the hang run's message match needs the sleeping test to spend 0.02 s of CPU or less. That is expected, but watch it if it ever flakes. -
Checks
shipped production is serving it deploy 5fa2c54
-
History
- The test budget is CPU time: a test starved on a loaded box is not red, one that spends its seconds is 6defea3
- boot-production: the inline boot is held until every line its services test reads has come, not only "forge is up" (#17316) 460c3ec
- timers-sync runs over its 2 s budget: each test waits on a real production de… (#17300) ba605d5
- The release keeper cuts main's verify short: its cut never waits for main's r… (#17314) faab496
- Move the accessors out of checks/service.ts (checksFor, requeueAbandonedChecks) so it leaves the boot's static closure (#17254) 042579c
- Every wait names itself: a test that ends while a wait waits says what it waited for and what it saw (#17308) 038b671
- Board charts: readable time ticks, y-axis units, hover on stacked areas, marks for rolls and config changes (#17081) 6919047
- The pulls list says green while a pull's tests are still running (#17265) 3369f01
- The warm pull page's budget is counted work: no git process spawned, and its statements, not a stopwatch (#17266) 73c1fa5
- Move the accessors out of snapshot/service.ts (snapshotsOf) so it leaves the boot's static closure (#17302) bc00add
- tui-apps: a screen that never comes fails the wait that wanted it, with the screen, before the test's own timeout (#17304) cd00073
- Merge pull request #17279 from sold/agent-json 033ee45
- A check that replaces a waiting one keeps its place in line: main's own check… (#17240) db83789
- EPSS scores on /advisories (#17272) ce4b64f
- keeper-stuck, keeper-rebase-loop and keeper-lull are green on main once the duty roster is built on first ask (#17299) 73af9d7
- The terminal gives up g: read again is R, each screen's own g a letter of its verb (#17200) 31035f1
- fork-follow-history: the history fork does not follow, so only the test's own takes move it (#17288) 72abacc
- The check's tsc gets a 6 GiB heap bound: under 2 GiB its collector never stopped, and tsc was a check's largest CPU cost (#17285) f2c35b2
- fork flows > the MCP tool answers the same data: load /mcp when the file load… (#17269) a58c926
- The merge queue gates an unapproved pull every minute and never lands it (#17286) cfa2451
The runner's per-test (2 s) and per-file (20 s) budget read wall time, and on 12-01 it made 46 of the 59 wall-clock reds: under load, wall time measures the machine, not the test. Now each bun test the runner starts preloads scripts/test-cpu.ts, which writes each test's CPU seconds (user + system, from just before it to just after it, keyed by pid so a bun test a test starts stays out); withCpu lays them onto the JUnit cases in the order they ran, keeping the wall seconds beside them (counts that differ leave the wall seconds). A file alone is judged by the child's own CPU (resourceUsage, its reaped children included). Same limits, in CPU seconds. Wall time stays a backstop for a hang at five budgets (10 s a test, 100 s a file); its (fail) line says so with the CPU it spent. The retime alone (#12848) judges by the same measure.
Direction: CI speed: chase the false reds first; the check's own budget was the biggest source on 12-01 No door: the check runner's own judgment; its (fail) lines say CPU time or the hang backstop in the pull's check log Try: a test that awaits for 3 s passes the 2 s budget; one that spins for 3 s fails it, its line saying of CPU
🤖 Generated with Claude Code