rehearsal-7 Task 7: Carrier — VM-host droplet size, kvm-probe, smoke on the real size #1163

Closed
opened 2026-09-02 19:04:59 +00:00 by ben · 4 comments
Owner

Task 7 of 9 — phase-7 VM-mode device rehearsal. Plan (READ ITS Global Constraints + Plan-time inventory first): docs/superpowers/plans/2026-09-02-183-phase-7-vm-device-rehearsal.md. Spec: docs/superpowers/specs/2026-08-29-183-phase-7-vm-device-rehearsal-design.md (RULED). Drive issue: #1153. Say "task 7 of #1153" in commits — NEVER "closes".

Task 7: Carrier — VM-host droplet size, kvm-probe, smoke on the real size

Files: Modify scripts/lib/rehearsal-droplet.sh: oc_device_create gains
a mode/size parameter (VM mode rents the size derived from FloorFor — today
s-4vcpu-8gb; both hardcoded s-2vcpu-4gb call sites take the parameter);
new oc_device_kvm_probe (SSH: /dev/kvm exists + probe Virtualization
verdict; red = carrier red). One manual smoke-vm.sh run on the rented size
BEFORE the drive is armed (spec sequencing 2 — answers the DO-nested-virt
question once; no /dev/kvm at size = new fact for Ben, stop).

Interfaces: Produces OC_E2E_DEVICE_MODE env + kvm-probe helper for
Task 8. Consumes Task 4's FloorFor.

  • Step 1: Size parameter (default unchanged — phase-5 drives unaffected), probe helper, bash -n + offline arg tests.
  • Step 2: The manual smoke on a rented s-4vcpu-8gb (evidence to the ticket; this is the KVM go/no-go).
> Task 7 of 9 — phase-7 VM-mode device rehearsal. Plan (READ ITS **Global Constraints** + **Plan-time inventory** first): `docs/superpowers/plans/2026-09-02-183-phase-7-vm-device-rehearsal.md`. Spec: `docs/superpowers/specs/2026-08-29-183-phase-7-vm-device-rehearsal-design.md` (RULED). Drive issue: #1153. Say "task 7 of #1153" in commits — NEVER "closes". ### Task 7: Carrier — VM-host droplet size, kvm-probe, smoke on the real size **Files:** Modify `scripts/lib/rehearsal-droplet.sh`: `oc_device_create` gains a mode/size parameter (VM mode rents the size derived from `FloorFor` — today `s-4vcpu-8gb`; both hardcoded `s-2vcpu-4gb` call sites take the parameter); new `oc_device_kvm_probe` (SSH: `/dev/kvm` exists + probe `Virtualization` verdict; red = carrier red). One manual `smoke-vm.sh` run on the rented size BEFORE the drive is armed (spec sequencing 2 — answers the DO-nested-virt question once; **no `/dev/kvm` at size = new fact for Ben, stop**). **Interfaces:** Produces `OC_E2E_DEVICE_MODE` env + kvm-probe helper for Task 8. Consumes Task 4's `FloorFor`. - [ ] Step 1: Size parameter (default unchanged — phase-5 drives unaffected), probe helper, `bash -n` + offline arg tests. - [ ] Step 2: The manual smoke on a rented `s-4vcpu-8gb` (evidence to the ticket; this is the KVM go/no-go).
Author
Owner

Step 2 DONE — manual smoke-vm.sh on the real size: PASS, KVM go

The DO-nested-virt question is answered (spec sequencing 2). Run 2026-09-02, session-driven per this ticket's ready-for-session gate.

Substrate — exactly what the drive will rent: clan-lab create --fresh --size s-4vcpu-8gb (same CLI, tag + TTL contract as oc_device_create) → clan-lab-kvm-smoke-19f063d8, syd1, ubuntu-24-04-x64, kernel 6.8.0-124-generic.

KVM facts on the box:

  • /dev/kvm present: crw-rw---- 1 root kvm 10, 232
  • vmx flag on all 4 vCPUs (grep -cE 'vmx|svm' /proc/cpuinfo → 8 = 4 cores × VT-x); lscpu Virtualization: VT-x, hypervisor KVM (nested)
  • systemd-detect-virt → kvm; 7.8Gi RAM as sized

The smoke itself — the production vm.Manager (internal/vm, ADR 0056/0100) driven by control-plane/cmd/smoke-vm (built static CGO_ENABLED=0 from main at a41409da, shipped to the box; QEMU 8.2.2 from ubuntu apt — the drive's payload-bundled QEMU is Task 2's business):

{"leg":"create","ok":true,"detail":"standing up the guest via the real QEMU manager"}
{"leg":"exists","ok":true,"detail":"the durable guest disk is present"}
{"leg":"health","ok":true,"detail":"guest running (mem_used=3989504)"}
{"leg":"remove","ok":true,"detail":"guest torn down, nothing left running"}
smoke-vm: PASS — the real VM manager stood a guest up on KVM and tore it down

Real systemd unit laid down and reaped; no fake in the path. Droplet destroyed after the run (clan-lab destroy, zero labs standing).

Verdict: the "no /dev/kvm at size = stop, ask Ben" branch did NOT fire — phase 7 proceeds on s-4vcpu-8gb.

Step 1 (carrier size parameter + oc_device_kvm_probe) remains open on this ticket.

## Step 2 DONE — manual `smoke-vm.sh` on the real size: **PASS, KVM go** The DO-nested-virt question is answered (spec sequencing 2). Run 2026-09-02, session-driven per this ticket's `ready-for-session` gate. **Substrate — exactly what the drive will rent:** `clan-lab create --fresh --size s-4vcpu-8gb` (same CLI, tag + TTL contract as `oc_device_create`) → `clan-lab-kvm-smoke-19f063d8`, syd1, ubuntu-24-04-x64, kernel 6.8.0-124-generic. **KVM facts on the box:** - `/dev/kvm` present: `crw-rw---- 1 root kvm 10, 232` - `vmx` flag on all 4 vCPUs (`grep -cE 'vmx|svm' /proc/cpuinfo` → 8 = 4 cores × VT-x); `lscpu` Virtualization: **VT-x**, hypervisor KVM (nested) - `systemd-detect-virt` → `kvm`; 7.8Gi RAM as sized **The smoke itself** — the production `vm.Manager` (`internal/vm`, ADR 0056/0100) driven by `control-plane/cmd/smoke-vm` (built static CGO_ENABLED=0 from `main` at `a41409da`, shipped to the box; QEMU 8.2.2 from ubuntu apt — the drive's payload-bundled QEMU is Task 2's business): ``` {"leg":"create","ok":true,"detail":"standing up the guest via the real QEMU manager"} {"leg":"exists","ok":true,"detail":"the durable guest disk is present"} {"leg":"health","ok":true,"detail":"guest running (mem_used=3989504)"} {"leg":"remove","ok":true,"detail":"guest torn down, nothing left running"} smoke-vm: PASS — the real VM manager stood a guest up on KVM and tore it down ``` Real systemd unit laid down and reaped; no fake in the path. Droplet destroyed after the run (`clan-lab destroy`, zero labs standing). **Verdict: the "no /dev/kvm at size = stop, ask Ben" branch did NOT fire — phase 7 proceeds on `s-4vcpu-8gb`.** Step 1 (carrier size parameter + `oc_device_kvm_probe`) remains open on this ticket.
Author
Owner

Step 1 DONE — landed 389a009f; ticket complete

  • oc_device_create takes a mode (positional or OC_E2E_DEVICE_MODE env; exported for the playwright subprocess — task 8's contract): full = phase-5 size, unchanged and default; vm = the VM-host floor s-4vcpu-8gb, pinned beside its catalogue.FloorFor derivation (#1160 owns the floor in Go; a floor change lands in both, same commit). Unknown mode dies by name before any rent.
  • Both hardcoded rent sizes route through OC_DROPLET_SIZE_DEFAULT; oc_droplet_create takes an optional size.
  • New oc_device_kvm_probe — /dev/kvm + lscpu Virtualization verdict over root SSH, wired into vm-mode create so a KVM-less box is a carrier red at second 0. It CAN FIRE: absent /dev/kvm, an unreachable box, and a missing device record each land red on their own path; empty output never passes as KVM-present (the cannot-fail-check rule).
  • Offline suite +5 checks (rehearsal-device-target-test.sh, 20 total, all green; full scripts/tests/ sweep 46/46 green). The suite's first run caught a real bug in the change itself — a trailing [[ vm ]] && guard returning 1 for every full-mode create — exactly the class of defect the offline tests exist for.

With step 2's KVM GO (comment above), task 7 of #1153 is complete. Task 8 consumes OC_E2E_DEVICE_MODE + the probe helper.

## Step 1 DONE — landed `389a009f`; ticket complete - `oc_device_create` takes a **mode** (positional or `OC_E2E_DEVICE_MODE` env; exported for the playwright subprocess — task 8's contract): `full` = phase-5 size, unchanged and default; `vm` = the VM-host floor `s-4vcpu-8gb`, pinned beside its `catalogue.FloorFor` derivation (#1160 owns the floor in Go; a floor change lands in both, same commit). Unknown mode dies by name **before any rent**. - Both hardcoded rent sizes route through `OC_DROPLET_SIZE_DEFAULT`; `oc_droplet_create` takes an optional size. - New `oc_device_kvm_probe` — `/dev/kvm` + `lscpu` Virtualization verdict over root SSH, wired into vm-mode create so a KVM-less box is a **carrier red at second 0**. It CAN FIRE: absent `/dev/kvm`, an unreachable box, and a missing device record each land red on their own path; empty output never passes as KVM-present (the cannot-fail-check rule). - Offline suite +5 checks (`rehearsal-device-target-test.sh`, 20 total, all green; full `scripts/tests/` sweep 46/46 green). The suite's first run caught a real bug in the change itself — a trailing `[[ vm ]] &&` guard returning 1 for every full-mode create — exactly the class of defect the offline tests exist for. With step 2's KVM **GO** (comment above), task 7 of #1153 is complete. Task 8 consumes `OC_E2E_DEVICE_MODE` + the probe helper.
Author
Owner

Note: both steps are DONE but Forgejo refuses the close (412) while the #1160 dependency edge is open — task 7 consumes task 4's FloorFor, and the floor coupling is now documented in the code beside OC_DEVICE_SIZE_VM. Sweep-close this ticket when #1160 lands (memory: sweep parents when drained).

Note: both steps are DONE but Forgejo refuses the close (412) while the #1160 dependency edge is open — task 7 consumes task 4's FloorFor, and the floor coupling is now documented in the code beside `OC_DEVICE_SIZE_VM`. Sweep-close this ticket when #1160 lands (memory: sweep parents when drained).

Close-report — task 7 complete, both steps landed and proven; sweep-close now that #1160 has landed

Ruled by agent under ADR 0174 — veto anytime.

Both steps of task 7 were finished and evidenced on this ticket earlier today; the close was the only thing outstanding, and it was blocked (Forgejo 412) on the #1160 dependency edge (task 7 consumes task 4's FloorFor). #1160 has now landed and closed (commit 166f66ae), so the edge is satisfied and this ticket sweep-closes.

Step 1 — carrier size parameter + kvm-probe — landed 389a009f (see the Step-1 comment above):

  • oc_device_create takes a mode (positional or OC_E2E_DEVICE_MODE, exported for the playwright subprocess — task 8's contract): full = the phase-5 size, unchanged and default; vm = the VM-host floor s-4vcpu-8gb, pinned beside its catalogue.FloorFor derivation (#1160 owns the floor in Go; a floor change lands in both, same commit). Unknown mode dies by name before any rent.
  • Both hardcoded rent sizes route through OC_DROPLET_SIZE_DEFAULT; oc_droplet_create takes an optional size.
  • New oc_device_kvm_probe — /dev/kvm + lscpu Virtualization verdict over root SSH, wired into vm-mode create so a KVM-less box is a carrier red at second 0. It CAN FIRE (absent /dev/kvm, unreachable box, missing device record each land red on their own path; empty output never passes as KVM-present — the cannot-fail-check rule).

Step 2 — manual smoke-vm.sh on the rented s-4vcpu-8gb: PASS, KVM GO (see the Step-2 comment above): /dev/kvm present, vmx on all 4 vCPUs, systemd-detect-virt=kvm; the production vm.Manager stood a real QEMU guest up and tore it down (create/exists/health/remove all ok, no fake in the path); droplet destroyed after. The "no /dev/kvm at size = new fact for Ben, stop" branch did NOT fire — phase 7 proceeds on s-4vcpu-8gb.

Proof re-verified this session (two-way, ADR 0174): the landed carrier code is green — bash scripts/tests/rehearsal-device-target-test.sh → PASS, 20/20 checks, RC=0.

STATUS updated in 60aef0bd (task-7 lead added — the carrier landing had no STATUS lead; the KVM-GO empirical answer is recorded).

Task 7 produces OC_E2E_DEVICE_MODE + the kvm-probe helper task 8 consumes. Closing.

## Close-report — task 7 complete, both steps landed and proven; sweep-close now that #1160 has landed Ruled by agent under ADR 0174 — veto anytime. Both steps of task 7 were finished and evidenced on this ticket earlier today; the close was the only thing outstanding, and it was **blocked (Forgejo 412) on the #1160 dependency edge** (task 7 consumes task 4's `FloorFor`). **#1160 has now landed and closed** (commit `166f66ae`), so the edge is satisfied and this ticket sweep-closes. **Step 1 — carrier size parameter + kvm-probe** — landed `389a009f` (see the Step-1 comment above): - `oc_device_create` takes a **mode** (positional or `OC_E2E_DEVICE_MODE`, exported for the playwright subprocess — task 8's contract): `full` = the phase-5 size, unchanged and default; `vm` = the VM-host floor `s-4vcpu-8gb`, pinned beside its `catalogue.FloorFor` derivation (#1160 owns the floor in Go; a floor change lands in both, same commit). Unknown mode dies by name **before any rent**. - Both hardcoded rent sizes route through `OC_DROPLET_SIZE_DEFAULT`; `oc_droplet_create` takes an optional size. - New `oc_device_kvm_probe` — `/dev/kvm` + `lscpu` Virtualization verdict over root SSH, wired into vm-mode create so a KVM-less box is a **carrier red at second 0**. It CAN FIRE (absent `/dev/kvm`, unreachable box, missing device record each land red on their own path; empty output never passes as KVM-present — the cannot-fail-check rule). **Step 2 — manual `smoke-vm.sh` on the rented `s-4vcpu-8gb`: PASS, KVM GO** (see the Step-2 comment above): `/dev/kvm` present, `vmx` on all 4 vCPUs, `systemd-detect-virt=kvm`; the production `vm.Manager` stood a real QEMU guest up and tore it down (create/exists/health/remove all ok, no fake in the path); droplet destroyed after. **The "no `/dev/kvm` at size = new fact for Ben, stop" branch did NOT fire — phase 7 proceeds on `s-4vcpu-8gb`.** **Proof re-verified this session** (two-way, ADR 0174): the landed carrier code is green — `bash scripts/tests/rehearsal-device-target-test.sh` → **PASS, 20/20 checks, RC=0**. **STATUS** updated in `60aef0bd` (task-7 lead added — the carrier landing had no STATUS lead; the KVM-GO empirical answer is recorded). Task 7 produces `OC_E2E_DEVICE_MODE` + the kvm-probe helper task 8 consumes. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1163
No description provided.