Public: anyone can read this; the crew can change it.
Games: /forge reads are answered in the same sync, and the agent sends a request within a fifth of a second #18149
Merged 15h 14m ago, live in production
Part of #18028. Typing /forge status to seeing the answer took about 2.5 s (4.5 s worst): the agent's watcher (0.5 s), the next quick poll (up to 1 s), a second quick poll to bring the answer (up to 1 s), and the plugin's 1 s look. Measured from the code, not on a live box.
-
Reviews
Changes requested — before the latest pushOne high finding, two smaller.
- HIGH (src/games/agent.sh nap): nap returns at once whenever .desk.due exists. The only places that remove the mark are desk_take (line ~1412), reached when the mark exists AND desk_here is true (line ~2040). If the mark is left behind and the proxy is not running (stopped, restarting, or a request came just before it went down), light_sync takes the else branch (
echo '[]' >.sync.ask), the mark stays, and nap skips its sleep. wait_polling then counts LIGHT_EVERY of wait per iteration without waiting, so the agent fires light polls at the forge back to back until the full sync. Many boxes doing this is load on the forge. Fix: clear the mark in the else branch of light_sync (or have nap rm it when it returns early) so one mark ends one nap. Add a test or a shell check for a stale mark with no proxy. - src/http/games_routes.ts:96: the full sync now awaits runChat on every call, not only when a request came. A slow chat or crew turn adds up to 250 ms to every full sync reply for every box. Await only when ask or chat is non-empty; keep void otherwise.
- Tests: only the light path is tested. Add one for the full-sync path answering a read in the same reply, and one that a slow runChat does not hold the reply past QUICK_MS. docs/features/games.md should state the new timing (a read is answered in the same sync; the agent sends within 0.2 s).
ApprovedRound check since af24d7143b6e. The new changes are the early-wake
napin agent.sh and two tests; I read them. Earlier asks:- A mark that the agent cannot carry no longer cuts the wait short. It is removed when the proxy is not running, and
napends early only whendesk_hereis true and the last poll succeeded. Met. - A failed poll is still waited out, and polls are at least 0.1 s apart. Met. The test
a poll that failed is waited out even with a request waitingcovers it. - A stale mark when the proxy is stopped is cleared. Met, with a test.
I found nothing new on the security side. The 250 ms
quicklyrace in games_routes.ts is bounded and swallows errors fromrunChat. Nothing user-written reaches the shell, and the agent's polling interval stays within what is configured. A sync-level test covers same-reply reads.Non-blocking: the
tmpcommit is in the history; squash it on merge if you can. - HIGH (src/games/agent.sh nap): nap returns at once whenever .desk.due exists. The only places that remove the mark are desk_take (line ~1412), reached when the mark exists AND desk_here is true (line ~2040). If the mark is left behind and the proxy is not running (stopped, restarting, or a request came just before it went down), light_sync takes the else branch (
-
Checks
shipped production is serving it deploy f698c54
-
History
- Test: the agent's wait is bounded with a request waiting; a scratch file is removed f0368e6
- Games: the agent's quick poll never ends its wait early for a mark it cannot carry 6266558
- tmp 69b07b7
- Test: a sync's answer left for the next test is cleared af24d71
- Games: a request taken in a sync is answered in the same reply, and the agent sends it within a fifth of a second 06fe761
- Access 1: one Principal for who is asking, an anonymous visitor included (#18060) c347b92
- Apps without a login 3: an app made on one device opens on another, as a file or a read-only link (#18079) 868ed93
- API routes the Apple app lacks: the arcade's games, an app's log, pausing a runner (#18075) cd50587
- Full suite red: test/talk-preview-frame.test.ts (#18098) 78d5a5f
- Post-quantum: the game agent's channel uses a hybrid key exchange (#18074) 2df3631
- Trace index backfill stands aside when the database is locked (the hold on v0.7.729) (#18082) 52a26e1
- Every new TLS socket must check the peer's certificate (a lint) (#18063) c09e592
- Post-quantum: one test proves every door negotiates a hybrid key exchange (#18064) f0fb2b5
- Post-quantum signatures and host keys: track ML-DSA, nothing to build yet (#18078) c265edf
- Sentinel: Crew runs in trevato/deal-clock keep failing at the push or the sandbox (#18076) a98d939
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:sh74wg48ib is past its budget: trevato/forge: "on production's size > a cold /map answers within a few passes over the runs" failed on 3 pulls in the … (#18070) c5a926e
- Traces 2: /traces lists every trace with facets and search (#18015) 1c60934
- Traces 1a: a trace index table, filled when a run or Talk turn ends and backfilled once off the serving thread (#18061) 35e4ee2
- Games: pin forge-velocity f7d5d4e72 (/forge words as you type, Yes and No to click, an answer shown once) (#18036) 0003ecb
- Merge pull request #18054 from sold/agent-rollback d6960b3
Part of #18028.
Typing
/forge statusto seeing the answer took about 2.5 s (4.5 s worst): the agent's watcher (0.5 s), the next quick poll (up to 1 s), a second quick poll to bring the answer (up to 1 s), and the plugin's 1 s look. Measured from the code, not on a live box.Expected: about 0.7 s for a forge-answered read.
Not shown: red-first and a green run. The vxrail gate did not open (load above 120), so the pull's check is the gate. New tests: test/game-door.test.ts (a read taken in a sync is answered in the same reply) and test/game-desk.test.ts (the wake). tsc was not run.
🤖 Generated with Claude Code