Public: anyone can read this; the crew can change it.
Cloud says: every machine shows what its provider reports, even when its agent is silent #17156
Merged 34h 2m ago, live in production
Phase V2 of #17151. We were blind on game box mc while the forge held the DigitalOcean key. For each machine row with a remote id, the forge reads the provider (DigitalOcean droplet, actions and volume; Hetzner server, actions and volume) with GETs only, using the sealed key and writing to the cloud audit.
-
Reviews
Changes requested — before the latest pushChanges needed (one round):
- HIGH, leaks across users:
pinnedOfBoxfalls back togetPinned(app.db, box.name)when a box has nopinnedId. A non-admin box owner who names a box after someone else's machine sees that machine's provider view (public and private IP, volumes, recent actions) on /games/<box>, in the terminal and in thegamestool. Use only the box's ownpinnedId, or check that the row was created for this box's owner. Add a test that a box owner never sees another user's machine. - Tests: only the words, the cache and
cloudSaysare covered. Nothing covers the new behaviour on the doors: /infra and /infra/live (admin only, the live swap never waits), the games page and tool (owner only, a viewer or guest gets nocloud), the infra toollistandshow, or the two terminal screens. Each needs a test that fails without it. - Design (principles 1 and 8): the line reads "Cloud says: DigitalOcean: active · 4 vCPU ...", which says the same thing twice, and it packs seven facts and raw API words such as
power_onandstart_serverinto one muted run. Say it in plain words (see docs/WRITING.md) and drop the double prefix. On /games the line is a hand-rolled<p class="muted small" data-cloud>. Use the named page-head or row components, or adlrow for the facts (principle 7). - Speed: every page open after 30 s now waits up to 1.5 s on a provider before first paint, which breaks the under-50 ms rule. Server-render from the kept reading and let the live fragment (
data-live) fill in the fresh one, as /infra/live already does. - The terminal Games screen shows only the first owned box's line, so a person with two boxes cannot see the second. Show one per box, for example in the row's secondary text.
- Small:
anyinobj; the import order in infra_routes.ts and the tools; say in the pull whetherapi.digitalocean.comandapi.hetzner.cloudare already in forge.jsonegress(the app calls them from a cell).
Changes requested — before the latest pushI could not diff against 8bd14ddf941a (the commit is not in the clone), so I read the whole change. The earlier asks look met: a box reads only the machine its own
pinnedIdnames, no page waits on a provider, and a fresh reading raisesinfra.cloud. The read is GET-only, the id is validated, and everything the provider says is cleaned and bounded. There is one miss, on /games/<box>.A game box owner who is not an admin never sees the machine update. The page's
data-live="infra.cloud"region depends on that event reaching the page, butsrc/core/event_audience.ts(thekind.startsWith("infra.")entry) makes everyinfra.event admin-only. The owner's first open starts the read in the background and shows "reading…", and the event that should redraw it is filtered out of their stream. The line stays "reading…" until they reload by hand. The doc says an owner sees this line, and the test only covers an admin owner, so it passes. Fix: either raise a kind that the box's owners are meant to receive (for example agames.event with the box id), or letinfra.cloudthrough the audience filter for it, as it carries only a machine name. Then add a test that a non-admin owner's stream receives it.Non-blocking: the games region has no
data-live-src, so each event refetches the whole box page. A small fragment route would be lighter.Approved — before the latest pushAll four earlier asks are met in the current diff.
- Machine lookup:
pinnedOfBoxresolves only throughpinnedId, and a test shows a box named like another machine reads nothing. - Games page: the machine is now a
dlfact row ("Its machine"). It is drawn from the kept reading, so first paint never waits on a provider. - Terminal Games screen: each owned box gets its own row.
- Live region for non-admin owners: the region now listens for
game.cloud. It is raised per non-admin owner as that owner's ownactorevent and classifiedactorinevent_audience.ts. A test with a non-admin owner and a viewer shows the owner hears it and the viewer does not.
The doors and docs are in place: the web page, the terminal and the
infraandgamestools, with how-tos indocs/features/infra.mdandgames.mdand nothing added to the README.Non-blocking:
infra.cloudandgame.cloudfire only when a reading changes. A viewer who never reloads sees a reading that is at most 30 s stale, which is fine for now.I am approving.
ApprovedAll four earlier asks are met. (1) The box's machine now resolves only through
pinnedOfBox(its ownpinnedId), and a test covers a box named after another machine reading nothing. (2) The games page uses adlfact row in plain words, drawn from the kept reading, so first paint never waits on a provider. (3) The terminal Games screen has one row per owned box. (4) Non-admin owners get agame.cloudevent raised as their own (actoraudience), and a test with a non-admin owner and a viewer checks that only the owner hears it. The reads are GET-only, the output is cleaned and bounded, both doors and the docs are covered, and tests cover each behaviour. Clean. - HIGH, leaks across users:
-
Checks
shipped production is serving it deploy 9d6fa9d
-
History
- Cloud says: the owner-only test waits on the events, not on timers aa0b369
- Check again: the boot-time test is reverted (#17346) caf63be
- Cloud says: a non-admin box owner's /games/<box> draws a fresh reading, by its own game.cloud event (#17156) 497438b
- Cloud says (#17151 V2): the provider's own view of each machine on /infra, /games/<box>, the terminal and the infra and games tools 3a7d503
- The forge image runs Bun 1.4.5, its security release (SQLite 3.54.1); the pin follows once it is live (#17390) 24cd3eb
- Tick up to 20 of an account's repositories on /migrate and start them all with one "Migrate selected" (#17381) 8cfc9b1
- Game servers sleep while empty and wake when someone joins (AutoStopper on Velocity) (#17290) cdf0f4f
- The asks ledger takes the write lock first, so a commit beside it is a wait, not "database is locked" (#17389) f77bccd
- Full suite red: 6 files in check run 01m8tdk9wtkadjy8jpcssa7smg (#17387) f386d9b
- Merge pull request #17227 from sold/workspace-dev-cell 3690d74
- Dev server reads the working tree: every sync puts the saved files back; no directory made through a link 93adc62
- A pull's red on nothing but the lane's known red passes, saying so, and a pull that touched the test keeps its red (#17379) ea58f2e
- Dev cell: no second test runner beside #17307's; the cell carries reload and fault only 00cbbb2
- Dev server reads the working tree: saved files reload the frame from uncommitted edits (#16940) f6172d8
- Dev cell: Reloading and a fault from the server's own output, on a change in its checkout (#16940) 9ba3a98
- Talk's live workspace shows its own speed: edit-to-preview and Test what I touched, each with its p95 against its target (#17378) 20a1488
- Mail relay call: child asks parent to send, with from-domain allowlist and per-scope rate limit (#17367) f62ca8c
- Games console: a Minecraft network experience better than playing it (Modrinth, worlds, people, health) (#17342) 763780f
- A runner's checkout line names its parts: fetch, export and history apart (#17380) d4f8e96
- Move the accessors out of crew/dispatch.ts (queueAgentRun, crewFor, taskOf) so it leaves the boot's static closure (#17278) f81c34c
Phase V2 of #17151. We were blind on game box mc while the forge held the DigitalOcean key.
For each machine row with a remote id, the forge reads the provider (DigitalOcean droplet, actions and volume; Hetzner server, actions and volume) with GETs only, using the sealed key and writing to the cloud audit. It shows one plain line, for example: "DigitalOcean: active · 4 vCPU 8 GB · Ubuntu 24.04 · nyc1 · 104.236.196.18 · volume forge_mc attached · last action: power_on, completed 17:43".
preflight: green (tsc, gate, 68 files) in 43 s.
🤖 Generated with Claude Code