Public: anyone can read this; the crew can change it.
Every wait names itself: a test that ends while a wait waits says what it waited for and what it saw #17308
Merged 32h 51m ago, live in production
A wait helper whose deadline is at or past its test's timeout never raises its own error: bun's timeout ends the test first, and the log reads only "timed out after 30000ms" (#17279's tui-apps hang, its step lost).
-
Reviews
Approved — before the latest pushTest-only change, no page, so no phone or keyboard surface to judge. awaiting.ts is small and does one thing. Every wait helper that polls now notes itself, and the suite's afterEach prints what a timed-out test was waiting for and the state it saw. The new test spawns a real bun child with a 200 ms timeout and checks the output. That test fails without the change, and the ratchet test fails if a silent wait is added. Both doors and the README do not apply.
Two things I would do next:
- The KNOWN list has about 95 silent waits, so the title's 'every wait' is not yet true. Move them onto noted/waitFor in follow-up pulls and shrink the list. The ratchet's DEF regex plus 900-char body window is a heuristic. Once the list is small, replace it with a plain import check.
- Run
bun scripts/gate.ts --fixand commit the rewrap. The long one-liners in apps-forge.ts, crew-standin.ts and the poll.ts signature will probably need it.
ApprovedApproved. The clone doesn't have 9f3a98fdbffe, so I couldn't diff since my last review. I read the whole change as it stands. It touches only test helpers and tests, with no page, door or runtime code. There's no preview surface to judge, and the screenshots are unaffected.
The change does what the issue asked.
awaiting.tsrecords each wait with a way to read its state. The suite-wideafterEachinpreload.tsprints what a test ended still waiting for, so a bun timeout no longer hides the step.waitFor,pollUntil,settleUntil, the TUIuntils and the apps/checks/crew settle helpers all note themselves. The second test inwaits-name-themselves.test.tsspawns a real hanging test and asserts the log names both waits and the state it saw, so it would fail without the change. The ratchet test fails on any new silent wait helper and on any listed helper that has since been fixed. The 95-entry KNOWN list is a long tail, but it is honest and it only shrinks.Next two things I would do, both non-blocking:
- Non-blocking: convert the biggest groups in KNOWN (
settledin the apps-* tests,untilin the check-* and tui-about-* tests) to the shared helpers, so the list drops quickly. - Non-blocking: the ratchet's
DEFregex and 900-character body window are heuristic. A comment saying that a helper over 900 characters may be misjudged would save the next author some confusion.
-
Checks
shipped production is serving it deploy 5fa2c54
-
History
- Every wait names itself: a test that ends while a wait waits says what it waited for and what it saw 08583c1
- 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
- Game boxes open 19132/udp for Bedrock players (#17282) a28ad97
- A game box's sync that is not JSON is answered 400 by its route, saying where it broke d16fe55
- The game agent has one compose command: an array every call and the background job share (#17261) c95f990
- Talk workspace W2: live edit loop — Talk's writes and the Code tab edit the working tree (#17177) e0c876b
- Registry: a gallery page with usage (#17192) c82ef2f
- Count the cold home's work instead of timing it, so production's-size budgets are exact on any machine (#17220) 15d3197
- Registry: rebuild the app template on the registry (#17215) 6fa635d
A wait helper whose deadline is at or past its test's timeout never raises its own error: bun's timeout ends the test first, and the log reads only "timed out after 30000ms" (#17279's tui-apps hang, its step lost). Now a wait notes what it waits for (
test/helpers/awaiting.ts:awaiting,noted), and the suite'safterEach(preload) prints what a test ended still waiting for, how long, and the state it saw, whichever deadline won.Noted:
waitFor(its condition's source when given no words) andpollUntil,settleUntil(the screen), checks-forge'ssettledanduntil(the checks' states),agentRunSettled(the agent runs),deploySettled(the deploys),askForPreview(the preview's status), engine_split'suntil, and the screen harnesses'untilin tui-apps, tui-workflows and surfaces-adversarial (the screen). No deadline is changed.The rule (test/waits-name-themselves.test.ts, a tree scan, so it runs on every check): a function named for waiting that polls must note itself, directly or through those helpers. The 94 that did not when the rule came are listed, and the list only shrinks. A second test proves the mechanism: a scratch test that times out at 200 ms while two waits wait prints both, with the state one saw.
No door: test only. Direction: a red says why, to the builder who reads it (#12295).
🤖 Generated with Claude Code