rehearsal-4: rented carrier — own-VPS worker in clan.VMMode (no takeover) + S4a/S7 rented screens per DDR 0190 #649

Closed
opened 2026-08-22 04:12:36 +00:00 by ben · 2 comments
Owner

Arc: #183 rehearsal phase 4 — rented gateway (S4a). Spec: docs/superpowers/specs/2026-08-21-183-phase-4-rented-gateway-rehearsal-design.md. Plan: docs/superpowers/plans/2026-08-21-183-phase-4-rented-gateway-rehearsal.md (read its Global Constraints first — they apply to this task). This ticket's body is the plan's task verbatim. Phase-3 precedent: #515–#523.

Task 5: Rented carrier rentedpath.go + S7 rented screen — own-VPS worker in VMMode

Files:

  • Create: internal/founding/rentedpath.go
  • Create: internal/founding/rentedpath_test.go (seam tests with foundingtesting.NewFakeOwnVPSCarrier() + fakes)
  • Modify: internal/founding/standuprented.go — StandUpRented becomes: guard (AccessRented, seams present) → pre-mark the three rows → launchRentedJourney(ctx, s); RentedProbe + ErrRentedProbeUnavailable retire (the carrier's Connect facts ARE the probe) — update standuprented_test.go
  • Modify: internal/founding/manualpath.go BeginStandup dispatch (AccessRented → requireRentedSeams() → launchRentedJourney), resume path (resumeRented, mirroring resumeOwnVPS)
  • Modify: internal/founding/orchestrator.go (drop rentedProbe; requireRentedSeams = ownVPSCarrier + guestSupply + guestTrust + enroll + clan)
  • Modify: app/helper/cmd/helper/wiring_prod.go comment: the own-VPS carrier now serves the rented path too (root@<ip> over the app's key — the key DO injected, ruling 4: the app's own-VPS operator key IS the PubKey sent in RentRequest; find where that key lives — ownVPSKnownHostsPath() neighbour — and expose founding.WithRentPubKey(path) so RentServer reads it)
  • Modify: app/src/components/founding/FoundingAccess.vue (S4a per DDR 0190: offer facts, data-action="rent", data-status="rent-error"), FoundingStandup.vue (rented checklist: the three pre-marked rows then the live carrier rows — same row component as own-VPS)
  • Modify: STATUS.md

Interfaces:

  • Consumes: Task 4's RentResult/draft shape; existing OwnVPSCarrier.Connect, GuestSupply.Seed, guestTrust.Ensure, clan.Enroll, driveEnrollment, runJourneyDeploy, runJourneyFinish, ownVPSJourneyRows/DeployRow vocabulary.

  • Produces: launchRentedJourney(ctx, s State) StandupView; rows connect → point → seed → supply → enroll-configure(update) → pair → deploy…; StandupRented log rows rented, install, pairing pre-marked (existing strings kept); JourneyRowConnect/JourneyRowPoint reused.

  • Step 1: Write rentedpath_test.go (failing): TestRentedJourney_RowsNeverIncludeInstallPhases (no kexec/disko events; enroll request captured by the fake clan has Install == clan.VMMode, AmbientSSH == true, Network.Zero() allowed); TestRentedJourney_SupplyRunsBeforeEnroll (order of fake calls); TestRentedJourney_ConnectFailureIsResumable; TestRentedJourney_PreMarkedRowsPresentBeforeConnect; TestStandUpRented_RefusesOffPath.

  • Step 2: Run go test ./internal/founding -run Rented -v → FAIL.

  • Step 3: Write rentedpath.go — copy runOwnVPSJourney and edit: after connect + point + seedCommunityConfig + guestTrust.Ensure, supply first (o.guestSupply.Seed(ctx, ip, ownVPSSSHPort) — the box is already NixOS, the private path's order), then installRented = installOwnVPS with Install: clan.VMMode, no Network, AuthorizedKeys: appendGuestTrust(facts.RootAuthorizedKeys, trust), same Gateway: publicGatewayFacts(d, ip, claim, smtp); no RotateHostKey (no reboot); then pairOwnVPS(ctx, s, st, facts) with ConsentHash: rentedConsent; then runJourneyDeploy + runJourneyFinish. Step constant StandupRented for events. Rows builder rentedJourneyRows = ownVPSJourneyRows prefixed by the three pre-marked done rows.

  • Step 4: Run → PASS. Then go test ./internal/founding/... whole package → PASS (update standuprented_test.go expectations).

  • Step 5: App screens — S4a + S7 per the wireframes; add a Vitest unit for the S4a component (offer renders terms; no payment input; rent-error shows stage+message).

  • Step 6: Run pnpm --filter app test && pnpm -r typecheck → PASS.

  • Step 7: Commit — git commit -m "rehearsal-4: rented carrier — own-VPS worker in VMMode, no takeover; S4a/S7 rented screens per DDR 0190 (#649)".

**Arc:** #183 rehearsal phase 4 — rented gateway (S4a). Spec: `docs/superpowers/specs/2026-08-21-183-phase-4-rented-gateway-rehearsal-design.md`. Plan: `docs/superpowers/plans/2026-08-21-183-phase-4-rented-gateway-rehearsal.md` (read its **Global Constraints** first — they apply to this task). This ticket's body is the plan's task verbatim. Phase-3 precedent: #515–#523. ### Task 5: Rented carrier `rentedpath.go` + S7 rented screen — own-VPS worker in VMMode **Files:** - Create: `internal/founding/rentedpath.go` - Create: `internal/founding/rentedpath_test.go` (seam tests with `foundingtesting.NewFakeOwnVPSCarrier()` + fakes) - Modify: `internal/founding/standuprented.go` — `StandUpRented` becomes: guard (`AccessRented`, seams present) → pre-mark the three rows → `launchRentedJourney(ctx, s)`; `RentedProbe` + `ErrRentedProbeUnavailable` retire (the carrier's `Connect` facts ARE the probe) — update `standuprented_test.go` - Modify: `internal/founding/manualpath.go` `BeginStandup` dispatch (`AccessRented` → `requireRentedSeams()` → `launchRentedJourney`), resume path (`resumeRented`, mirroring `resumeOwnVPS`) - Modify: `internal/founding/orchestrator.go` (drop `rentedProbe`; `requireRentedSeams` = ownVPSCarrier + guestSupply + guestTrust + enroll + clan) - Modify: `app/helper/cmd/helper/wiring_prod.go` comment: the own-VPS carrier now serves the rented path too (`root@<ip>` over the app's key — the key DO injected, ruling 4: the app's own-VPS operator key IS the `PubKey` sent in `RentRequest`; find where that key lives — `ownVPSKnownHostsPath()` neighbour — and expose `founding.WithRentPubKey(path)` so `RentServer` reads it) - Modify: `app/src/components/founding/FoundingAccess.vue` (S4a per DDR 0190: offer facts, `data-action="rent"`, `data-status="rent-error"`), `FoundingStandup.vue` (rented checklist: the three pre-marked rows then the live carrier rows — same row component as own-VPS) - Modify: `STATUS.md` **Interfaces:** - Consumes: Task 4's `RentResult`/draft shape; existing `OwnVPSCarrier.Connect`, `GuestSupply.Seed`, `guestTrust.Ensure`, `clan.Enroll`, `driveEnrollment`, `runJourneyDeploy`, `runJourneyFinish`, `ownVPSJourneyRows`/`DeployRow` vocabulary. - Produces: `launchRentedJourney(ctx, s State) StandupView`; rows `connect → point → seed → supply → enroll-configure(update) → pair → deploy…`; `StandupRented` log rows `rented`, `install`, `pairing` pre-marked (existing strings kept); `JourneyRowConnect`/`JourneyRowPoint` reused. - [ ] **Step 1: Write `rentedpath_test.go`** (failing): `TestRentedJourney_RowsNeverIncludeInstallPhases` (no `kexec`/`disko` events; enroll request captured by the fake clan has `Install == clan.VMMode`, `AmbientSSH == true`, `Network.Zero()` allowed); `TestRentedJourney_SupplyRunsBeforeEnroll` (order of fake calls); `TestRentedJourney_ConnectFailureIsResumable`; `TestRentedJourney_PreMarkedRowsPresentBeforeConnect`; `TestStandUpRented_RefusesOffPath`. - [ ] **Step 2: Run** `go test ./internal/founding -run Rented -v` → FAIL. - [ ] **Step 3: Write `rentedpath.go`** — copy `runOwnVPSJourney` and edit: after `connect` + `point` + `seedCommunityConfig` + `guestTrust.Ensure`, **supply first** (`o.guestSupply.Seed(ctx, ip, ownVPSSSHPort)` — the box is already NixOS, the private path's order), then `installRented` = `installOwnVPS` with `Install: clan.VMMode`, no `Network`, `AuthorizedKeys: appendGuestTrust(facts.RootAuthorizedKeys, trust)`, same `Gateway: publicGatewayFacts(d, ip, claim, smtp)`; **no `RotateHostKey`** (no reboot); then `pairOwnVPS(ctx, s, st, facts)` with `ConsentHash: rentedConsent`; then `runJourneyDeploy` + `runJourneyFinish`. Step constant `StandupRented` for events. Rows builder `rentedJourneyRows` = `ownVPSJourneyRows` prefixed by the three pre-marked done rows. - [ ] **Step 4: Run** → PASS. Then `go test ./internal/founding/...` whole package → PASS (update `standuprented_test.go` expectations). - [ ] **Step 5: App screens** — S4a + S7 per the wireframes; add a Vitest unit for the S4a component (offer renders `terms`; no payment input; `rent-error` shows stage+message). - [ ] **Step 6: Run** `pnpm --filter app test && pnpm -r typecheck` → PASS. - [ ] **Step 7: Commit** — `git commit -m "rehearsal-4: rented carrier — own-VPS worker in VMMode, no takeover; S4a/S7 rented screens per DDR 0190 (#649)"`.

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

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

close-report for #649 — status success

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

envelope
{
  "issue": 649,
  "status": "success",
  "commits": [
    "516c5054578db231d79c0a4325404af9a9963881"
  ],
  "changed_files": [
    "STATUS.md",
    "app/helper/cmd/helper/wiring_prod.go",
    "app/helper/cmd/helper/wiring_test.go",
    "app/src/components/founding/FoundingAccess.vue",
    "app/src/components/founding/FoundingStandup.vue",
    "app/src/components/founding/FoundingStandupRented.vue",
    "app/src/lib/founding.ts",
    "app/tests/unit/foundingAccessAddress.test.ts",
    "app/tests/unit/foundingManualPaths.test.ts",
    "app/tests/unit/foundingStandupRented.test.ts",
    "internal/founding/access.go",
    "internal/founding/manualpath.go",
    "internal/founding/manualpath_test.go",
    "internal/founding/orchestrator.go",
    "internal/founding/ownvpspath.go",
    "internal/founding/privatepath.go",
    "internal/founding/rentedpath.go",
    "internal/founding/rentedpath_test.go",
    "internal/founding/standup.go",
    "internal/founding/standuprented.go",
    "internal/founding/standuprented_test.go",
    "internal/founding/testing/fakes.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c gofmt -l internal/ app/ control-plane/",
      "exit_code": 0
    },
    {
      "command": "pnpm --filter app test",
      "exit_code": 0
    },
    {
      "command": "pnpm vue-tsc --noEmit -p app/tsconfig.json",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1-2: rentedpath_test.go written red-first (VMMode/no-install-phases, supply-before-enroll, connect-resumable, pre-marked-rows, refuses-off-path)": "internal/founding/rentedpath_test.go + standuprented_test.go (TestStandUpRented_RefusesOffPath); go test ./internal/founding green",
    "Step 3: rentedpath.go = own-VPS worker in clan.VMMode (supply first, no Network, no RotateHostKey, pairOwnVPS with rentedConsent, runJourneyDeploy+Finish); StandUpRented thin guard; rentedJourneyRows with 3 pre-marked done rows": "internal/founding/rentedpath.go; standuprented.go; ownvpspath.go (pairOwnVPS consent param); manualpath.go (BeginStandup dispatch + resumeRented); orchestrator.go (rentedProbe dropped)",
    "Step 4: whole founding package green (standuprented_test.go expectations updated)": "go test ./internal/founding/... exit 0",
    "Step 5: S4a screen per DDR 0190 (offer facts, terms, data-action=rent, in-place rent-error, no payment) + S7 rented carrier checklist; Vitest S4a unit (terms rendered, no payment input, rent-error stage+message)": "app/src/components/founding/FoundingAccess.vue + FoundingStandupRented.vue + FoundingStandup.vue; app/tests/unit/foundingAccessAddress.test.ts + foundingStandupRented.test.ts",
    "Step 6: pnpm --filter app test && vue-tsc green": "vitest 904 passed; vue-tsc clean",
    "wiring_prod.go: own-VPS carrier serves the rented path; founding.WithRentPubKey(path) exposed so RentServer reads the app operator pubkey": "app/helper/cmd/helper/wiring_prod.go (rent-pubkey port) + internal/founding/orchestrator.go (WithRentPubKey) + access.go (RentServer reads it)"
  },
  "summary": "The rented path becomes a live carrier journey — the own-VPS worker in clan.VMMode (no takeover) — with the S4a/S7 rented screens per DDR 0190.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #649 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 649, "status": "success", "commits": [ "516c5054578db231d79c0a4325404af9a9963881" ], "changed_files": [ "STATUS.md", "app/helper/cmd/helper/wiring_prod.go", "app/helper/cmd/helper/wiring_test.go", "app/src/components/founding/FoundingAccess.vue", "app/src/components/founding/FoundingStandup.vue", "app/src/components/founding/FoundingStandupRented.vue", "app/src/lib/founding.ts", "app/tests/unit/foundingAccessAddress.test.ts", "app/tests/unit/foundingManualPaths.test.ts", "app/tests/unit/foundingStandupRented.test.ts", "internal/founding/access.go", "internal/founding/manualpath.go", "internal/founding/manualpath_test.go", "internal/founding/orchestrator.go", "internal/founding/ownvpspath.go", "internal/founding/privatepath.go", "internal/founding/rentedpath.go", "internal/founding/rentedpath_test.go", "internal/founding/standup.go", "internal/founding/standuprented.go", "internal/founding/standuprented_test.go", "internal/founding/testing/fakes.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c gofmt -l internal/ app/ control-plane/", "exit_code": 0 }, { "command": "pnpm --filter app test", "exit_code": 0 }, { "command": "pnpm vue-tsc --noEmit -p app/tsconfig.json", "exit_code": 0 } ], "criteria": { "Step 1-2: rentedpath_test.go written red-first (VMMode/no-install-phases, supply-before-enroll, connect-resumable, pre-marked-rows, refuses-off-path)": "internal/founding/rentedpath_test.go + standuprented_test.go (TestStandUpRented_RefusesOffPath); go test ./internal/founding green", "Step 3: rentedpath.go = own-VPS worker in clan.VMMode (supply first, no Network, no RotateHostKey, pairOwnVPS with rentedConsent, runJourneyDeploy+Finish); StandUpRented thin guard; rentedJourneyRows with 3 pre-marked done rows": "internal/founding/rentedpath.go; standuprented.go; ownvpspath.go (pairOwnVPS consent param); manualpath.go (BeginStandup dispatch + resumeRented); orchestrator.go (rentedProbe dropped)", "Step 4: whole founding package green (standuprented_test.go expectations updated)": "go test ./internal/founding/... exit 0", "Step 5: S4a screen per DDR 0190 (offer facts, terms, data-action=rent, in-place rent-error, no payment) + S7 rented carrier checklist; Vitest S4a unit (terms rendered, no payment input, rent-error stage+message)": "app/src/components/founding/FoundingAccess.vue + FoundingStandupRented.vue + FoundingStandup.vue; app/tests/unit/foundingAccessAddress.test.ts + foundingStandupRented.test.ts", "Step 6: pnpm --filter app test && vue-tsc green": "vitest 904 passed; vue-tsc clean", "wiring_prod.go: own-VPS carrier serves the rented path; founding.WithRentPubKey(path) exposed so RentServer reads the app operator pubkey": "app/helper/cmd/helper/wiring_prod.go (rent-pubkey port) + internal/founding/orchestrator.go (WithRentPubKey) + access.go (RentServer reads it)" }, "summary": "The rented path becomes a live carrier journey — the own-VPS worker in clan.VMMode (no takeover) — with the S4a/S7 rented screens per DDR 0190.", "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#649
No description provided.