rehearsal: the swarm drives the wizard to the own-VPS address screen — the re-scoped gate, no KVM #377
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.
Dependencies
No dependencies set.
Reference
Matou/idss#377
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?
Part of the #183 rehearsal ratchet (spec
docs/superpowers/specs/2026-08-09-183-vps-rehearsal-ratchet-design.md,plan
docs/superpowers/plans/2026-08-09-183-vps-rehearsal-ratchet.md).This ticket is DOUBLE evidence, by design (Ben's ruling, 2026-08-09):
162b956extracted the proven live spec'swizard steps into
app/tests/e2e/fixtures/wizard.ts; the plan's gate isthe local-guest drive re-proving GREEN over that refactor. Two laptop
drives (
20260809T204304Z,20260809T205457Z) already show everyextracted step passing — both went red minutes LATER when the laptop's
earlyoom killed the guest (host memory, #375, and the classifier
mislabel #374). A GREEN on a roomier host closes the gate.
carries
/dev/kvm+ a complete payload ("a slice, not CI"). Passing thisticket is the counter-evidence; failing it honestly maps exactly what the
substrate lacks. Either outcome is valuable — post it.
What to run
GREEN =
==> DRIVE GREENand exit 0.Prerequisites the runner must satisfy (the runbook's Stage-0 list,
docs/operator-app/rehearsal-drive.md)/dev/kvmavailable INSIDE the execution environment (host-mode runner ora device-mapped container) and a user systemd (
systemctl --user) — theguest runs as
ourcloud-guest.service(ADR 0129)pnpm approve-buildsinapp/+ reinstall(pnpm-workspace denies its postinstall by design)
pnpm --filter app exec playwright install chromiumscripts/assemble-payload.sh, orbuild-and-run.md steps 7-10):
nixos-guest.qcow2,qemu-img,qemu-system-x86_64,control-plane,dashboard— and FRESH: thepreflight's staleness gate refuses a payload older than the newest
control-plane//dashboard/commit (rebuild both from the tree first)check
MemAvailable≥ ~6-8 GiB before driving (#375 is the preflightgate for this — landing it first is welcome but not required here)
Known hazards
testMatch '**/*.spec.ts'currently runsprovision-nextcloud.live.spec.tsafter the private-path spec in the SAMErun dir — it always fails there and clobbers
journey.json. Until #376lands, scope the drive to the gate spec:
append
tests/e2e/private-path.live.spec.tsto the playwright invocation(
e2e:liveaccepts a file filter) or land #376 first — do NOT count thesecond spec's red against this gate.
post, never a budget to widen (ADR 0132).
container), do not fake it: post exactly which prerequisite the substrate
lacks and what would grant it, and flip this to
ready-for-human.Acceptance
tree at/after
162b956, then it exits GREEN and the evidence(run-dir stamp, leg durations block, host facts line) is posted here
posted here and the ticket flips
ready-for-humanCI" boundary is stated in one paragraph
Outcome: the substrate cannot drive — flipping
ready-for-humanThis is the ticket's second acceptance path. The Sandcastle swarm substrate
cannot run the local-guest drive at all; the harness's own preflight refuses
at second 0. The tree is fine — the substrate is not.
Evidence (the drive, run over a tree at/after
162b956)162b956is an ancestor of the driven tree (git merge-base --is-ancestor 162b956 HEAD→ true), so the Task-3 wizard-extraction refactor(
app/tests/e2e/fixtures/wizard.ts) is present. The command from the ticket:The harness refused before any build, as designed (fail-loud, named). The
missing
/dev/kvmgate (scripts/smoke-private-path.sh:78) fires first; twofurther hard gates would fire behind it.
The exact missing prerequisites (the Stage-0 list,
docs/operator-app/rehearsal-drive.md+ the preflight)/dev/kvminside the exec env (ADR 0132)ls /dev/kvm→ No such file--device /dev/kvm) on a KVM-capable hostsystemctl --user), forourcloud-guest.service(ADR 0129)systemctlnot found; PID 1 issleep, no/run/systemd/system, no systemd in the imageMemAvailable4.44 GiB,SwapTotal0Host facts line
Note the memory floor (#375) is also unmet, so even a KVM-mapped, systemd-bearing
version of this exact container would still refuse once #375 lands its gate.
What this proves/disproves about ADR 0132's "slices, not CI" boundary
It confirms ADR 0132, and gives the swarm-substrate counter-evidence the
ticket asked for as a clean negative. ADR 0132's consequence reads "A slice,
not CI. The drive needs
/dev/kvmand a complete payload; no swarm substratecarries either." This Sandcastle substrate is an unprivileged Docker container
with no
/dev/kvm, no init/systemd for the guest unit, and under half theguest's own memory allocation free — it carries none of the three things a live
KVM drive needs. The gate therefore cannot be closed by the swarm; it remains a
driver-session slice exactly as ADR 0132 places it. Passing this ticket would
have overturned that boundary; failing it honestly maps the boundary's edge:
KVM device access, a guest-hosting init, and ~6–8 GiB headroom are the three
grants that would move the local-guest drive onto CI-like substrate.
rehearsal: prove the local-guest drive GREEN on the workstation — the Task-3 gate, driven by the swarmto rehearsal: the swarm drives the wizard to the own-VPS address screen — the re-scoped gate, no KVMRe-scoped (Ben's ruling, 2026-08-10): no KVM needed — the VPS path is the
target, so demonstrating the app drives to the own-VPS menu is good enough.
Flipping
ready-for-agent.The original ask (local-guest GREEN, needs
/dev/kvm) is DROPPED as thisticket's gate. The wizard screens are what the Task-3 extraction touched, and
ADR 0152 makes the own-VPS branch the ratchet's real path — so the gate
becomes: the swarm substrate drives the app, under Xvfb, through the shared
wizard fixtures to the own-VPS address screen. No guest, no KVM, no payload
guest artifacts, no droplet, no broker call (the claim fires on S5 continue,
not on reaching the screen).
What to run
A minimal spec (new, e.g.
app/tests/e2e/wizard-menu.smoke.spec.ts, selectedvia the #376
OC_E2E_SPECseam) that drives, using the existing fixturesverbatim (
fixtures/wizard.ts):bootToWelcome → welcomeToS1 → s1ToS2 → s2CommunityDetails → s3BrandKit → s4AccessOwnVPS('203.0.113.7')— whose own assertion IS the finish line:[data-status="address"]visible (S5 shown after the own-VPS continue). Stopthere; do not touch S5's slug field.
Prerequisites in the container (the #380 checklist's first three items —
landing them here advances #380):
nix develop .#e2e(xvfb-run), electronvia
pnpm approve-builds+ reinstall, playwright chromium. The app builds +real helper stage as the harness does; a run dir for
OC_E2E_RUN_DIR.Acceptance (replaces the original)
then it passes: Welcome → S1 → S2 → S3 → S4 own-VPS (IP filled) →
address screen visible — evidence (run stamp, screenshot or trace)
posted here
cheap substrate check
live (the Task-3 gate, re-scoped), and the substrate runs the app-drive
e2e tier without KVM
Outcome: GREEN — the swarm substrate drives the app to the own-VPS address screen, no KVM
The re-scoped gate (Ben, 2026-08-10) passes. New spec
app/tests/e2e/wizard-menu.smoke.spec.ts(OC_E2E_SPEC-selectable, #376) drivesthe SHARED wizard fixtures VERBATIM (
fixtures/wizard.ts, the Task-3extraction):
bootToWelcome → welcomeToS1 → s1ToS2 → s2CommunityDetails → s3BrandKit → s4AccessOwnVPS('203.0.113.7')— whose own assertion
[data-status="address"]IS the finish line (S5 shownafter the own-VPS continue). Stops before S5's slug; no guest, no payload, no
droplet, no broker call.
Evidence
test-results/wizard-menu-smoke/20260810T033614Z— reproduced endto end using ONLY the committed pieces (
.#e2eshell +scripts/stage-e2e-electron.sh+ the spec).1 passed (3.8s), the test body 2.3s (Welcome → S1 → S2 → S3→ S4 own-VPS → address screen; each step a
test.stepin the trace).address-screen.png(the branded S5: title bar "E2E Drive —OurCloud",
e2e-drive.matou.nzselected, "RESERVE E2E-DRIVE.MATOU.NZ") +artifacts/**/trace.zip(OC_E2E_CAPTURE=1) +report/./dev/kvm; no systemd (PID1=sleep); nix 2.35.1; systemglibc 2.36 (Debian bookworm); electron 33.4.11 (nix-built); kernel
6.8.0-124; 4 vCPU; MemAvailable ~4.5 GiB.
The substrate wrinkle #380 warned of — resolved
The swarm container can not run the npm-downloaded electron: it's
dynamically linked against Chromium sonames the container lacks
(
libnss3/libgtk-3/libgbm/libasound/the X+at-spi stack), and theflake-pinned nixpkgs libs need
GLIBC_2.38while the container's system glibc is2.36 — so those libs can't be back-filled onto the prebuilt binary either.
Fix (advances the #380 checklist's first three items):
flake.nix.#e2eshell now provides the nix-builtelectron_33— the SAME33.4.11 the app pins, fully self-contained (nix loader + absolute RPATH). It's
EOL, so a
permittedInsecurePackages-scopednixpkgsimport permits exactlythat one package. Exports
OC_E2E_ELECTRON_DIST.scripts/stage-e2e-electron.shstages a writable copy of that dist withthe per-tree helper at
resources/helper/helper(electron-main'shelperBinPathresolves the helper there). Two nix wrinkles handled: nix'selectronis amakeCWrapperstub that re-execs.electron-wrappedat theSTORE path, and
resourcesPathfollows the real exe dir — so the copyreplaces
electronwith the real.electron-wrappedbinary, which relocatesresourcesPathonto the writable copy.Recipe (in the spec header):
nix develop .#e2e -c bash -c 'pnpm --filter app build:electron && pnpm --filter app build:helper; dist="$(scripts/stage-e2e-electron.sh "$run_dir")"; OC_E2E_RUN_DIR="$run_dir" OC_E2E_SPEC=wizard-menu.smoke.spec.ts ELECTRON_OVERRIDE_DIST_PATH="$dist" xvfb-run -a pnpm --filter app e2e:live'.What this proves about ADR 0132's "slices, not CI" boundary
ADR 0132 assumed no swarm substrate carries
/dev/kvm+ a complete payload, andscoped the live drive as "a slice, not CI." That boundary holds — but it is the
LOCAL-GUEST tier's boundary, not the whole e2e tier's. The local-guest drive
boots a real KVM guest (4 GiB,
/dev/kvm, a user systemd unit, a fresh payload)and genuinely can't run here. The app-drive tier needs none of that — only
Xvfb and a runnable electron — and now runs in the swarm in ~2.3s. So the
re-scope is well-founded: extracting the wizard steps into shared fixtures
(Task-3) gave us a cheap KVM-free substrate check that exercises the SAME step
bodies the KVM/droplet drives use, proving the extraction drives a real app
end-to-end without paying the guest's price.
Landed on
origin/maininf48233c.journey.device.spec.ts+ device-add fixtures #852--target device+ standing preflight wiring #853