Public: anyone can read this; the crew can change it.

A game box's diag counts every container, not the last two #17533

opened this

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.

Notes

opened this

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.

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 from mc. 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. mc shows 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

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs