Public: anyone can read this; the crew can change it.
Games: a console command is answered at once, and a log line is kept once #17626
Closed 15h 38m ago
Part of #17610. Please do not merge yet: another small agent change lands and is released first. Log once: a batch of log lines goes under an id until a sync is answered, and the forge skips a batch it has.
-
Reviews
Changes requested — before the latest pushRead in full; the preview refuses a wrong bearer on /api/v1/games/agent/commands with 401, and the poll's auth, body cap, per-box single waiter and abort handling look right. One thing to fix, one to tidy.
- HIGH, a command can be lost:
sync_limit(agent.sh) cuts a sync to 5 s (was 20 s). The forge marks a command handed (handOut, store.ts) the moment it is in a reply, and the forge stores the sync before it answers. A sync the forge answers after 5 s (a loaded forge, a slow tunnel, a release starting) is dropped by curl, the commands in that reply are alreadyhanded_atand are never sent again, so a restart, world import, power verb or shell command silently never runs and stays pending. Logs and results are made idempotent by this pull; handed commands are not. Fix: either keep the sync's limit at 20 s (the lane poll already gives the fast path), or make a handed command that has no result after the sync that carried it was lost come back (hand out again anything handed but not done for longer than the agent's limit, and have the agent skip an id it already ran). Add a test where the first sync's answer is lost and the queued restart still reaches the box. - Tidy: in src/games/store.ts the new
import { wakeBox } from "./wake.ts"sits between../coreand../kernelimports; put it with the other local imports in the order the file keeps. Also docs/features/game-box.md names the agent's sync; if it describes the agent's loop or timeouts, state the poll and the new retry times there, so there is one place that says how the agent talks to the forge.
Note the owner's comment on the pull asks that it is not approved until the head changes; this review does not approve either way.
- HIGH, a command can be lost:
-
Checks
stopped closed without shipping deploy 040cc1d
-
History
- A game command whose answer never comes says "No answer came back; it may have run." (#17610) 040cc1d
- A game console or player command is answered in under a second, not two syncs later (#17610) 64ab3ea
- A game box's log line is kept once, whatever syncs time out (#17610) 1da1a98
- Merge pull request #17616 from sold/cloud-gaps 324663c
- Home: a stat tile's label stops before its sparkline, so "Shipped in 24 hours" is no longer drawn over on a phone (#17581) 59b8076
- An evicted check on a game box loses at most one shard, and a frozen job thaws if the player leaves soon (#17615) 2492b91
- Merge pull request #17620 from sold/game-outcome 2a44186
- The Asked column holds only what needs the owner's word; the crew's queue is one line, and an ask closes itself after seven days (#17559) 40f1d8f
- Test the cloud note on screen and ECS rows at both doors, and clean up after a failure (#17532) 8e73a4b
- The people lists are read right after an op, ban or whitelist typed on the console (#17610) 7afe537
- The game agent never enters the waker's container (#17610) a9ee2ec
- A player command the game server refused is failed, with the closest names seen on that server (#17610) c822b18
- Say a cloud project's note as a plain line, web, terminal and tool (#17532) 6ceafed
- Count a billed account's unread kinds in the headline, apart from the sum (#17532) c059c80
- Lead the headline's unread count to the account that names the kinds (#17532) ee3350f
- Count a resource page's own statements from rest (#17532) ed18981
- Say on a cloud account which kinds were not read, where and why (#17532) 6294957
- Say when R2 is not switched on, instead of asking for a permission (#17532) 7a2295c
- Keep cloud names as their owner wrote them (#17532) da23125
- Read ECS clusters, services and running tasks (#17532) 22ba2af
Closing this: #17612 is on main with a one-second poll that carries every kind of command, the owner's console included, and a second poll would be a duplicate. The one part it lacked, what a command says when no answer comes, is its own pull (sold/game-answer).
Part of #17610. Please do not merge yet: another small agent change lands and is released first.
Measured (a local stand-in, before the rebase on #17607): 16.7-18.3 s a command before, 0.33-0.37 s after. Release gap: a simulation of 6 s of hanging and 6 s of 502s. The first sync after the forge is back came 1.7 to 20.4 s after it before, and 1.2 to 4.0 s after in this branch's runs. Only the worst case improves; the usual one is about the same.
Old and new together: main's agent works with this forge, and this agent works with a forge whose poll answers 404. Both were run by hand; only the old-style sync has a committed test.
Tests (the builder's): tsc clean, gate 0, 31 files run one at a time, no failures; game-lend-box skips on a Mac and game-diag skips one.
Not run: this agent.sh on a real box, through the tunnel, or in Ubuntu since #17607.
Looks: /games No door: the agent's poll and the box's sync. Try: on a game server's console, type
list: the answer is there at once. A command the box never answered says so after two minutes.🤖 Generated with Claude Code