Public: anyone can read this; the crew can change it.
Games: hear what players do, say why it failed, heal what is safe, answer commands in seconds #17612
Merged 13h 19m ago, live in production
Games now hear kicks, failed joins, commands and starts, and say a repeated cause once with its fix. A console command now answers in about a second at the forge/agent, not 20 s. tsc, bun scripts/gate.ts --fix and the games tests pass; I did not run the full suite or check the page and terminal by eye.
-
Reviews
Changes requested — before the latest pushChanges needed in one round.
- (high, availability)
wait_pollingreturns as soon as one light poll fails, and the main loop then runs a full sync at once. While the forge is down or restarting, every game box runs a full sync (asking every container over docker, up to a 20 s curl) about once a second. When the forge comes back that is a herd of full syncs from every box. A failed light poll must keep waiting out the rest of EVERY (or back off), not end the wait. - The issue asked for healing what is safe and for finding why
opleft no ops (item 8). Neither is done, and the pull says so. Either do the safe heal (e.g. refresh the people lists after a successful op) or open and link issues for them and state that this pull does not close the issue. - (medium) Cause matching misleads:
client-modsis tested first and matchesforge,fabric,modanywhere in a reason, so 'You are banned: modded client' or a whitelist message naming the server gets the mods fix. Order by specificity (whitelist, banned, full, version before mods) and anchor the mod words to the known phrases. - (medium)
not-opflags every OP_ONLY command as soon as the ops list is empty or not yet synced, so a fresh box shows false findings at once. Only count it once the ops list has been read. - Design: the finding is a
.noticebox of<p>with<br />inside the People block, not rows. Show each finding as arowin arowList(principles 6 and 7), and say the fix once (principle 1). - Validate FORGE_GAME_LIGHT_EVERY as an integer >= 1 so 0 cannot busy-loop.
The terminal and tool doors, the docs section and the parser tests are in place; the 3 s timing test depends on wall-clock sleeps, watch it for flakiness.
Approved — before the latest pushSince my last review (df15e892f was an empty commit; the real changes are 4bdca86a3): the failed light poll now waits out the rest of EVERY, so no full-sync storm in an outage. Cause order is specific-first, with mod words anchored and a test. not-op waits until the lists are read, with a test. Findings are rows in a rowList with the fix said once. FORGE_GAME_LIGHT_EVERY is validated. Log text is escaped in the page and only selects a cause from a fixed list, and the light sync path keeps the box-token check and the shell audit. Both doors and docs/features/games.md are covered; README is untouched. Non-blocking: healing and the missing ops after a successful op are not built; they are tracked in #17617 and #17618, and the pull must not close #17610. Non-blocking: the
fullandversioncause patterns are broad (a barefullorversionanywhere in a kick reason); consider anchoring them to the server's own phrases later.Approved — before the latest pushSince 4bdca86a3: the only change of this pull's own is the merge of main, where the game's refusal-as-failure now comes from main's
outcomeOfand the branch keepsalreadyKeptfor retried syncs. That resolution keeps both sides' meaning, and the light sync's results go through the samerecordResults. The earlier asks are met: failed light poll waits out EVERY, cause matching is ordered with mod words anchored,not-opwaits for the lists, findings are rows, LIGHT_EVERY is validated. Healing and the missing-ops bug are split to #17617 and #17618, which is acceptable. Non-blocking: runbun scripts/gate.ts --fixand commit the rewrap of long comment lines.Changes requested — before the latest pushOne thing to fix first: the People block on the service page renders every finding twice (src/web/pages/games.ts lines 1191-1196 are the same rowList twice, a bad merge). It breaks principle 1 (nothing says itself twice) and the page is visibly wrong. Delete one copy and add a test that renders the block and counts one row per finding. Everything else I read since my last head (agent light poll, retry dedupe, findings cause order, not-op gating, /forge, the waker skip, narrowing findings to kicks and commands beside main's refusals) is fine. Earlier asks are met except this regression. Non-blocking: the 3 s agent timing test depends on wall-clock timing; keep an eye on it for flakiness.
ApprovedSince my last review the only change is the fix for the duplicated finding rows in the People block (src/web/pages/games.ts), plus a test that renders /games/mc/hub and counts each finding once. That earlier ask is met. No new findings on the changed lines. Non-blocking: the 3 s agent timing test depends on real time and could flake; keep an eye on it.
- (high, availability)
-
Checks
shipped production is serving it deploy 5fa2c54
-
History
- Games: the People block shows each kick or command finding once, not twice (a bad merge); a test renders the page and counts (#17610) 1b4f143
- Restore the cloud files to main's: the rewrap of comments this pull did not write is not part of the change 54abe50
- Merge main into mason/17610: kicks, commands and starts beside main's refused joins, wakes and Modrinth findings; one refusal read from the proxy's own log e1e32e1
- Merge pull request #17613 from sold/refused-joins b5d7344
- Merge pull request #17616 from sold/cloud-gaps 324663c
- Games: no page waits for Modrinth to say which mods a refused player misses (#17610) 4f86420
- Merge main into mason/17610-games-hear-what-players-do-say-why-it-fa 8a2846e
- 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
- Test: a refused join as Velocity 3.5.1 logged it for an unmodded client and a Fabric server with Waystones (#17610) e8ea268
- 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
- Games: a failed light poll waits out the rest of the interval; causes by specificity; not-op only once ops are read; findings as rows (#17610) 4bdca86
- 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
7 earlier comments
<!-- look-pages a64cf4755ea0 --> Look pages for a64cf47, 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
<!-- look-pages 5ca788f7696e --> Look pages for 5ca788f, from the gate:
look pages (none): "Looks: /games" is not a page of app.looks in forge.json; 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 replaced the Looks: /games line with a No look: line, as the gate allows, and pushed it as an empty commit (df15e892f). /games is not in app.looks in forge.json. A game server page also needs a box with a synced agent, and no look fixture has one. The commit message says that. No code changed, so I ran no tests.
Items 1, 3, 4, 5 and 6 are fixed and pushed (4bdca86a3). Item 2 is not: this pull still does neither the heal nor the ops fix, and it does not close #17610. tsc is clean and the gate passes. The findings, people and terminal tests pass (37 pass, 0 fail), but I did not run the full suite or the agent's 3 s timing test after these changes.
- 1. Failed light poll: it now waits out the rest of
EVERYand then returns, so an outage no longer causes a full sync about once a second per box. - 2. Healing and ops (item 8): I opened #17617 for the missing ops after
opand #17618 for healing, and I did not build either here. The cause of #17617 is unknown, and I chose not to guess at a fix. #18 needs a signal for a stuck wake that does not exist yet. - 3. Cause matching: whitelist, ban, full and version are tested before mods, and the mod words are anchored to the phrases Fabric and mod loaders use. A new test checks that "You are banned: modded client" gives a ban finding and a whitelist message naming Fabric gives a whitelist finding.
- 4. False
not-opfindings:not-oponly counts once the agent has read the lists, and a test covers the before-and-after. - 5. Findings as rows: each finding is a
rowin arowList, with the cause as the title and the fix said once. - 6.
FORGE_GAME_LIGHT_EVERY: it must be a whole number from 1 to 999, and anything else falls back to 1.
I did not change the timing test: it waits for the real agent to answer through a promise and no longer polls with a fixed sleep.
I merged main into the branch, resolved the one conflict in src/games/store.ts, and pushed.
Conflict: main had also made the game's refusals count as failures (That player does not exist and similar). It did this in src/games/outcome.ts, through outcomeOf, which also lists the closest player names seen on that server. My branch had its own version of the same thing in store.ts.
- What I kept from
main:recordResults, which callsoutcomeOf. The light sync now uses it too. - What I dropped: my
GAME_REFUSALregex andrefusedByGame, sincemain's covers the same case. - What I kept from my branch:
alreadyKept, the log dedupe that only runs when the agent says it is retrying a sync.
Checks:
tsc --noEmitis clean.- The 24 game test files pass (250 tests).
- The gate ran. It only notes six files with comment lines over 100 columns, and says the nightly rewrap handles them on
main. I did not run--fixand commit the result. - The test run logged denied calls to
api.modrinth.com, which the sandbox blocks. Nothing failed because of them.
I merged main into the branch, resolved the four conflicts and pushed. Type check and design lint are clean, and every game and MCP test I ran passes (1,561 tests). The forge's own check on the push has not reported yet. scripts/gate.ts --fix also rewrapped comments in 6 files, including some of main's cloud files, and I committed that with the merge.
main had meanwhile landed a second take on #17610: refused joins, wakes and stuck starts read from the proxy's log, a Modrinth lookup of the mods a refused player misses, and in-game replies telling them. It overlaps with what this branch does, so I kept both and made them fit.
- Refused joins:
mainowns them. I removed this branch's own proxy-refusal parsing fromsrc/games/metrics.ts, because it would have logged the same refusal twice. The test for it now checks the line is ignored there. - What this branch keeps: kicks with their reason, commands and starts as events, and
src/games/findings.tsfor kick and command findings (whitelist, ban, version, mods, not-op). I narrowed its query to kicks and commands so it no longer duplicatesmain's refusal findings. - Event wording:
main'seventWordsinsrc/games/people.tsis now the one place that words every event, including kick, command and start. The oldeventLineis gone. - Event kinds:
PlayerEventKindnow includeswakeandstuckas well. - Where findings show: the web page keeps
main's Findings block and this branch's rows under People. The terminal shows both lists. - MCP
gamestool: it returnsfindingsas this branch's kick and command findings, andrefusalsasmain's refusal findings. Nothing onmainread thefindingskey, so only the newrefusalskey is added. - Quick polls and
/forge: the quick poll, which answers a console command in seconds, and/forgetyped as a slash command merged without conflict. Both are still there.
Run /games/<box>/<server> on a box whose log has a kick, a refused join and a start. People should show the kick findings and the events; Findings should show the refusal findings.
🤖 Generated with Claude Code
The gate failed because my earlier --fix rewrapped comments in six cloud files this pull didn't write. I restored src/cloud/*, src/web/pages/cloud_tree.ts, test/cloud-inventory.test.ts and test/cloud-tree.test.ts to main's versions and pushed.
I re-ran bun scripts/gate.ts locally and it now passes, and bun x tsc --noEmit is clean. I did not re-run the tests, since this commit only reverts files to what main already has. The forge's check on the push has not reported yet.
The diff against main is now games files only. I left the long comment lines in src/games/metrics.ts, src/games/people.ts and src/games/store.ts as they were, since the gate says the nightly rewrap handles them.
The pull description from my previous message still applies.
🤖 Generated with Claude Code
Games now hear what players do and say why it failed, merged with main's work on the same issue (#17610). Kicks with their reason, commands and server starts become events. The same kick twice becomes one finding with its cause and a fix, and an operator-only command typed by someone who isn't an operator is a finding at once. Refused joins, wakes and the Modrinth lookup of missing mods come from main and are not duplicated here.
What changed
- Events:
src/games/metrics.tsturns kick, command and start lines into events. Passwords typed after commands like/loginare dropped. Refused joins are read only from the proxy's own log (src/games/player_events.ts), so one refusal is recorded once.eventWordsinsrc/games/people.tsis the one place that words every event. - Findings:
src/games/findings.tscovers kicks and commands only, with a fixed list of causes: whitelist, banned, full, version, client mods, timeout, not-op. A log line can only pick one of those causes; it never writes the fix. The not-op finding waits until the server's lists of operators have been read.main's refusal findings stay in their own Findings block. - Where they show: the web page lists kick and command findings once in the People block. The terminal and the MCP
gamestool show both kinds; the tool'sfindingskey holds the kick and command findings and a newrefusalskey holdsmain's. - Commands in seconds: the agent's quick poll returns console commands at once.
/forgetyped as a slash command is heard like!forge. The waker is never asked for a shell. - Review fix: the People block had each finding twice after a bad merge. It now shows each once, and a new test renders
/games/mc/huband counts each finding exactly once. That test fails on the old page.
What to look at: the narrowing in findingsOf and in parseLogLine, which keeps this branch's findings beside main's refusals rather than repeating them.
Not done: the agent timing test still waits 3 s of real time. It could become flaky; it has not failed so far.
Checks: gate, type check and design lint pass, as do test/game-findings.test.ts, test/game-player-events.test.ts and test/tui-games.test.ts. I did not run the dead-code and /llms.txt budget tests locally; the forge's check runs them.
How to try it: open /games/<box>/<server> on a box whose server log has the same kick twice, a refused join and a start. People shows the kick finding once and the events under Latest; Findings shows the refusal and its fix.
[{"go":"/games/<box>/<server>","look":"People block","expect":"each kick or command finding appears exactly once, with how many times, who, and the fix"},{"go":"/games/<box>/<server>","look":"Findings block","expect":"refused joins from the proxy log with their fix, separate from People"},{"go":"/games/<box>/<server>","look":"People → Latest","expect":"kicks read 'X was kicked: reason', commands 'X ran /cmd', starts '<server> started, ready in N s'"}]
🤖 Generated with Claude Code
Games now hear kicks, failed joins, commands and starts, and say a repeated cause once with its fix. A console command now answers in about a second at the forge/agent, not 20 s.
tsc,bun scripts/gate.ts --fixand the games tests pass; I did not run the full suite or check the page and terminal by eye.Healing is not done, and nothing in the log feed offers a fix as an action (see "Not done").
What changed, by number in the issue
/loginand/registerkeep their name but never what follows.src/games/findings.ts. It names the cause (a mod the player's client lacks, whitelist, ban, version, full, timeout, unknown, or a non-operator trying an operator command), how often and who, the last reason as logged, and the fix. A kick text only selects a cause from a fixed list, never the fix, and is shown escaped. A non-operator trying an operator command counts at once; every other cause needs two.gamestool'speople list(latest,findings) show the same events and findings.docs/features/games.mdhas a section on it.rconandpeoplecommands, with the answer kept./forgetyped as a command is heard like!forgeon Paper and Fabric, through the server's "issued server command: /forge" line. The agent's grep takes both.FORGE_GAME_LIGHT_EVERY) that carries only results and returns only commands. A new test runs the real agent against a fake forge and checks the command is answered in under 3 s, and that the waker is never queried.retryand the forge skips log lines it already holds. Only a retry is trusted to drop lines, so a line the game prints twice is kept.shinforge-wakerfor people, metrics and chat reads.Not done
op): I could not find a cause in the code, so I left it. Item 2 may account for it, but I did not check.Changed test:
test/game-metrics.test.tsasserted that the "Done (3.2s)!" line counts as nothing. It is now a start event, so I changed that line.To try: open
/games/<box>/<server>and look at People for kick reasons and a finding with its fix. Send a console command and watch it answer in seconds.I reused
parseLogLine,recordMetrics,game_player_eventandeventsOfrather than adding a second event store.🤖 Generated with Claude Code
Closes #17610