Public: anyone can read this; the crew can change it.
A machine agent that does not check in after its update goes back to the version before, and the forge says so #18483
Merged 3h 13m ago, live in production
A machine whose agent update was put back now says so on its /infra row. Most of this issue was already on main from #18019. The row display was the one missing piece.
-
Reviews
Changes requested — before the latest pushThe data path is right and the rest of the issue is on main already. Two of the three doors this pull adds have no test, and the row hides the reason in one state. Fix these in one round:
- Test the page.
data-agent-backis only checked atinfraOf. Render/infra(or the machine row) for the rolled-back box intest/infra-agent-back.test.tsand expectOn its old agent:plus the reason, and none for the healthy box. Without that, deleting the span would leave the suite green. - Test the terminal. Add the same check for the Infra screen's secondary line (
on its old agent: <reason>). - Show the reason on a failed row. On the web the span is only in the non-
clearbranch ofmachineRow, so a box that needs clearing drops it, while the terminal shows it. Put it outside the ternary so both doors say the same. - Keep the reason out of the terminal's single secondary line, or truncate it. It is up to 300 characters appended to one list line on a phone-width terminal.
Design: the row uses the existing meta spans, with no new class, no new accent and no border, so it holds to the principles. The preview has no registered machine, so I could not see the row render. That is why the page test matters.
Boxes 1, 2, 4 and 5 are met by what is already on main (
agent.sh.prev,rolledBack,test/game-agent-rollback.test.ts, the/api/v1/agent/v1/heartbeatroute). Box 3 is met in code, but it is not yet proven on the page.ApprovedEarlier asks are met: the reason now shows on a row that needs clearing too (the span sits outside the
clearternary), the terminal line is cut to 80 characters with an ellipsis, and the page and the terminal each have a test that fails without the change. The row uses the existing meta spans with no new class, it works with JavaScript off, and the reason is escaped by the html template. Boxes 1, 2, 4 and 5 are already on main from #18019 and #18475, and the row display was the missing piece. Two things I would do next. Non-blocking: add a page test for theclearcase, since the fixture never has one. Non-blocking: put a registered game box in the preview fixture, or name /infra in app.looks once there is one, so this row can be looked at. - Test the page.
-
Checks
shipped production is serving it deploy 5a6b787
-
History
- The old-agent reason shows on every machine row, cut to 80 characters in the terminal, with tests for the page and the terminal 65b27af
- Look pages: /infra needs a registered machine to show the row 925cab8
- Try: open /infra on the preview; a game box whose agent was rolled back shows "On its old agent:" in its row Looks: /infra 9c97719
- A machine whose agent update was put back says so on its /infra row, in the terminal and in the infra tool b1795b9
- One versioned agent protocol: heartbeat, claim, logs, result and containers, served beside the old sync route, with tokens scoped to their role (#18475) 9a6d9b3
- A test lists the doors that exist only as a tool or a Talk press; make a machine and mail setup get their pages (#18480) be45257
- A planner pass that opens nothing waits longer before the next: 20 minutes, doubling to 6 hours, until a person writes or an issue closes (#18471) 840ab71
- Minecraft is a kind: one kind interface, with the compose design and the console adapter behind it in one directory (#18468) 9745f39
- Telling the crew about an issue titled as a pillar umbrella sends no builder to it (#18470) 36c5d40
- An issue only the owner can do is assigned to the owner when it is filed, and no builder is sent to it (#18469) 402a4d4
- The forge runs with no session open: what three sessions did by hand on 2026-12-04, each made the forge's own (#18467) 0f03138
- A pull whose own commits took their change back closes with nothing landed; i… (#18448) 8af1f6c
- Full suite red: test/tab-browser.test.ts (#18443) e725a06
- talk-layout.test.ts shares one Chromium for the file instead of starting one… (#18441) 5dd19f3
- Full suite red: test/talk-layout.test.ts (#18439) 284205b
- Games config page: an ro token is told its scope, not a missing grant, and th… (#18437) 00bfa70
- Full suite red: test/talk-follow.test.ts (#18435) 171c1ec
- Games: what a page draws for an ro token matches what its POST allows (#18433) db29dfc
- Access 3, games: mayOnGame answers alone for the box, server and game-door checks (#18429) a73dcca
- Access 3, terminal: the palette offers a screen by its `asks` through may(); the entries' own gates go (#18431) 55693b7
3 earlier comments
A machine whose agent update was put back now says so on its /infra row. Most of this issue was already on main from #18019. The row display was the one missing piece.
I ran test/infra-agent-back.test.ts, test/infra-page.test.ts and test/game-agent-rollback.test.ts (28 pass), and tsc and design-lint are clean. I did not run the full suite or the ubuntu:24.04 box tests in this sandbox. I did not render the page either: data-agent-back is untested at the page level, and I never checked how it displays, so check it on the preview.
Already on main, so I left it alone:
self_updatekeeps the old script asagent.sh.prevand writes a.trialmarker.- A new agent that exits 3 times within 10 minutes, or completes no sync within 3 minutes, is replaced by the old one. The old one reports
rolledBackin its next diag and does not retry that sha until the forge answers a different one. - The ubuntu:24.04 proof of both paths is the existing
test/game-agent-rollback.test.ts, which runs inrelease/agent_tests.ts's ubuntu:24.04 release step (matched by thegame-agent-*name). - The heartbeat route is also already live: the agent trial runs against
/api/v1/agent/v1/heartbeat, which #18475 landed. I did not touch the protocol or the sync route.
Changed:
Runninginsrc/actions/infra.tsgainsagentBack. It holds the box'sdiag.rolledBacktext and is absent when the agent is fine.- The /infra machine row shows "On its old agent: <reason>" (
src/web/pages/infra.ts). - The terminal Infra list shows the same words after the row's place (
src/tui/screens/infra.ts). - The
infraMCP tool's list carriesagentBackas a machine field, throughinfraOf. docs/features/infra.mddescribes it.test/infra-agent-back.test.tscovers a box with a healthy agent (no field) and one whose agent was rolled back (the field holds the reason).
Not done: I added no new heartbeat field, because rolledBack in the diag already carries the reason.
Try it: open /infra on the preview. A game box whose agent was rolled back reads "On its old agent: agent update rolled back: …" in its row.
Looks: /infra
[{"go":"/infra","look":"a game box machine row whose agent update was rolled back","expect":"an extra line 'On its old agent: agent update rolled back: …' under its place and end; no such line on other machines"}]
🤖 Generated with Claude Code
<!-- look-pages 9c9771986d91 --> Look pages for 9c97719, from the gate:
look pages (none): "Looks: /infra" is not a page of app.looks in forge.json; this pull changes src/web/pages/infra.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 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
This push only fixes the look-pages complaint. I did not re-check the four recurring check failures, and I changed no code, so nothing under src/ moved.
My earlier commit said Looks: /infra, but /infra is not in app.looks in forge.json. The gate also could not trace its route to infer a page. I pushed an empty commit that says No look: with the reason: a fresh preview has no registered machine, so the "On its old agent:" row can't be shown there. I chose not to add /infra to app.looks, because a look of an empty page would show nothing useful.
This pull makes the forge show a machine whose agent update was rolled back. The /infra row now reads "On its old agent:", in the terminal and in the infra tool as well as on the web page. Tests cover the row.
To try it, open /infra on the preview with a machine whose agent was rolled back.
🤖 Generated with Claude Code
The reason now shows on every machine row, and both doors have a test. bun x tsc --noEmit and bun scripts/design-lint.ts are clean, and bun scripts/gate.ts --fix rewrapped no comments. I ran only test/infra-agent-back.test.ts (4 tests pass), not the other tests on your list.
- Failed row:
machineRowinsrc/web/pages/infra.tsnow puts thedata-agent-backspan outside theclearternary. A box that needs clearing shows "On its old agent: …" as well, and it uses the existing meta spans (no new class). - Terminal line: the Infra screen's secondary line in
src/tui/screens/infra.tscuts the reason to 80 characters and ends it with…. The 300-character cap ininfraOfstays, so the tool and the web row still get the full reason. - Page test:
test/infra-agent-back.test.tsrendersrunningRegionfor the rolled-back box and expects "On its old agent: " plus the reason. For the healthy box it expects nodata-agent-back. Deleting the span now fails the suite. - Terminal test: the same file renders the Infra screen and expects
on its old agent: agent update rolled backfor the rolled-back box and nothing for the healthy one. A 300-character reason is cut to 79 characters plus….
The new tests do not cover the clear case on the page. The fixture box never has a clear value, so that move is untested. I couldn't try it on the preview either, since it has no registered machine.
I did not look into the four recurring check failures (dead exports, duplicate imports, first-view budget, process-wide state). This round added no exports, imports or module-level state.
A machine whose agent update was put back now says so on its /infra row. Most of this issue was already on main from #18019. The row display was the one missing piece.
I ran
test/infra-agent-back.test.ts,test/infra-page.test.tsandtest/game-agent-rollback.test.ts(28 pass), andtscanddesign-lintare clean. I did not run the full suite or the ubuntu:24.04 box tests in this sandbox. I did not render the page either:data-agent-backis untested at the page level, and I never checked how it displays, so check it on the preview.Already on main, so I left it alone:
self_updatekeeps the old script asagent.sh.prevand writes a.trialmarker.rolledBackin its next diag and does not retry that sha until the forge answers a different one.test/game-agent-rollback.test.ts, which runs inrelease/agent_tests.ts's ubuntu:24.04 release step (matched by thegame-agent-*name)./api/v1/agent/v1/heartbeat, which #18475 landed. I did not touch the protocol or the sync route.Changed:
Runninginsrc/actions/infra.tsgainsagentBack. It holds the box'sdiag.rolledBacktext and is absent when the agent is fine.src/web/pages/infra.ts).src/tui/screens/infra.ts).infraMCP tool's list carriesagentBackas a machine field, throughinfraOf.docs/features/infra.mddescribes it.test/infra-agent-back.test.tscovers a box with a healthy agent (no field) and one whose agent was rolled back (the field holds the reason).Not done: I added no new heartbeat field, because
rolledBackin the diag already carries the reason.Try it: open /infra on the preview. A game box whose agent was rolled back reads "On its old agent: agent update rolled back: …" in its row.
Looks: /infra
🤖 Generated with Claude Code
Closes #18464