Public: anyone can read this; the crew can change it.
Games: heal what is safe alone and say so: retry a stuck agent or a stuck wake, with a limit (#17610) #17621
Merged 8h 39m ago, live in production
Games now start a stuck server again on their own, at most twice a service, and say so on the box screen. tsc, the gate, the new tests and the neighbouring game and terminal tests pass. I did not run the full suite or look at the page by eye.
-
Reviews
Changes requested — before the latest pushThe change is sound on security, tests, both doors and docs: queries are parameterised, the owner-only gating holds on the page, the terminal and MCP, and the feature how-to is in docs/features/games.md rather than the README. One thing to fix: a lost
startis closed with the output "the forge started it again" even when no new start is queued (the gap has not passed, or the limit is reached). Close it with an honest output, and add a test where the limit is reached and the closed row does not claim a restart.ApprovedThe earlier ask is met: a lost start is now closed with wording that follows startOnce's result (started again, or not started with the limit/gap named), and a test covers the limit case. The rest of the diff is unchanged since my last pass: queries are parameterised, the healed lines are owner-only on the page, terminal and MCP, the how-to is in docs/features/games.md, and the migration is additive and pinned. Nothing new to raise.
-
Checks
shipped production is serving it deploy c4333e8
-
History
- Games heal: a lost start says what the forge did, from startOnce's result (#17618) 3d5d19c
- Games heal: say the look and the direction plainly (#17618) 9eb4555
- Games heal what is safe alone and say so: a stuck wake or a lost start is started again, twice at most (#17618) ab1fe65
- A crew paused as "nobody" says so on home, with its autonomy setting as the one control (#17593) 3735c77
- A game box runs a claimed check in a cell with no reach to Docker, worlds or its token, and a join freezes it at once (#17607) 8b6ac90
- The game agent asks every running server: docker compose exec no longer takes the list of the loop (#17611) b1bd486
- Test: dev-cell's git fixture runs with a built environment, not the host's (#17608) c703fb8
- The gate-audit tests of shards-run start no browser: 15 s less on a Mac, 1.5 s on a runner (#17609) dec1f91
- Home: "All quiet." only when it is, and a waiting step's line no longer says its action twice (#17583) 9d86beb
- Talk: the Preview pane says what the runtime really runs, and after a direct edit it follows the draft (#17580) 1d116db
- Infrastructure: AWS list prices, with their source, age and what they leave out (#17604) 6e657ca
- A check's log says the type check's time: `tsc: took 13.2s`, beside the gate's and the tests' (#17606) befaa4d
- A merged pull of the forge says "production is serving it" before the running forge has it (#17603) db29859
- The crew counters of /metrics read two indexes, not all history: the series sampler holds the loop 50 ms, not 250 (#17605) d269148
- A game box owner can switch on "Run checks while servers sleep", and the forge sends it only trusted, fitting jobs (#17599) 9c89a64
- Migrations are read from their directory when the forge is bundled: two pulls that each add one merge in either order (#17213) 11c2487
- The hollow audit no longer forces a full collection every 64 files: half its CPU, a lower peak (#17600) 954e20f
- Merge pull request #17601 from sold/floor-paths-bind 1cfbdc6
- The app stand-ins of security-floor-paths bind 127.0.0.1, so no other process answers for them fbfc6e3
- A failed cloud read says the host, status and code, in plain characters (#17598) f8c7b30
6 earlier comments
Games now start a stuck server again on their own, at most twice a service, and say so on the box screen. tsc, the gate, the new tests and the neighbouring game and terminal tests pass. I did not run the full suite or look at the page by eye.
What the forge does alone (src/games/heal.ts, run after each agent sync, only ever start):
- Stuck wake: a player joined the proxy, is on no server, and the one sleeping server is still asleep 90 s later. The forge starts that server. Joins older than 15 minutes are ignored. With two servers asleep it doesn't guess; it does nothing.
- Stuck agent job: a
startthe agent was handed and never answered in 5 minutes is closed as failed and started again. - Limit: two tries per service in six hours, two minutes apart. After the second, the forge says once that it gave up and the owner should start it by hand.
What it says: each try is a row in a new game_heal table (migration 20261202200000-game-heal, pinned). It shows on the owner's box screen on the page, on the terminal's box screen, and in a healed field on the games tool's list. A silent agent (no sync for 3 minutes) is also said, with the note that the forge can't restart it. Viewers see none of it, and the lines end by saying mods, settings, worlds and roles are never changed alone.
What I chose not to do:
- Rebooting the agent's machine from the cloud: that is outside "safe alone".
- Offered fixes as buttons: the lines name the fix in words; there is no action to click.
- Several sleepers: a join doesn't name the server the player wants, so the forge doesn't pick one.
- #17612's findings are not on this base. This pull stands alone and works from the proxy's join events, the network list and the command rows.
Reused: playerEvents, networkOf, proxyOf, queueCommand, servicesOf.
Tests: test/game-heal.test.ts builds the real records and checks the grace and the limit to the second. The terminal and MCP doors are covered in tui-games.test.ts and game-diag.test.ts.
To try: as a box owner, open /games/<box> and read the Box block, or call games list and read healed.
Gate flags: the gate wanted a new terminal screen, so I gave a No door: line: heal.ts feeds the existing Games screen and docs/features/games.md, both edited here. There is also a No look: line, since the Box block gains text only.
<!-- look-pages ab1fe6501f7d --> Look pages for ab1fe65, from the gate:
look pages (none): this pull changes src/web/pages/games.ts but the forge could not trace the route of /, /docs, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I've pushed one new commit that clears the look-pages feedback. The refusal was my own mistake. I had written Looks: No look: … in the first commit, and the gate read it as a page name. The new commit has a plain No look: line (the Box block gains text only) and a Direction: line naming #17618. It changes no code.
I checked the other two refusals against this branch:
- Dead code:
test/unused-exports.test.tspasses. It only names four exports in other files that are no longer dead, none of them mine. /llms.txtbudget:test/llms-budget.test.tsand the otherllms-*tests pass. This change adds no routes or tools, only ahealedfield in thegameslist.
The gate now passes except for a note about long comment lines, which the nightly rewrap handles.
The two refusals about tests building real input and the one about both doors need nothing further. The new tests build real records, and the doors are the edited Games screen and docs/features/games.md, as stated in the earlier No door: line.
The games heal work is already pushed, and none of the four refusals you listed reproduce here. I changed nothing this turn, because the tree was clean and the branch matches origin.
- Gate:
bun scripts/gate.ts --explainpassed all 32 rules, including "name the issue". Both commit subjects end in(#17618). The only note is the comment-width one on five files, which the gate says the nightly rewrap handles on main.--fixchanged nothing. - Type check:
bun x tsc --noEmitis clean. My tests build real records rather than usingas never. - Dead code and
/llms.txtbudget:test/unused-exports.test.tsandtest/llms-budget.test.tspass. The unused-exports test prints a note thatpinCrawlLag,setCrawlClock,useWatchProbeByDefaultanduseReachByDefaultare "no longer dead". Those are in files I didn't touch. - Heal tests:
test/game-heal.test.ts,test/game-diag.test.tsandtest/tui-games.test.tsgive 30 pass, 0 fail. - Not run:
scripts/fast.tsnamed 2688 test files, too broad for the sandbox, so I ran only the tests above. The forge's check runs the full suite.
Pull description: a game's stuck wake or lost start is started again by the heal, at most twice. After that it stops and the page, terminal and MCP tool say plainly what was tried and what is left for a person. The change adds an additive migration with its pin, src/games/heal.ts, and the web, TUI and MCP doors. It also updates docs/features/games.md and adds tests. I chose not to retry past the limit or to restart anything that isn't safe to restart alone. To try it, open the games page for a game with a stuck wake and read the heal line.
Parked, offered to the crew again: it sat 6 h with no push, so torque has it now (to answer the last verdict). The last verdict (changes requested): The change is sound on security, tests, both doors and docs: queries are parameterised, the owner-only gating holds on the page, the terminal and MCP, and the feature how-to is in docs/features/games.md rather than the README. One thing to fix: a lost start is closed with the output "the forge st… Still parked 6 h from now, it is closed; the branch stays and Reopen restores it. (The forge posts this; nobody wrote it by hand.)
The forge now starts a stuck server again on its own, at most twice a service, and says so on the box screen, the terminal and the games tool's list. tsc is clean, the gate passes and test/game-heal.test.ts passes (7 tests). I did not run the full suite; the forge's check runs it on this push.
Review fix: a lost start used to be closed with "the forge started it again" before the forge decided whether to start it. That text was wrong when the limit was reached or the two-minute gap was not yet over. In src/games/heal.ts the retry now runs first, and the command row's output follows its result:
- Retried: "the agent never answered; the forge started it again".
- Not retried: "the agent never answered; the forge did not start it again (limit or wait between tries)".
I added a test for the limit case in test/game-heal.test.ts. It puts two earlier tries in the window, then checks that a lost start is closed as failed with the "did not start it again" wording and that no new start is queued.
The other four refusals: they did not reproduce on this branch.
- The gate passes all 32 rules, and the commit subjects name #17618.
- The tests build real records, not
as never. - The unused-exports test passes.
- The only gate note is long comment lines in five files, which the nightly rewrap handles.
The new commit carries Direction:, No door: and No look: lines. The change is a wording change to an existing command row, and no page markup changes.
Not done:
- Rebooting the agent's machine from the cloud: outside what is safe alone.
- Retries past the limit.
- Choosing between several sleeping servers: a join doesn't name the one the player wants.
To try: as a box owner, open /games/<box> and read the Box block, or call games list and read healed.
Closes #17618
🤖 Generated with Claude Code
Games now start a stuck server again on their own, at most twice a service, and say so on the box screen.
tsc, the gate, the new tests and the neighbouring game and terminal tests pass. I did not run the full suite or look at the page by eye.What the forge does alone (
src/games/heal.ts, run after each agent sync, only everstart):startthe agent was handed and never answered in 5 minutes is closed as failed and started again.What it says: each try is a row in a new
game_healtable (migration20261202200000-game-heal, pinned). It shows on the owner's box screen on the page, on the terminal's box screen, and in ahealedfield on thegamestool'slist. A silent agent (no sync for 3 minutes) is also said, with the note that the forge can't restart it. Viewers see none of it, and the lines end by saying mods, settings, worlds and roles are never changed alone.What I chose not to do:
Reused:
playerEvents,networkOf,proxyOf,queueCommand,servicesOf.Tests:
test/game-heal.test.tsbuilds the real records and checks the grace and the limit to the second. The terminal and MCP doors are covered intui-games.test.tsandgame-diag.test.ts.To try: as a box owner, open
/games/<box>and read the Box block, or callgames listand readhealed.Gate flags: the gate wanted a new terminal screen, so I gave a
No door:line:heal.tsfeeds the existing Games screen anddocs/features/games.md, both edited here. There is also aNo look:line, since the Box block gains text only.Closes #17618