rehearsal-7 Task 5: Member composition + services-only deploy into the guest, route to the guest #1161

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

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

Task 5: Member composition + services-only deploy into the guest, route to the guest

Files: Modify internal/clan member composition: VM node renders
renderVMGuestBaseline + present service modules into
machines/<node>/configuration.nix; deployServicesOnly
(provision/deploy.go:332) against a guest = plain clan machines update
(no takeover, nothing erased — P4-S3 variant); front-door route to the guest's
MeshTarget (<guest-wt0>:80, ADR 0210 r2 unchanged by design). Tests:
compose render for a VM node, deploy seam on fakes, route rewrite.

Interfaces: Consumes Task 3 (guest wt0) + Task 4 (node record). Produces
the deployed guest Task 8's deploy-services leg drives.

  • Step 1: Compose VM variant (guest is already NixOS — assert the render imports the baseline, not the takeover shape).
  • Step 2: Deploy path + route; RecoverCleanRetry copy renders on a forced red (assert copy at minimum; cheap test hook only if trivial).
  • Step 3: Seam tests; the impact review shows NO ERASES row for a VM placement (services-only is not destructive — but LOSES on removal still is).
> Task 5 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 5 of #1153" in commits — NEVER "closes". ### Task 5: Member composition + services-only deploy into the guest, route to the guest **Files:** Modify `internal/clan` member composition: VM node renders `renderVMGuestBaseline` + present service modules into `machines/<node>/configuration.nix`; `deployServicesOnly` (`provision/deploy.go:332`) against a guest = plain `clan machines update` (no takeover, nothing erased — P4-S3 variant); front-door route to the guest's `MeshTarget` (`<guest-wt0>:80`, ADR 0210 r2 unchanged by design). Tests: compose render for a VM node, deploy seam on fakes, route rewrite. **Interfaces:** Consumes Task 3 (guest wt0) + Task 4 (node record). Produces the deployed guest Task 8's `deploy-services` leg drives. - [ ] Step 1: Compose VM variant (guest is already NixOS — assert the render imports the baseline, not the takeover shape). - [ ] Step 2: Deploy path + route; `RecoverCleanRetry` copy renders on a forced red (assert copy at minimum; cheap test hook only if trivial). - [ ] Step 3: Seam tests; the impact review shows NO ERASES row for a VM placement (services-only is not destructive — but LOSES on removal still is).

swarm-claim host=elitebook-distributed-server-03 run=16678
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=16678 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1161 — status success

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

envelope
{
  "issue": 1161,
  "status": "success",
  "commits": [
    "d0d1cd1d"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/resting_composition.go",
    "internal/clan/clan.go",
    "internal/clan/member_attach.go",
    "internal/clan/testing/fake.go",
    "internal/clan/vmguest_compose_test.go",
    "internal/provision/deploy.go",
    "internal/provision/deploy_test.go",
    "internal/provision/impact_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/rescue/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l <changed .go files>",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/... ./internal/provision/... ./control-plane/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1: Compose VM variant — the render imports the baseline, not the takeover shape": "internal/clan/member_attach.go ComposeVMGuestModules imports guest-baseline.nix (renderVMGuestBaseline) + present service modules, never the full-install base host files; pinned by TestComposeVMGuestModules_ImportsTheBaselineNotTheTakeoverShape and TestDeploy_VMGuestFilesComposesTheBaselineNotTheTakeoverShape (asserts ComposeVMGuestModules ran and the full-install member composer did NOT)",
    "Step 2: Deploy path + route; RecoverCleanRetry copy renders on a forced red": "deployServicesOnly (unchanged, P4-S3 variant) applies via composeMemberEntry (reads d.Install.Mode); front door routes files.<apex> -> <guest-wt0>:80 pinned by TestDeploy_VMGuestFilesRoutesToTheGuestWT0 (guest 100.83.1.44:80, device-first/gateway-second); RecoverCleanRetry copy pinned by the existing TestDeploy_AVMFailureIsClassifiedWithTheCleanRetryRecovery (delete-and-recreate wording)",
    "Step 3: Seam tests; impact review shows NO ERASES for a VM placement (LOSES on removal still stands)": "TestReviewImpact_VMGuestPlacementShowsNoErases (no Erases, not Destructive, action Deploy — and CAN fail: same fixture as ModeFull+TakeoverReady DOES erase); TestDeploy_VMGuestFilesRemovalKeepsTheBaseline proves removal recomposes without files.nix but keeps the baseline (services-only not destructive to the guest; guest teardown is Task 6)"
  },
  "summary": "Member composition speaks VM: a VM-mode guest placement imports the baseline (never the takeover shape) via the new ComposeVMGuestModules seam and routes the front door to the guest's own wt0.",
  "blockers": []
}
**close-report** for #1161 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1161, "status": "success", "commits": [ "d0d1cd1d" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/resting_composition.go", "internal/clan/clan.go", "internal/clan/member_attach.go", "internal/clan/testing/fake.go", "internal/clan/vmguest_compose_test.go", "internal/provision/deploy.go", "internal/provision/deploy_test.go", "internal/provision/impact_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go test ./internal/clan/...", "exit_code": 0 }, { "command": "go test ./internal/provision/", "exit_code": 0 }, { "command": "go test ./internal/rescue/...", "exit_code": 0 }, { "command": "gofmt -l <changed .go files>", "exit_code": 0 }, { "command": "go vet ./internal/clan/... ./internal/provision/... ./control-plane/...", "exit_code": 0 } ], "criteria": { "Step 1: Compose VM variant — the render imports the baseline, not the takeover shape": "internal/clan/member_attach.go ComposeVMGuestModules imports guest-baseline.nix (renderVMGuestBaseline) + present service modules, never the full-install base host files; pinned by TestComposeVMGuestModules_ImportsTheBaselineNotTheTakeoverShape and TestDeploy_VMGuestFilesComposesTheBaselineNotTheTakeoverShape (asserts ComposeVMGuestModules ran and the full-install member composer did NOT)", "Step 2: Deploy path + route; RecoverCleanRetry copy renders on a forced red": "deployServicesOnly (unchanged, P4-S3 variant) applies via composeMemberEntry (reads d.Install.Mode); front door routes files.<apex> -> <guest-wt0>:80 pinned by TestDeploy_VMGuestFilesRoutesToTheGuestWT0 (guest 100.83.1.44:80, device-first/gateway-second); RecoverCleanRetry copy pinned by the existing TestDeploy_AVMFailureIsClassifiedWithTheCleanRetryRecovery (delete-and-recreate wording)", "Step 3: Seam tests; impact review shows NO ERASES for a VM placement (LOSES on removal still stands)": "TestReviewImpact_VMGuestPlacementShowsNoErases (no Erases, not Destructive, action Deploy — and CAN fail: same fixture as ModeFull+TakeoverReady DOES erase); TestDeploy_VMGuestFilesRemovalKeepsTheBaseline proves removal recomposes without files.nix but keeps the baseline (services-only not destructive to the guest; guest teardown is Task 6)" }, "summary": "Member composition speaks VM: a VM-mode guest placement imports the baseline (never the takeover shape) via the new ComposeVMGuestModules seam and routes the front door to the guest's own wt0.", "blockers": [] } ``` </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#1161
No description provided.