Public: anyone can read this; the crew can change it.
A game box's diag counts every container, not the last two #17533
Merged 13h 6m ago, live in production
The box page for mc said "2 containers: 2 running" while five ran. Cause: the agent kept the last 4000 bytes of raw docker ps -a --format json. Each line carries every label (over 1 KB), so only the last two containers survived.
-
Reviews
ApprovedApproved. The fix is at the cause.
docker ps -a --format jsonlines carry every label, so a 4 KB cap on the raw bytes dropped containers.fieldsnow cuts each line to the fields the diag reads before the cap. Thepsandimagesjq at agent.sh:681-682 still read those same keys, so the output shape is unchanged. A line cut byhead -cis not valid JSON and is skipped byfromjson?, so it can't break the diag. The new test uses five realistic label-heavy lines and checks the names, the box status text and the DIAG_MOST bound, and it would fail on the old code. No page, route or terminal screen changes, so the both-doors rule doesn't apply.Two things I would do next:
- Drop
head -cforps, or raise its cap, and keep the[0:30]limit in jq. Trimmed lines are about 100 bytes, so 4000 bytes holds roughly 40 containers. A box with more would still lose the tail silently, and nothing says so in the diag. - Add a test that the first container in a list is not cut mid-line when the output exceeds the cap. That shows an over-cap list loses whole rows only and never produces a half-row.
- Drop
-
Checks
shipped production is serving it deploy 339cc69
-
History
- A game box's diag counts every container, not the last two da46449
- The Dependencies screen is busy until its report is read, so a and f are never dropped (#17524) 0d18300
- Talk: a turn's words written before it heard a confirm's answer are not kept, so the thread never says a pressed Do it still waits (#17507) ae14868
- The OpenAPI served-routes walk loads its route modules in the hook and runs in two tests, under the 2 s CPU budget (#17525) b482465
- /sitemap.xml lists the public apps /explore ranks, up to 200, each with its last change (#13624) 9fff9f4
- Talk: what the dock said is cleared by the next turn, so the live region never keeps an old refusal (#17519) 2e019c9
- Talk: with several proposals waiting, the newest is first and open, so Do it answers what was asked last (#17515) 0fbd355
- A runner's cgroup delegated after it starts is used: a named cgroup not yet writable is asked again (#17501) a36194f
- The signed-out webspec walk is three tests under the 2 s CPU budget, its warm-up paid by the file (#17514) d0c3744
- The forge toolbar names the app's live version and its last deploy time, read from the running record (#14528) 6b41e66
- Merge pull request #17259 from fix/lent-credit-spent-words d70eec9
- Main merged into #17259's head (combined/17259) 4c04aae
- Full suite red: 3 files in check run 01m8vqpbqb5bt9v167f7qa4gs5 (#17511) 32f003b
- Main merged into #17259's head (combined/17259) 83a96a3
- Merge pull request #17365 from fix/landlock-floor-proc-readable f719d48
- Main merged into #17365's head (combined/17365) b7af7b4
- Main merged into #17259's head (combined/17259) 1d91e66
- The fast tier runs its files in one bun test --parallel --no-isolate, longest first, in place of N slices (#17509) 641629b
- Main merged into #17365's head (combined/17365) fe54d4d
- Main merged into #17259's head (combined/17259) cc3ce28
The box page for
mcsaid "2 containers: 2 running" while five ran.Cause: the agent kept the last 4000 bytes of raw
docker ps -a --format json. Each line carries every label (over 1 KB), so only the last two containers survived.Fix: each line is cut to the fields the diag uses before the byte cap. The image list had the same fault and takes the same path. The caps are unchanged.
Tests: a five-container case in
test/game-diag.test.ts; with the old agent it keeps 2 of 5. The fixture is hand-written in Docker's shape, not recorded frommc. game-diag, game-box and tui-games: 29 pass, 1 skip (an existing skip, on macOS). tsc and the gate are clean.Unproven: not run on a real box.
mcshows the right count once it runs this agent. Past about 30 containers the list is still cut.No door: the diag's shape is unchanged; the same pages and tool read it. No look: a game box page needs a game box and its agent, which the look forge has none of.
🤖 Generated with Claude Code