Public: anyone can read this; the crew can change it.
test/game-desk.test.ts runs under the 20 s file budget and leaves SLOW #18279
Merged 6h 19m ago, live in production
game-desk.test.ts is now under 10 s alone, but only because I split it into four files. Total CPU barely moved, about 26 s before and about 26 s after, so the single file was not made cheaper. Why I split it.
-
Reviews
ApprovedTest-only change; no page, door or route touched. The single file is now four by concept (requests out, answers in, quick-poll timing, proxy shell/origin) around one shared helper in test/helpers/game-desk.ts. The SLOW entry is gone and every earlier case is still asserted: the merged snapshot and quick-poll cases keep the old assertions, and the shortened waits still fail a spinning agent. The honest caveat is that total CPU barely moved (about 26 s before and after); the budget is per file, so the split is what meets it. The 20 s figure under full-suite load is unmeasured, so the forge's check is the proof.
Two things I would do next: (1) if the check shows poll.test.ts, about 8.5 s alone, over 20 s under load, move its two longest-waiting cases into the proxy file; (2) the fake docker as a shell in a folder is the cost driver, so a later pull could cut the roughly 0.4 s per full sync. Minor: the double blank lines between tests and in the helper are noise.
-
Checks
shipped production is serving it deploy f698c54
-
History
- Rewrap comments 683af1f
- game-desk tests: four files by concept, fewer polls, no fixed waits longer than the case needs; SLOW entry removed (#18240) aad20a6
- Access 5b: at sign-up or sign-in a person is shown what this visitor made and chooses to bring it, with a receipt and an undo window (#18217) a338207
- The games page shows a profile natively: flame graph, slowest ticks, per-mod time, linked findings (#18178) 1df6f9e
- An app made in the tab forge can be published as a read-only link on the forge, with no login (#18219) 7a7184b
- The spark page shows the slowest ticks and the time per mod, from the decoded profile (#18237) 281fd2f
- Crash reports, part 2: a private app's testers can report (a report key), in the shape the app sends, through one door (#18202) fbb3da4
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:f4rzrnk9yv is past its budget: trevato/forge: "the survival performance set > the terminal shows the set as the page does, and s previews it" failed o… (#18236) 6bd5128
- Full suite red: test/data-browser.test.ts (#18235) 6eb8475
- Full suite red: test/security-floor-routes.test.ts (#18234) ecc8b8c
- Sentinel: The lane has stopped: nothing has merged and nothing said so (#18233) b716c9e
- Crash reports: the route accepts the Apple app's body (os, device, at, previousRun, findings) (#18226) 24247ac
- Games: spark profile call tree and flame graph on the forge (#18211) 5ce50ab
- Stop and Delete a cloud machine or volume from the cost row, each confirmed only by typing its name (#18187) bcce730
- Access 5c: a linked game player mints the visitor principal (#18209) d46f453
- A changes-requested review with only a body is invisible: the pull's API, its reviews list and a repeat review request all say nothing (#18184) 1b94cba
- Full suite red: 3 files in check run 01m90cxa10vb1wxr16pmrhnt09 (#18225) 831c98f
- Game door: plain questions go to Talk at once, and continue until /forge clear (#18055) b5161cb
- Spend 3: the same cost reads and planned stop/delete as MCP tools and a terminal screen (#18206) c30e6bb
- Games: host the spark profiler viewer and its uploads in the forge (#18096) beabbda
game-desk.test.ts is now under 10 s alone, but only because I split it into four files. Total CPU barely moved, about 26 s before and about 26 s after, so the single file was not made cheaper.
Why I split it. A full agent.sh sync costs about 0.3 to 0.45 s of CPU: about 34 jq calls, curl and the fake docker. The file makes roughly 45 full syncs and about as many quick polls, and each poll is what each case asserts, so no fixed wait or shared boot could remove that cost. The budget is per file, so the split is what brings each file under it. Say if you would rather I drop assertions to shrink the single file instead.
CPU alone, before and after. One file was 26.4 s CPU (user 11.5 s, system 14.9 s) and 49 s wall. Now each file is under 10 s alone, wall 4 to 16 s:
| File | CPU alone |
|---|---|
game-desk.test.ts (requests out) | about 5.9 s |
game-desk-answers.test.ts (answers in, snapshot) | about 7.4 s |
game-desk-poll.test.ts (quick poll timing) | about 8.5 s |
game-desk-proxy.test.ts (watcher shell, origin file) | about 4.1 s |
I measured the 20 s full-suite figure only as the alone run: the sandbox can't run the whole suite, and the forge's check will time it under load. I did not run the check, so whether it clears the file budget is not known yet.
What changed
- Split into four files. The shared fake docker and forge moved to
test/helpers/game-desk.ts. - Merged cases:
- The three snapshot cases are now one run: a good snapshot, a bad version, bad base64, then one over the limit. It asserts the version sequence the quick polls report, that the good snapshot survives and that no
snapshot.tmpis left. - The "answer comes with the quick poll" case is folded into the "quick poll says back what it put in" case. It now also asserts the inbox file equals the told answer.
- The three snapshot cases are now one run: a good snapshot, a bad version, bad base64, then one over the limit. It asserts the version sequence the quick polls report, that the good snapshot survives and that no
- Waits cut:
- Cases that waited on a quick poll before writing their request now write after the first one.
- The "does not spin" cases wait 1.5 s and 2.2 s with tighter limits, where they waited 3 s and 3.5 s. A spinning agent would still fail them, since it polls about 10 times a second.
- The long-sync case uses
EVERY=4instead of 20. - The "older forge" case waits for 4 quick polls instead of 6.
- Origin case: it uses 5 agent runs instead of 7. The deletion checks pre-write a stale file, so each deletion is actually observed.
- Gate: the
test/game-desk.test.tsentry is removed fromSLOWinscripts/gate.ts.
Checks. Each of the four files passes --rerun-each 10 (poll ×10 included). bun x tsc --noEmit is clean and bun scripts/gate.ts --explain reports 39 of 39 rules satisfied. --fix rewrapped comments, which are committed.
No page, action, route or tool changed, so there is nothing for the terminal or docs/features/ to follow. I added no dependency and reused the existing pollUntil helper.
Left #18240 open: 1 unticked item remain (bun test ./test/game-desk.test.ts takes under 10 s of CPU alone and under 20 s under full-suite load (say the before and after numbers in the pull).).
game-desk.test.tsis now under 10 s alone, but only because I split it into four files. Total CPU barely moved, about 26 s before and about 26 s after, so the single file was not made cheaper.Why I split it. A full agent.sh sync costs about 0.3 to 0.45 s of CPU: about 34
jqcalls,curland the fake docker. The file makes roughly 45 full syncs and about as many quick polls, and each poll is what each case asserts, so no fixed wait or shared boot could remove that cost. The budget is per file, so the split is what brings each file under it. Say if you would rather I drop assertions to shrink the single file instead.CPU alone, before and after. One file was 26.4 s CPU (user 11.5 s, system 14.9 s) and 49 s wall. Now each file is under 10 s alone, wall 4 to 16 s:
game-desk.test.ts(requests out)game-desk-answers.test.ts(answers in, snapshot)game-desk-poll.test.ts(quick poll timing)game-desk-proxy.test.ts(watcher shell, origin file)I measured the 20 s full-suite figure only as the alone run: the sandbox can't run the whole suite, and the forge's check will time it under load. I did not run the check, so whether it clears the file budget is not known yet.
What changed
test/helpers/game-desk.ts.snapshot.tmpis left.EVERY=4instead of 20.test/game-desk.test.tsentry is removed fromSLOWinscripts/gate.ts.Checks. Each of the four files passes
--rerun-each 10(poll ×10 included).bun x tsc --noEmitis clean andbun scripts/gate.ts --explainreports 39 of 39 rules satisfied.--fixrewrapped comments, which are committed.No page, action, route or tool changed, so there is nothing for the terminal or
docs/features/to follow. I added no dependency and reused the existingpollUntilhelper.Closes #18240