founding (rented / own-VPS): no host-toolchain gate — with no Nix the app RENTS the server, then dies at seed with a raw exec: "nix" error and a Retry that cannot work #1696

Closed
opened 2026-09-21 17:07:27 +00:00 by ben · 2 comments
Owner

What happened (hand re-founding of Whakatōhea Demo, 2026-09-21, laptop with NO Nix — true first run)

Rented path + IDIP. Ben pressed Build it at ~12:02 local. For ~3 minutes the only feedback was the button reading "building…" — no stand-up screen. Meanwhile the app RENTED the gateway (droplet idss-gateway-whakatohea-demo-6f00, $60/mo, billing). Then the stand-up screen appeared already failed, under the row "Point your community name at the server":

founding: seed the community config: clan: config mutation "idss: seed the community flake for whakatohea-demo": clan: lock the community flake: exec: "nix": executable file not found in $PATH

with only Retry, which can never succeed: there is no Nix on the machine and nothing on this path offers to install it.

Cause

The host-toolchain gate (ADR 0125 — probe for nix BEFORE any work, rest at prepare this machine, install on consent, resume) lives only in Orchestrator.StandUpPrivate (internal/founding/toolchain.go). rentedpath.go / standuprented.go / ownvpspath.go never probe, yet they shell out to nix through the same clan seam (seed → nix flake lock). So every non-private path hits "a bare-PATH wall mid-stand-up that the operator can do nothing about in-app" — the exact failure the ADR exists to prevent — and the rented path hits it AFTER spending money.

Three defects, one ticket each side of the same wall

  1. No toolchain gate on the rented / own-VPS / self-hosted paths. Probe before the rent call (nothing irreversible may happen before the machine can finish the job); rest at prepare this machine with the same consent + polkit install + auto-resume as the private path. Seam test per path: nix absent → no rent, no claim, blocked at prepare-machine; install → resumes.
  2. "Build it" gives no feedback for the whole rent step (~3 min). The stand-up checklist must appear immediately with the rent row running — not a relabelled button. (Frame: DDR 0144 single bar.)
  3. The failure is mis-filed and raw. A seed/lock failure is shown under "Point your community name at the server", as a Go error chain. It should sit on its own row, in plain words, and when the cause is exec: "nix": executable file not found it must route to prepare-this-machine, never a Retry that cannot work (ADR 0100: honest, and actionable).

Workaround used today

Ben installs Nix by hand with the same command the app uses (internal/toolchain/installer.go), then presses Retry.

Build record: idss_0.1.0_amd64.deb sha256 ecff1f99…6e87febc, source 5b910ef3. Relates to ADR 0125, #478, #1562.

## What happened (hand re-founding of Whakatōhea Demo, 2026-09-21, laptop with NO Nix — true first run) Rented path + IDIP. Ben pressed **Build it** at ~12:02 local. For ~3 minutes the only feedback was the button reading "building…" — no stand-up screen. Meanwhile the app RENTED the gateway (droplet `idss-gateway-whakatohea-demo-6f00`, $60/mo, billing). Then the stand-up screen appeared already failed, under the row **"Point your community name at the server"**: ``` founding: seed the community config: clan: config mutation "idss: seed the community flake for whakatohea-demo": clan: lock the community flake: exec: "nix": executable file not found in $PATH ``` with only **Retry**, which can never succeed: there is no Nix on the machine and nothing on this path offers to install it. ## Cause The host-toolchain gate (ADR 0125 — probe for nix BEFORE any work, rest at *prepare this machine*, install on consent, resume) lives only in `Orchestrator.StandUpPrivate` (`internal/founding/toolchain.go`). `rentedpath.go` / `standuprented.go` / `ownvpspath.go` never probe, yet they shell out to nix through the same clan seam (seed → `nix flake lock`). So every non-private path hits "a bare-PATH wall mid-stand-up that the operator can do nothing about in-app" — the exact failure the ADR exists to prevent — and the rented path hits it AFTER spending money. ## Three defects, one ticket each side of the same wall 1. **No toolchain gate on the rented / own-VPS / self-hosted paths.** Probe before the rent call (nothing irreversible may happen before the machine can finish the job); rest at *prepare this machine* with the same consent + polkit install + auto-resume as the private path. Seam test per path: nix absent → no rent, no claim, blocked at prepare-machine; install → resumes. 2. **"Build it" gives no feedback for the whole rent step (~3 min).** The stand-up checklist must appear immediately with the rent row running — not a relabelled button. (Frame: DDR 0144 single bar.) 3. **The failure is mis-filed and raw.** A seed/lock failure is shown under "Point your community name at the server", as a Go error chain. It should sit on its own row, in plain words, and when the cause is `exec: "nix": executable file not found` it must route to prepare-this-machine, never a Retry that cannot work (ADR 0100: honest, and actionable). ## Workaround used today Ben installs Nix by hand with the same command the app uses (`internal/toolchain/installer.go`), then presses Retry. Build record: `idss_0.1.0_amd64.deb` sha256 `ecff1f99…6e87febc`, source `5b910ef3`. Relates to ADR 0125, #478, #1562.

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

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

close-report for #1696 — status success

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

envelope
{
  "issue": 1696,
  "status": "success",
  "commits": [
    "368260e07858d6273b0274ec5ce7e0ebee26bbe5"
  ],
  "changed_files": [
    "STATUS.md",
    "app/helper/cmd/helper/wiring_prod.go",
    "app/src/components/founding/FoundingStandup.vue",
    "app/src/lib/founding.ts",
    "app/tests/unit/foundingRentedToolchainGate.test.ts",
    "internal/clan/testing/fake.go",
    "internal/founding/manualpath.go",
    "internal/founding/preview.go",
    "internal/founding/privatepath.go",
    "internal/founding/rentedpath.go",
    "internal/founding/rentedpath_toolchain_test.go",
    "internal/founding/stdio.go",
    "internal/founding/toolchain.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/founding/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "node node_modules/vitest/vitest.mjs run --exclude '**/rendererBuild.test.ts' (app, 1868 tests)",
      "exit_code": 0
    },
    {
      "command": "vue-tsc -p tsconfig.json --noEmit (app)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Defect 1: probe before the rent — nix absent => no rent, no claim, blocked at prepare-machine": "internal/founding/preview.go CreateCommunity calls gateBuildToolchain before provision; internal/founding/toolchain.go gateBuildToolchain persists the unfounded prepare-machine block and CreateCommunity returns ErrToolchainMissing. Proven by TestBuildIt_RentedWithoutNixBlocksBeforeTheRent (asserts 0 rents, 0 claims, not founded, step=prepare-machine) in rentedpath_toolchain_test.go.",
    "Defect 1: install => resumes": "PrepareMachine (toolchain.go) is path-aware via resumeAfterPrepare: rented pre-rent block runs CreateCommunity (rents+founds) then StandUpRented. Proven by TestPrepareMachine_RentedInstallsThenRentsAndResumes (1 rent, runs to hand-off) and TestPrepareMachine_RentedWithoutElevationHoldsThenBuildResumes (no rent while pending; Build resumes after operator-run install).",
    "Defect 1: same consent + polkit install + auto-resume as the private path": "Reuses StandupPrepareMachine + ToolchainState + PrepareMachine + WithToolchainInstaller (ADR 0125); wiring_prod.go injects the prober/installer for every path. App FoundingStandup renders the block off standup-state and drives the same prepare-machine consent action.",
    "Defect 3: seed/lock failure sits on its own prepare-machine row, and exec:\"nix\" routes to prepare-this-machine not a Retry": "internal/founding/privatepath.go seedCommunityConfig detects isNixMissing and calls faultToPrepareMachine (toolchain.go), which sets step=prepare-machine (not a raw Fault). resumeRented/resumeOwnVPS re-probe and relaunch. Proven by TestSeed_NixWallRoutesToPrepareMachineNotADeadRetry (step=prepare-machine, no fault; resumes to hand-off once nix present).",
    "App wiring": "app/src/lib/founding.ts createCommunity() returns null when blocked; FoundingStandup.onLoad renders the rented pre-rent block from standup-state and its no-elevation poll re-drives Build; FakeFoundingClient mirrors the gate. Proven by app/tests/unit/foundingRentedToolchainGate.test.ts and the full app vitest suite (1868 green, vue-tsc clean).",
    "Defect 2 (immediate checklist during the ~3-min rent)": "Out of scope here — UI-only, split to #1697 (needs-design). Recorded in STATUS.md."
  },
  "summary": "Rented founding now gates on nix BEFORE the rent (no more paid-server-then-die), and a seed-leg nix wall routes to prepare-this-machine instead of a dead Retry; the immediate-checklist cosmetic (defect 2) is split to #1697.",
  "blockers": []
}
**close-report** for #1696 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1696, "status": "success", "commits": [ "368260e07858d6273b0274ec5ce7e0ebee26bbe5" ], "changed_files": [ "STATUS.md", "app/helper/cmd/helper/wiring_prod.go", "app/src/components/founding/FoundingStandup.vue", "app/src/lib/founding.ts", "app/tests/unit/foundingRentedToolchainGate.test.ts", "internal/clan/testing/fake.go", "internal/founding/manualpath.go", "internal/founding/preview.go", "internal/founding/privatepath.go", "internal/founding/rentedpath.go", "internal/founding/rentedpath_toolchain_test.go", "internal/founding/stdio.go", "internal/founding/toolchain.go" ], "tests": [ { "command": "go test ./internal/founding/...", "exit_code": 0 }, { "command": "go test ./internal/clan/...", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/founding/... ./internal/clan/...", "exit_code": 0 }, { "command": "node node_modules/vitest/vitest.mjs run --exclude '**/rendererBuild.test.ts' (app, 1868 tests)", "exit_code": 0 }, { "command": "vue-tsc -p tsconfig.json --noEmit (app)", "exit_code": 0 } ], "criteria": { "Defect 1: probe before the rent — nix absent => no rent, no claim, blocked at prepare-machine": "internal/founding/preview.go CreateCommunity calls gateBuildToolchain before provision; internal/founding/toolchain.go gateBuildToolchain persists the unfounded prepare-machine block and CreateCommunity returns ErrToolchainMissing. Proven by TestBuildIt_RentedWithoutNixBlocksBeforeTheRent (asserts 0 rents, 0 claims, not founded, step=prepare-machine) in rentedpath_toolchain_test.go.", "Defect 1: install => resumes": "PrepareMachine (toolchain.go) is path-aware via resumeAfterPrepare: rented pre-rent block runs CreateCommunity (rents+founds) then StandUpRented. Proven by TestPrepareMachine_RentedInstallsThenRentsAndResumes (1 rent, runs to hand-off) and TestPrepareMachine_RentedWithoutElevationHoldsThenBuildResumes (no rent while pending; Build resumes after operator-run install).", "Defect 1: same consent + polkit install + auto-resume as the private path": "Reuses StandupPrepareMachine + ToolchainState + PrepareMachine + WithToolchainInstaller (ADR 0125); wiring_prod.go injects the prober/installer for every path. App FoundingStandup renders the block off standup-state and drives the same prepare-machine consent action.", "Defect 3: seed/lock failure sits on its own prepare-machine row, and exec:\"nix\" routes to prepare-this-machine not a Retry": "internal/founding/privatepath.go seedCommunityConfig detects isNixMissing and calls faultToPrepareMachine (toolchain.go), which sets step=prepare-machine (not a raw Fault). resumeRented/resumeOwnVPS re-probe and relaunch. Proven by TestSeed_NixWallRoutesToPrepareMachineNotADeadRetry (step=prepare-machine, no fault; resumes to hand-off once nix present).", "App wiring": "app/src/lib/founding.ts createCommunity() returns null when blocked; FoundingStandup.onLoad renders the rented pre-rent block from standup-state and its no-elevation poll re-drives Build; FakeFoundingClient mirrors the gate. Proven by app/tests/unit/foundingRentedToolchainGate.test.ts and the full app vitest suite (1868 green, vue-tsc clean).", "Defect 2 (immediate checklist during the ~3-min rent)": "Out of scope here — UI-only, split to #1697 (needs-design). Recorded in STATUS.md." }, "summary": "Rented founding now gates on nix BEFORE the rent (no more paid-server-then-die), and a seed-leg nix wall routes to prepare-this-machine instead of a dead Retry; the immediate-checklist cosmetic (defect 2) is split to #1697.", "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.

Dependencies

No dependencies set.

Reference
Matou/idss#1696
No description provided.