Public: anyone can read this; the crew can change it.
A game box's boot token is spent at its first sync #17649
Merged 12h 54m ago, live in production
The box makes its own token, writes it to disk first and sends only its sha256. The forge takes it in place of the one the box booted with. The box keeps its own token and the one before in one file (mode 600).
-
Reviews
Approved — before the latest pushRead every changed line. The swap is guarded by the token in use and a hash no other box has, and it runs last in the sync handler, so a failed sync changes nothing. The box makes its own token, keeps it on disk before sending, and sends only the sha256. A lost answer is covered by falling back to the other token on a 401. The new token goes to agent.env in mode 600, written with an atomic move. The tests cover the swap, the lost answer, an older forge, and the store guards. The how-to is in docs/features/games.md and README is untouched. No new dependency and no page or terminal change, so the two-door rule does not apply. Not blocking: the light sync in agent.sh does not handle a 401 itself, so after a lost answer the box recovers only on the next full sync.
ApprovedRead the token changes in agent.sh, store.ts and games_routes.ts at this head, and ran test/game-token.test.ts: 8 pass. The preview answers 200. Earlier asks are met. The swap is atomic and only for the token in use, and refuses a hash another box holds. The box keeps its own token and the one before in mode-600 files, written to disk first. On a 401 it cycles through the tokens it has. The docs are in docs/features/games.md, not the README. The new behaviours have tests that fail without them.
Non-blocking: whoever holds a valid boot token can swap in a hash of their own and lock the real box out, which then needs Replace. That holder could already impersonate the box, so this adds little. Say so in the docs if you want it known.
-
Checks
shipped production is serving it deploy 5fa2c54
-
History
- Keep the last two tokens: a restored forge still answers the box e817733
- Talk: a draft change's Undo stands on its own line, and the words name it Undo, never Restore (#17652) 93367a1
- Merge pull request #17650 from sold/game-proxy bbe14be
- First-time studio owner: a cloud bill, an app's deploy and its undo are hard to find (#17640) 1c6bd9c
- Merge pull request #17644 from sold/services-design fe35fac
- A game box's boot token is spent at its first sync 5d3c497
- The agent talks to the proxy itself 00825e2
- The revert lane closes its own revert once main is green without it, naming the commits that fixed the red (#17645) 7558fa7
- Show which app a cloud resource is part of, and find by it with app: (#17642) e0d6c73
- The desk sweep takes the write lock first, so another connection's commit is a wait, not "database is locked" (#17639) e052b8d
- Games: hear what players do, say why it failed, heal what is safe, answer commands in seconds (#17612) 0827b83
- Services: one container design, checked against the code (#17625, #17532) 6076d47
- Games: a proxy plugin for /forge and refused joins, standard code first (#17624) d6a1078
- Games: the people list shows no ops after a successful `op` (#17610 item 8) (#17619) fdf4697
- v0.7.713 was released and does not look right (#17631) a0a4ac4
- Infrastructure: run any container image on a machine, from image to a working address (#17630) 7401c73
- Talk: a dev server on its way shows its progress in the pane, and one that stops says why (#17592) d29963e
- Merge pull request #17635 from sold/game-metadata a2f1342
- Containers on a game box have no reach to the cloud's metadata 0d3d9c3
- Merge pull request #17613 from sold/refused-joins b5d7344
The box makes its own token, writes it to disk first and sends only its sha256. The forge takes it in place of the one the box booted with. The box keeps its own token and the one before in one file (mode 600). On a 401 it tries the others, one a sync, and keeps the one that is answered. So a lost answer, or a forge restored from before the swap, costs a sync or two and not the box.
A forge restored from before the machine itself existed still needs Replace.
Tests (the builder's): tsc and the gate clean; every games test file passes, run singly (game-lend-box skips 13 here, game-diag 1). The four new recovery tests failed on the agent before. Not run: the full suite, Ubuntu, a real box.
No door: the box's sync. Try: a game box syncs as before: /games/<box> still says it was seen seconds ago.
🤖 Generated with Claude Code