founding: deploy-failure recovery strands the operator at Create — every create refuses post-Founded (S1 sibling of #325) #477

Closed
opened 2026-08-12 17:52:40 +00:00 by ben · 1 comment
Owner

Filed from Ben's 2026-08-12 manual fresh-install trial (full Tier 1+2 reset: cold /nix, wiped community env, private path, tree at 35b387b).

What happened

From the "gateway deploy failed" fault frame (companion ticket: the transient-red deploy), the operator clicked the recovery action. Result:

  • The UI navigated to the Create a community screen (S1).
  • Nothing was actually torn down: founded: true stood, the guest VM was still running and healthy, the disk, unit, enrollment doc all intact.
  • Clicking Create then refuses: founding: a community already exists on this installation (ErrCommunityExists).

The operator is wedged in a loop: a screen inviting an action the backend will always refuse — exactly #325's shape ("S4 renders but every access/address op refuses post-Founded"), now at S1 via the recovery flow.

Definition of done

Either (a) the recovery action performs its named teardown — stop the guest, delete the VM disk + community state — and only then lands on Create (which then succeeds), or (b) the recovery routes to the resume/retry of the standing community instead of S1. Whichever way: no screen may offer an operation whose precondition the recovery just left violated. A test pins it (recovery → next action succeeds).

Filed from Ben's 2026-08-12 manual fresh-install trial (full Tier 1+2 reset: cold /nix, wiped community env, private path, tree at 35b387b). ## What happened From the "gateway deploy failed" fault frame (companion ticket: the transient-red deploy), the operator clicked the recovery action. Result: - The UI navigated to the **Create a community** screen (S1). - Nothing was actually torn down: `founded: true` stood, the guest VM was still running and healthy, the disk, unit, enrollment doc all intact. - Clicking Create then refuses: `founding: a community already exists on this installation` (`ErrCommunityExists`). The operator is wedged in a loop: a screen inviting an action the backend will always refuse — exactly #325's shape ("S4 renders but every access/address op refuses post-Founded"), now at S1 via the recovery flow. ## Definition of done Either (a) the recovery action **performs its named teardown** — stop the guest, delete the VM disk + community state — and only then lands on Create (which then succeeds), or (b) the recovery routes to the resume/retry of the standing community instead of S1. Whichever way: no screen may offer an operation whose precondition the recovery just left violated. A test pins it (recovery → next action succeeds).
Author
Owner

close-report for #477 — status success

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

envelope
{
  "issue": 477,
  "status": "success",
  "commits": [
    "db518de34385d7ebbd88ace23e7cfb13e6e1ed5f"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/lib/founding.ts",
    "internal/founding/deploy.go",
    "internal/founding/deploy_test.go",
    "internal/founding/privatepath.go",
    "internal/founding/testing/fakes.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/ -run TestIssue477_VMRetryRecoveryLeavesCreateThatSucceeds",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/founding/... ./internal/vm/... ./app/helper/...",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vue-tsc -p tsconfig.json (app)",
      "exit_code": 0
    },
    {
      "command": "vitest run foundingStandupPrivate/foundingWizard/foundingDeployGateway/foundingPrivatePath/foundingOwnVPSCarrier/foundingSpecGateReachability",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(a) the recovery action performs its named teardown — stop the guest, delete the VM disk + community state — and only then lands on Create (which then succeeds)": "internal/founding/deploy.go: Recover(DeployRetryVM) now calls o.localVM.Remove(ctx) (stop guest + delete disk, via widened LocalVM.Remove seam / vm.Manager.Remove) alongside RemoveNode; restandFromReview clears s.Founded + o.founded (community state) + s.Standup + s.Enrollment and abandons the superseded enrolment, landing on Review where Create succeeds. Verified by TestIssue477 (CreateCommunity after Recover returns no error).",
    "no screen may offer an operation whose precondition the recovery just left violated": "restandFromReview is shared by retry-vm/reinstall/rescue-boot and clears the founded latch for all, so the Review/Create screen every restand recovery lands on now has its precondition (!founded) satisfied.",
    "A test pins it (recovery → next action succeeds)": "internal/founding/deploy_test.go: TestIssue477_VMRetryRecoveryLeavesCreateThatSucceeds asserts recovery -> guest torn down (localVM.Removed==1, !Present) -> CreateCommunity() succeeds; red-checked (fails with ErrCommunityExists + guest-not-torn-down when the fix is reverted). TestStory22 extended to assert the guest teardown."
  },
  "summary": "The private-path deploy-fail VM recovery now stops+deletes the guest and clears the founded/stand-up/enrollment community state, landing on Review where Create succeeds instead of refusing with ErrCommunityExists.",
  "blockers": []
}
**close-report** for #477 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 477, "status": "success", "commits": [ "db518de34385d7ebbd88ace23e7cfb13e6e1ed5f" ], "changed_files": [ "STATUS.md", "app/src/lib/founding.ts", "internal/founding/deploy.go", "internal/founding/deploy_test.go", "internal/founding/privatepath.go", "internal/founding/testing/fakes.go" ], "tests": [ { "command": "go test ./internal/founding/ -run TestIssue477_VMRetryRecoveryLeavesCreateThatSucceeds", "exit_code": 0 }, { "command": "go test ./internal/founding/... ./internal/vm/... ./app/helper/...", "exit_code": 0 }, { "command": "node_modules/.bin/vue-tsc -p tsconfig.json (app)", "exit_code": 0 }, { "command": "vitest run foundingStandupPrivate/foundingWizard/foundingDeployGateway/foundingPrivatePath/foundingOwnVPSCarrier/foundingSpecGateReachability", "exit_code": 0 } ], "criteria": { "(a) the recovery action performs its named teardown — stop the guest, delete the VM disk + community state — and only then lands on Create (which then succeeds)": "internal/founding/deploy.go: Recover(DeployRetryVM) now calls o.localVM.Remove(ctx) (stop guest + delete disk, via widened LocalVM.Remove seam / vm.Manager.Remove) alongside RemoveNode; restandFromReview clears s.Founded + o.founded (community state) + s.Standup + s.Enrollment and abandons the superseded enrolment, landing on Review where Create succeeds. Verified by TestIssue477 (CreateCommunity after Recover returns no error).", "no screen may offer an operation whose precondition the recovery just left violated": "restandFromReview is shared by retry-vm/reinstall/rescue-boot and clears the founded latch for all, so the Review/Create screen every restand recovery lands on now has its precondition (!founded) satisfied.", "A test pins it (recovery → next action succeeds)": "internal/founding/deploy_test.go: TestIssue477_VMRetryRecoveryLeavesCreateThatSucceeds asserts recovery -> guest torn down (localVM.Removed==1, !Present) -> CreateCommunity() succeeds; red-checked (fails with ErrCommunityExists + guest-not-torn-down when the fix is reverted). TestStory22 extended to assert the guest teardown." }, "summary": "The private-path deploy-fail VM recovery now stops+deletes the guest and clears the founded/stand-up/enrollment community state, landing on Review where Create succeeds instead of refusing with ErrCommunityExists.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-12 19:57:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#477
No description provided.