rehearsal-7 Task 3: The guest image joins the mesh — netbird in the guest + land-time hand-off #1159

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

Task 3 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 3 of #1153" in commits — NEVER "closes".

Task 3: The guest image joins the mesh — netbird in the guest + land-time hand-off

Files: Modify nix/guest/configuration.nix + internal/clan/vmguest.go
(SAME COMMIT — drift rule): netbird service, wt0 firewall stance per ADR 0210;
internal/join land path: VM-mode branch hands the setup key over guest SSH,
runs the join, reads guest wt0, skips host meshup; ConfirmEnrolled.Address =
guest wt0 (land.go:107 branch). Tests: land orchestration on fakes
(fake VMManager + fake mesh), render tests both sides.

Interfaces: Consumes ADR 0223's GuestMeshJoin. Produces the guest-wt0
mesh fact every later task trusts (Task 5's route, Task 8's assertions).

  • Step 1: Guest image + baseline render change (one commit, cross-referenced comment updated).
  • Step 2: Land-time hand-off + guest join + fact read-back; honest errors per stage (key refused, netbird absent in image, wt0 never up within ceiling).
  • Step 3: Fakes-tier tests; smoke-vm.sh extended to assert guest wt0 where driver-gated.
> Task 3 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 3 of #1153" in commits — NEVER "closes". ### Task 3: The guest image joins the mesh — netbird in the guest + land-time hand-off **Files:** Modify `nix/guest/configuration.nix` + `internal/clan/vmguest.go` (SAME COMMIT — drift rule): netbird service, wt0 firewall stance per ADR 0210; `internal/join` land path: VM-mode branch hands the setup key over guest SSH, runs the join, reads guest wt0, skips host meshup; `ConfirmEnrolled.Address` = guest wt0 (`land.go:107` branch). Tests: land orchestration on fakes (fake VMManager + fake mesh), render tests both sides. **Interfaces:** Consumes ADR 0223's `GuestMeshJoin`. Produces the guest-wt0 mesh fact every later task trusts (Task 5's route, Task 8's assertions). - [ ] Step 1: Guest image + baseline render change (one commit, cross-referenced comment updated). - [ ] Step 2: Land-time hand-off + guest join + fact read-back; honest errors per stage (key refused, netbird absent in image, wt0 never up within ceiling). - [ ] Step 3: Fakes-tier tests; `smoke-vm.sh` extended to assert guest wt0 where driver-gated.

swarm-claim host=matou-dev-server-01 run=16658
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=16658 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1159 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit c7ea8f64b8 is not reachable from origin/main (not landed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/smoke-vm/main.go' is not in the diff of the claimed commits
  • changed_files: 'internal/clan/vmguest.go' is not in the diff of the claimed commits
  • changed_files: 'internal/clan/vmguest_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/join/join.go' is not in the diff of the claimed commits
  • changed_files: 'internal/join/land.go' is not in the diff of the claimed commits
  • changed_files: 'internal/join/land_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/join/testing/fakes.go' is not in the diff of the claimed commits
  • changed_files: 'internal/vm/manager.go' is not in the diff of the claimed commits
  • changed_files: 'internal/vm/manager_test.go' is not in the diff of the claimed commits
  • changed_files: 'nix/guest/configuration.nix' is not in the diff of the claimed commits
  • changed_files: 'scripts/smoke-vm.sh' is not in the diff of the claimed commits
envelope
{
  "issue": 1159,
  "status": "success",
  "commits": [
    "c7ea8f64b8d703ae1a570abb1f1da627953bdd4a"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/smoke-vm/main.go",
    "internal/clan/vmguest.go",
    "internal/clan/vmguest_test.go",
    "internal/join/join.go",
    "internal/join/land.go",
    "internal/join/land_test.go",
    "internal/join/testing/fakes.go",
    "internal/vm/manager.go",
    "internal/vm/manager_test.go",
    "nix/guest/configuration.nix",
    "scripts/smoke-vm.sh"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/join/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/vm/",
      "exit_code": 0
    },
    {
      "command": "go test ./agent/... ./internal/founding/ ./internal/fleetwire/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/ ./internal/join/... ./internal/vm/ ./control-plane/cmd/smoke-vm/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/smoke-vm.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1: Guest image + baseline render change (one commit, cross-referenced comment updated)": "nix/guest/configuration.nix + internal/clan/vmguest.go both gain services.netbird.clients.mesh (wt0/51820) + the netbird-mesh wrapper on PATH in ONE commit c7ea8f64; the DRIFT-BREAKS-BOOT cross-references updated both sides; gateway renders strip the member-peer block (new baselineNetbirdBlock). Proven by TestRenderVMGuest_BaselineCarriesTheMeshPeer + TestRenderGatewayGuest_StripsBaselineMemberMeshPeer + the existing gateway eval smokes (go test ./internal/clan/ exit 0).",
    "Step 2: Land-time hand-off + guest join + fact read-back; honest errors per stage (key refused, netbird absent, wt0 never up within ceiling)": "join.VMManager gains GuestMeshJoin; internal/join/land.go Enroll branches on ModeVM (skips host meshup, ConfirmEnrolled.Address = guest wt0); production internal/vm/manager.go GuestMeshJoin waits ready, `netbird-mesh up` over loopback SSH, polls `netbird-mesh status --json` for wt0, named per-stage errors (ADR 0100). Proven by TestGuestMeshJoin_{RedeemsKeyAndReadsGuestWT0,UpFailureIsNamed,WT0NeverUpFailsWithinCeiling,UnreachableGuestFailsAtReadiness} + TestEnroll_GateOnMeshCertsClan/VMGuestJoinFailureStaysApproved/FullInstallUsesHostMeshup.",
    "Step 3: Fakes-tier tests; smoke-vm.sh extended to assert guest wt0 where driver-gated": "Fakes: FakeVMManager.GuestMeshJoin + land_test.go orchestration on fakes (go test ./internal/join/... exit 0); vm contract tests on the injected System double (go test ./internal/vm/ exit 0). scripts/smoke-vm.sh + control-plane/cmd/smoke-vm gain a driver-gated guest-mesh leg that asserts the guest's wt0 against a live plane when supplied, else HONESTLY SKIPPED (never green). bash -n exit 0."
  },
  "summary": "The VM-mode guest joins the mesh itself: netbird in the guest image + baseline (same commit), and the land path hands the setup key into the running guest over loopback SSH and confirms the guest's own wt0 (ADR 0223).",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1159 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit c7ea8f64b8d703ae1a570abb1f1da627953bdd4a is not reachable from origin/main (not landed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/smoke-vm/main.go' is not in the diff of the claimed commits - changed_files: 'internal/clan/vmguest.go' is not in the diff of the claimed commits - changed_files: 'internal/clan/vmguest_test.go' is not in the diff of the claimed commits - changed_files: 'internal/join/join.go' is not in the diff of the claimed commits - changed_files: 'internal/join/land.go' is not in the diff of the claimed commits - changed_files: 'internal/join/land_test.go' is not in the diff of the claimed commits - changed_files: 'internal/join/testing/fakes.go' is not in the diff of the claimed commits - changed_files: 'internal/vm/manager.go' is not in the diff of the claimed commits - changed_files: 'internal/vm/manager_test.go' is not in the diff of the claimed commits - changed_files: 'nix/guest/configuration.nix' is not in the diff of the claimed commits - changed_files: 'scripts/smoke-vm.sh' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1159, "status": "success", "commits": [ "c7ea8f64b8d703ae1a570abb1f1da627953bdd4a" ], "changed_files": [ "STATUS.md", "control-plane/cmd/smoke-vm/main.go", "internal/clan/vmguest.go", "internal/clan/vmguest_test.go", "internal/join/join.go", "internal/join/land.go", "internal/join/land_test.go", "internal/join/testing/fakes.go", "internal/vm/manager.go", "internal/vm/manager_test.go", "nix/guest/configuration.nix", "scripts/smoke-vm.sh" ], "tests": [ { "command": "go test ./internal/clan/", "exit_code": 0 }, { "command": "go test ./internal/join/...", "exit_code": 0 }, { "command": "go test ./internal/vm/", "exit_code": 0 }, { "command": "go test ./agent/... ./internal/founding/ ./internal/fleetwire/", "exit_code": 0 }, { "command": "go vet ./internal/clan/ ./internal/join/... ./internal/vm/ ./control-plane/cmd/smoke-vm/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "bash -n scripts/smoke-vm.sh", "exit_code": 0 } ], "criteria": { "Step 1: Guest image + baseline render change (one commit, cross-referenced comment updated)": "nix/guest/configuration.nix + internal/clan/vmguest.go both gain services.netbird.clients.mesh (wt0/51820) + the netbird-mesh wrapper on PATH in ONE commit c7ea8f64; the DRIFT-BREAKS-BOOT cross-references updated both sides; gateway renders strip the member-peer block (new baselineNetbirdBlock). Proven by TestRenderVMGuest_BaselineCarriesTheMeshPeer + TestRenderGatewayGuest_StripsBaselineMemberMeshPeer + the existing gateway eval smokes (go test ./internal/clan/ exit 0).", "Step 2: Land-time hand-off + guest join + fact read-back; honest errors per stage (key refused, netbird absent, wt0 never up within ceiling)": "join.VMManager gains GuestMeshJoin; internal/join/land.go Enroll branches on ModeVM (skips host meshup, ConfirmEnrolled.Address = guest wt0); production internal/vm/manager.go GuestMeshJoin waits ready, `netbird-mesh up` over loopback SSH, polls `netbird-mesh status --json` for wt0, named per-stage errors (ADR 0100). Proven by TestGuestMeshJoin_{RedeemsKeyAndReadsGuestWT0,UpFailureIsNamed,WT0NeverUpFailsWithinCeiling,UnreachableGuestFailsAtReadiness} + TestEnroll_GateOnMeshCertsClan/VMGuestJoinFailureStaysApproved/FullInstallUsesHostMeshup.", "Step 3: Fakes-tier tests; smoke-vm.sh extended to assert guest wt0 where driver-gated": "Fakes: FakeVMManager.GuestMeshJoin + land_test.go orchestration on fakes (go test ./internal/join/... exit 0); vm contract tests on the injected System double (go test ./internal/vm/ exit 0). scripts/smoke-vm.sh + control-plane/cmd/smoke-vm gain a driver-gated guest-mesh leg that asserts the guest's wt0 against a live plane when supplied, else HONESTLY SKIPPED (never green). bash -n exit 0." }, "summary": "The VM-mode guest joins the mesh itself: netbird in the guest image + baseline (same commit), and the land path hands the setup key into the running guest over loopback SSH and confirms the guest's own wt0 (ADR 0223).", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>

close-report for #1159 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1159,
  "status": "success",
  "commits": [
    "c7ea8f64b8d703ae1a570abb1f1da627953bdd4a"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/smoke-vm/main.go",
    "internal/clan/vmguest.go",
    "internal/clan/vmguest_test.go",
    "internal/join/join.go",
    "internal/join/land.go",
    "internal/join/land_test.go",
    "internal/join/testing/fakes.go",
    "internal/vm/manager.go",
    "internal/vm/manager_test.go",
    "nix/guest/configuration.nix",
    "scripts/smoke-vm.sh"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/join/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/vm/",
      "exit_code": 0
    },
    {
      "command": "go test ./agent/... ./internal/founding/ ./internal/fleetwire/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/ ./internal/join/... ./internal/vm/ ./control-plane/cmd/smoke-vm/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/smoke-vm.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1: Guest image + baseline render change (one commit, cross-referenced comment updated)": "nix/guest/configuration.nix + internal/clan/vmguest.go both gain services.netbird.clients.mesh (wt0/51820) + the netbird-mesh wrapper on PATH in ONE commit c7ea8f64; the DRIFT-BREAKS-BOOT cross-references updated both sides; gateway renders strip the member-peer block (new baselineNetbirdBlock). Proven by TestRenderVMGuest_BaselineCarriesTheMeshPeer + TestRenderGatewayGuest_StripsBaselineMemberMeshPeer + the existing gateway eval smokes (go test ./internal/clan/ exit 0).",
    "Step 2: Land-time hand-off + guest join + fact read-back; honest errors per stage (key refused, netbird absent, wt0 never up within ceiling)": "join.VMManager gains GuestMeshJoin; internal/join/land.go Enroll branches on ModeVM (skips host meshup, ConfirmEnrolled.Address = guest wt0); production internal/vm/manager.go GuestMeshJoin waits ready, `netbird-mesh up` over loopback SSH, polls `netbird-mesh status --json` for wt0, named per-stage errors (ADR 0100). Proven by TestGuestMeshJoin_{RedeemsKeyAndReadsGuestWT0,UpFailureIsNamed,WT0NeverUpFailsWithinCeiling,UnreachableGuestFailsAtReadiness} + TestEnroll_GateOnMeshCertsClan/VMGuestJoinFailureStaysApproved/FullInstallUsesHostMeshup.",
    "Step 3: Fakes-tier tests; smoke-vm.sh extended to assert guest wt0 where driver-gated": "Fakes: FakeVMManager.GuestMeshJoin + land_test.go orchestration on fakes (go test ./internal/join/... exit 0); vm contract tests on the injected System double (go test ./internal/vm/ exit 0). scripts/smoke-vm.sh + control-plane/cmd/smoke-vm gain a driver-gated guest-mesh leg that asserts the guest's wt0 against a live plane when supplied, else HONESTLY SKIPPED (never green). bash -n exit 0."
  },
  "summary": "The VM-mode guest joins the mesh itself: netbird in the guest image + baseline (same commit), and the land path hands the setup key into the running guest over loopback SSH and confirms the guest's own wt0 (ADR 0223).",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1159 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1159, "status": "success", "commits": [ "c7ea8f64b8d703ae1a570abb1f1da627953bdd4a" ], "changed_files": [ "STATUS.md", "control-plane/cmd/smoke-vm/main.go", "internal/clan/vmguest.go", "internal/clan/vmguest_test.go", "internal/join/join.go", "internal/join/land.go", "internal/join/land_test.go", "internal/join/testing/fakes.go", "internal/vm/manager.go", "internal/vm/manager_test.go", "nix/guest/configuration.nix", "scripts/smoke-vm.sh" ], "tests": [ { "command": "go test ./internal/clan/", "exit_code": 0 }, { "command": "go test ./internal/join/...", "exit_code": 0 }, { "command": "go test ./internal/vm/", "exit_code": 0 }, { "command": "go test ./agent/... ./internal/founding/ ./internal/fleetwire/", "exit_code": 0 }, { "command": "go vet ./internal/clan/ ./internal/join/... ./internal/vm/ ./control-plane/cmd/smoke-vm/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "bash -n scripts/smoke-vm.sh", "exit_code": 0 } ], "criteria": { "Step 1: Guest image + baseline render change (one commit, cross-referenced comment updated)": "nix/guest/configuration.nix + internal/clan/vmguest.go both gain services.netbird.clients.mesh (wt0/51820) + the netbird-mesh wrapper on PATH in ONE commit c7ea8f64; the DRIFT-BREAKS-BOOT cross-references updated both sides; gateway renders strip the member-peer block (new baselineNetbirdBlock). Proven by TestRenderVMGuest_BaselineCarriesTheMeshPeer + TestRenderGatewayGuest_StripsBaselineMemberMeshPeer + the existing gateway eval smokes (go test ./internal/clan/ exit 0).", "Step 2: Land-time hand-off + guest join + fact read-back; honest errors per stage (key refused, netbird absent, wt0 never up within ceiling)": "join.VMManager gains GuestMeshJoin; internal/join/land.go Enroll branches on ModeVM (skips host meshup, ConfirmEnrolled.Address = guest wt0); production internal/vm/manager.go GuestMeshJoin waits ready, `netbird-mesh up` over loopback SSH, polls `netbird-mesh status --json` for wt0, named per-stage errors (ADR 0100). Proven by TestGuestMeshJoin_{RedeemsKeyAndReadsGuestWT0,UpFailureIsNamed,WT0NeverUpFailsWithinCeiling,UnreachableGuestFailsAtReadiness} + TestEnroll_GateOnMeshCertsClan/VMGuestJoinFailureStaysApproved/FullInstallUsesHostMeshup.", "Step 3: Fakes-tier tests; smoke-vm.sh extended to assert guest wt0 where driver-gated": "Fakes: FakeVMManager.GuestMeshJoin + land_test.go orchestration on fakes (go test ./internal/join/... exit 0); vm contract tests on the injected System double (go test ./internal/vm/ exit 0). scripts/smoke-vm.sh + control-plane/cmd/smoke-vm gain a driver-gated guest-mesh leg that asserts the guest's wt0 against a live plane when supplied, else HONESTLY SKIPPED (never green). bash -n exit 0." }, "summary": "The VM-mode guest joins the mesh itself: netbird in the guest image + baseline (same commit), and the land path hands the setup key into the running guest over loopback SSH and confirms the guest's own wt0 (ADR 0223).", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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#1159
No description provided.