app: private-path bootstrap payload — the operator-app install carries agent + QEMU + base image (pre-gateway ADR needed) #196
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Engine-adapters close-out #183. Design question surfaced 2026-07-30 while preparing Phase A of the driver checklist, sharpened by Ben's review of the QEMU/KVM prerequisites.
The question
ADR 0056 rules the agent bundles a pinned QEMU per platform ("nothing for the device owner to install"), and ADR 0054 rules the agent artifact is served from the gateway's own cache, never a metered upstream. Both hold for every join path — except founding's private path (P1 VAR), which runs before any gateway exists. There is no cache to serve from: the operator-app install itself must carry everything the local stand-up needs.
Today's stopgaps make the gap concrete:
vm.DefaultConfig()falls back to PATH lookup forqemu-img/qemu-system-x86_64(the operator mustapt install— exactly what ADR 0056 rejected), and the guest base image resolves fromOURCLOUD_GUEST_IMAGEor a state-dir default (nixos-guest.qcow2) that nothing yet produces or places. KVM is correctly out of scope — a host kernel capability the app can only probe (hostprobe does) and ask for, never ship.What to decide / build
ready-for-agent— it gates #183 Phase A and needs no ADR); this ticket carries the built artifact in the install and hands its path to the resolution order.vm.Config.QemuImg/QemuSystem/BaseImagepoint at carried artifacts — PATH fallback becomes a dev-only convenience; a missing payload stays a legible fail-loud (ADR 0100).Acceptance criteria
Task manifest
Blocks
#183 — Phase A leg A·1 as a packaged journey (the apt-install + hand-placed-image stopgap can drive a rehearsal, but the close-out's "no fake, nothing hand-rigged" spirit wants the carried payload).
Triage
Category: enhancement (already applied)
State: →
ready-for-humanHuman-decision gate: the issue's own task manifest carries a non-empty
needs_human_decision:Per the design-to-agent system's human-decision gate, any issue with a non-empty
needs_human_decisionroutes toready-for-humaneven when everything else (task manifest, acceptance criteria) is fully specified — because reconciling ADR 0054 (gateway-cache serving) against ADR 0056 (bundled QEMU, nothing to install) for a pre-gateway carve-out is a judgement call on architectural precedent, not something an agent should decide unilaterally.Redundancy check: confirmed the stopgaps named in the issue are real —
vm.DefaultConfig()'s PATH fallback forqemu-img/qemu-system-x86_64and the unproducednixos-guest.qcow2default are both still in place; nothing in the codebase already carries the bundled payload.Design gate: not applicable in the blocking sense — no missing UX flow/wireframe; the blocker is an ADR decision, not a design artifact.
Suggested next step (non-binding): the issue itself says the agent may draft the ADR for Ben to review — that drafting could proceed under
ready-for-human(a human merges/decides), rather than treating this as fullyready-for-agentimplementation work.Ben confirmed a split (driven session 2026-07-30): the guest base-image build recipe moves to #216 (
ready-for-agent) — buildable now, gates #183 Phase A, needs no carriage decision. This ticket keeps the carriage ADR (0054/0056 pre-gateway reconciliation) and the packaged-app bundling of agent + QEMU + the built image.Ruling taken (Ben, 2026-07-30): carriage confirmed — the operator-app installer bundles, per platform, the agent binary + pinned QEMU payload + per-arch NixOS guest base image for founding's private path. Recorded as ADR 0110 (
docs/adr/0110-operator-app-install-carries-private-path-payload.md, commitfcb3ccc).Reconciliation as proposed: the app is the one artifact that legitimately comes from Matou's release channel (ADR 0054/0033), so the payload rides the single download the operator already makes. Scope is the pre-gateway bootstrap only — every post-gateway join keeps ADR 0054's cache rule.
vm.Configresolution: bundled paths first; env/PATH demote to dev-only; missing or corrupt payload fails loud (ADR 0100).The pre-gateway ADR this ticket needed now exists — re-labelled
ready-for-agent. Note #216 (the guest image build recipe) has since landed, so the artifact to carry is real.Shipped in
8d73e07(onorigin/main). Followed Ben's recorded ruling (ADR 0110) — no new decision needed.Carriage wired (ADR 0110):
internal/vm/resolve.go— newvm.ResolveConfigimplements the resolution order: bundled paths first fromOURCLOUD_PAYLOAD_DIR(QemuImg/QemuSystem/BaseImage→ carried absolute paths, arch-awareqemu-system);OURCLOUD_GUEST_IMAGE/_QEMU_IMG/_QEMU_SYSTEMand bare PATH names demote to dev-only conveniences.vm.NewResolved()builds the production manager from it.internal/vm/manager.go—missingPayload()names every absent carried artifact soCreatefails loud legibly (AC #3, ADR 0100); a bare PATH qemu (dev) is not existence-checked.app/helper/.../wiring_prod.go) and the locally-installed agent (agent/.../wiring_prod.go) both drop the ad-hocguestImagePath()and resolve viavm.NewResolved().resourcesPath/payloadand hands it to the helper asOURCLOUD_PAYLOAD_DIRover the boot bridge + stdio bridge (electron-main.ts,boot-info.ts,stdioBridge.ts,production.ts); dev carries none.app/PACKAGING.mddocuments it.Acceptance: AC1 — a clean-machine private path resolves QEMU + guest image from the carried install alone (no
apt install, no hand-placed image). AC2 — post-gateway joins untouched (ADR 0054 stands; theinstall/gateway path is not modified). AC3 — a missing/corrupt payload is a legible fail-loud naming each absent artifact.Seams (all green):
internal/vm/resolve_test.go,internal/vm/manager_test.go(fail-loud on a missing carried qemu; bare PATH allowed in dev),app/tests/unit/stdioBridge.test.ts(payload+state dir injected; unset when none). The boot seam test proves the real helper composes overvm.NewResolved.Incidental gate-unblock (this was the first Go slice to push through the #198 fail-closed pre-push gate; three latent problems blocked a full
go build/vet/test/golangci-lintof main): #203'sbackupengine/targets.gocomparedfleetstate.DeviceIDtoclan.NodeID(a file that never compiled) — fixed by comparing string forms; #202'sfounding/seat.gohad two revive comment-form nits — fixed; and the gate ran its stages inside git's pre-push hook env, soGIT_DIR/GIT_INDEX_FILEleaked intogo testand broke themember/rescuetests that shell out togit -C <tmp>—gate_scrub_git_envin.sandcastle/gate-lib.shnow unsets git's hook env before the language stages (+1 offline check).Still open downstream: #183 Phase A leg A·1 as a packaged journey now has a carried payload path (the physical per-platform payload bundling is packaging/installer work, ADR 0040/0108).
git worktree repairkilled run 1649's sibling worker #239templatestable, sotemplateNameFiltersilently falls back tovanilla— and writesdefaulttheme=vanillaintosettings_global, which then outranks config.php forever #1326