Docs / DESKTOP-SWARM-REVIEW

Desktop swarm review: live Kiri lifecycle evidence (C2)

Source: docs/DESKTOP-SWARM-REVIEW.md

Reviewed ref: main @ 536879a08b8150d77bed6e16ddfe53f9960bbc41 (2026-11-28).
Scope: this is a read-only review of the committed evidence. I did not run the desktop app or the live test against Kiri, and I did not restart the Kiri daemon. The only file this review adds is this one.

Verdict

Claim Verdict
The desktop control plane (Electron bridge → SDK client → Python API → Kiri) drives up / status / down against a real Kiri container, and the player's HTTP route serves its assets PASS (narrow, historical), from one recorded run at 2026-11-28T04:14Z
The desktop shows a playable view of the game (a rendered frame, input changing game state, audio) UNPROVEN

Evidence reviewed

  • tests/desktop/LIVE_KIRI_EVIDENCE.md and tests/desktop/kiri-live-lifecycle.test.cjs, added in f6ce65f169f5a683f37a70e175b7fd65ba9daaed.
  • desktop/src/main.cjs, desktop/src/renderer.js, desktop/src/python-api-bridge.cjs on main.
  • docs/REPORT-INTEGRATION.md (closeout follow-up) and docs/FINAL-EVIDENCE-MATRIX.md (historical snapshot header).
  • Later runtime changes: c99b4ded6a576f52e54f7d8ee850892add1bfb13 and baddf2b059f495666d56c865803c7c1ecd2126c0.

Why the control plane passes

  1. Same code path as the app. The test builds its client with createGameComposerClient(createPythonApiTransport({ repositoryRoot })). desktop/src/main.cjs builds the client the same way in its lifecycle:run IPC handler. The test also passes the same { configPath, projectDirectory } options shape.
  2. The full lifecycle is checked by assertions, not only logged. up must return a URL. status must match nes: running and contain that same URL. In a finally block, down must match nes: removed and the next status must match nes: absent.
  3. Asset delivery is checked. /, /jsnes.js and /rom must each return HTTP 200 with a non-empty body. The recorded run returned 3,544 B of HTML, 135,545 B of JS and 40,976 B for the ROM, using the root gamecomposer.yml (NES, 8-Bit Table Tennis, pinned SHA-256).
  4. Cleanup works. The container was removed and status reported it absent. Saves were reported as preserved.

Limits on the pass

  • It predates the current runtime. The run is recorded against f6ce65f. Two commits later changed the lifecycle code in gamecomposer/runtime.py:

    • c99b4de now requires two consecutive 2xx responses before the player counts as ready, and fails if a browser-output service has no published URL.
    • baddf2b replaced the ps --all pre-check with container inspect.

    Nothing on main shows the live test passing again on the current runtime.

  • It may not reproduce now. docs/REPORT-INTEGRATION.md records that a later bounded gamecompose up timed out after about 180 s and created no container. It calls the "external Kiri container-create hang" the current execution gate. The 04:14Z pass is a historical observation, not a claim about the current state.

  • It never opened an Electron window. The test is a Node node:test that loads the bridge module directly. It does not launch Electron, the renderer, preload IPC or the project:open dialog, so those wiring pieces are covered only by the unit tests (desktop/test/*.test.cjs, 5/5 per REPORT-INTEGRATION.md).

  • It covers one host and one config. macOS with a local Kiri daemon, NES only. Linux, Windows and SteamOS hosts, and SNES and PS3, have no desktop lifecycle evidence.

  • The live test is opt-in. It runs only with GAME_COMPOSER_LIVE_KIRI=1, so CI and default test runs skip it.

The playable-view gap

The desktop has no playable view yet, and the code shows why:

  • The renderer has no place to show the game. desktop/src/renderer.js writes the lifecycle result string (for example nes: started http://127.0.0.1:57492/) into a text element. Nothing in it embeds or opens the player URL: no <webview>, no <iframe>, no BrowserWindow.loadURL and no shell.openExternal. Even with a perfect lifecycle, a desktop user only sees a URL as text.
  • No frame was captured. LIVE_KIRI_EVIDENCE.md itself says no visual frame was captured. The browser access host was unavailable, native window clicks returned noWindowsAvailable, and binding Chrome timed out.
  • HTTP 200 does not mean the game ran. A 200 on the HTML, JS and ROM shows the bytes were delivered. It does not show that jsnes decoded the ROM, drew to the canvas, responded to input or played audio. That matches the evidence-matrix rule that a PASS never means "playable".
  • The nearest playability evidence is not desktop evidence. The Config B NES narrow PASS (examples/nes/PLAYABILITY-EVIDENCE.md) is a host-local browser run. It used neither Kiri nor the desktop shell. The SNES result is INCONCLUSIVE.

What closing the gap would take

These are recommendations only; none of them was done in this review.

  1. Re-run the live test on current main once the Kiri container-create hang is resolved, and record the commit SHA next to the timestamps.

  2. Add a player surface to the desktop. For example, a sandboxed BrowserWindow or <webview> loading the up URL, restricted to http://127.0.0.1:<port>/, with contextIsolation on and no Node access.

  3. Capture desktop-driven evidence:

    • Electron launched, project opened, Up clicked.
    • A screenshot of a rendered, non-blank NES frame inside the desktop window.
    • An input sequence with before and after frames showing the game state changed.
    • Down clicked, and status reports absent.

    Hash the captures and commit them next to LIVE_KIRI_EVIDENCE.md.

  4. Keep the claims separate. Until step 3 is done, the desktop row should read: "control plane PASS (historical, f6ce65f); playable view UNPROVEN".

Back to all docs