activation: deploy's SSH host-key mismatch renders as journey-fault, not deploy-failed #700

Closed
opened 2026-08-23 10:19:31 +00:00 by matou-build-agent · 3 comments

What failed

activation reds after burning its full 900s ceiling (artifacts/legs.json):

{"leg": "activation", "status": "red", "ms": 900136,
 "error": "expect(locator).toBeVisible() failed\n\nLocator: locator('[data-status=\"hand-off\"]').or(locator('[data-status=\"finish-fault\"]')).or(locator('[data-status=\"deploy-failed\"]')).first()\nExpected: visible\nTimeout: 900000ms\nError: element(s) not found"}

All 16 preceding legs are green, including pair and deploy — this is not the known own-VPS-carrier pairing frontier (that names pairing itself never flipping; here pairing succeeds and the box even gets approved past the spec gate).

The actual fault (present, just invisible to the wait)

logs/founding-state.log (and the screenshot's yaml snapshot in artifacts/journey.rented-rented-gate-014d4--on-a-broker-rented-droplet/error-context.md) show the backend did fault, right after deploy began:

"the stand-up hit a problem — founding: gateway deploy: founding: probe idss-control-plane.service on the gateway: clan: probe idss-control-plane.service on gateway over ssh: exit status 255: ...
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
...
Offending ED25519 key in .../state/own-vps/known_hosts:1
Host key verification failed."

The screenshot confirms this rendered on screen, with a Retry / "Switch the Access option" pair of buttons — i.e. the UI did show a fault banner, but not one of the three statuses the leg watches for.

Root cause, two layers

Product bug (classification): app/src/components/founding/FoundingStandupRented.vue renders standup.fault as data-status="journey-fault" (lines 31-34), documented explicitly as covering the pre-deploy legs ("connect refused / point / seed / supply / configure / pair"). But this fault fired at step: "deploying", stage: "control-plane" — after pairing, once the screen should have handed off to FoundingDeployOutcome (deploy-live / deploy-failed / finish-fault). Worse, that child is gated v-if="!standup?.fault" (line 61) — so once journey-fault is set, deploy-failed can structurally never render. The activation leg's own locator (journey.rented.spec.ts:573) only watches hand-off/finish-fault/deploy-failed, never journey-fault, so it waits out the entire 900s ceiling instead of failing on the real, already-known error.

Underlying infra fact the classification bug is masking: the rented VMMode path's own comments (internal/founding/rentedpath.go:34,265) assert "no reboot — the box keeps the host key connect learned", i.e. RotateHostKey is deliberately skipped for rented (unlike own-VPS after a takeover). That invariant was violated in this run: the SSH host key the control-plane probe met differs from the one connect pinned into state/own-vps/known_hosts, right after enroll-activate logged "the overwritten host came back a clan member" — wording that implies the box went away and came back. docs/GOTCHAS.md #47 documents exactly this hazard class (gateway image disko.nix drifting from internal/clan/nodeconfig.go's DiskoLayout, so a VMMode clan update disturbs the already-installed disk on activation — worst case the box never returns; this run's milder case would be a reboot that regenerates /etc/ssh host keys). Note the image-boot leg's disko label check passed, so if #47 is the cause it's a subtler layout drift than bare label presence catches, not a missing partition.

Live droplet

ssh -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=8 root@170.64.134.129 → Connection timed out, matching the harvested logs/droplet-journal.txt / droplet-units.txt / droplet-caddy.txt (all: "ssh: connect ... Connection timed out"). The box is unreachable for both the original harvest and this live check — falling back entirely to the app-side artifacts above; no unit/journal/disk evidence could be pulled live.

What plugging it needs

  1. Harness (fast, safe fix): widen journey.rented.spec.ts's activation-leg locator to also match [data-status="journey-fault"] (or read standup.fault directly via the existing readFault helper) so a deploy-stage fault fails in seconds with its real message instead of a 15-minute timeout.
  2. Product: decide whether a step:"deploying" fault should route through FoundingDeployOutcome's deploy-failed surface instead of (or in addition to) the pre-deploy journey-fault banner — currently the banner's own doc comment says it's scoped to legs before deploy, but the fault plumbing doesn't enforce that scope.
  3. Infra: confirm whether the rented box actually rebooted during enroll-activate (contradicting rentedpath.go's no-reboot assumption) and, if so, wheither fix the cause (check nix/gateway-image/disko.nix against DiskoLayout per GOTCHAS #47) or add a rented-path host-key re-learn step analogous to RotateHostKey, rather than treating a real key change as an unrecoverable MITM refusal.

drive 20260823T092947Z red at activation: expect(locator).toBeVisible() failed Locator: locator('[data-status="hand-off"]').or(locator('[data-status="finish-fault"]')).or(locator('[data-status="deploy-failed"]')).first() Expected: visible Tim
evidence: test-results/…/20260823T092947Z/ on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)

## What failed `activation` reds after burning its full 900s ceiling (`artifacts/legs.json`): ``` {"leg": "activation", "status": "red", "ms": 900136, "error": "expect(locator).toBeVisible() failed\n\nLocator: locator('[data-status=\"hand-off\"]').or(locator('[data-status=\"finish-fault\"]')).or(locator('[data-status=\"deploy-failed\"]')).first()\nExpected: visible\nTimeout: 900000ms\nError: element(s) not found"} ``` All 16 preceding legs are green, including `pair` and `deploy` — **this is not the known own-VPS-carrier pairing frontier** (that names pairing itself never flipping; here pairing succeeds and the box even gets approved past the spec gate). ## The actual fault (present, just invisible to the wait) `logs/founding-state.log` (and the screenshot's yaml snapshot in `artifacts/journey.rented-rented-gate-014d4--on-a-broker-rented-droplet/error-context.md`) show the backend *did* fault, right after `deploy` began: ``` "the stand-up hit a problem — founding: gateway deploy: founding: probe idss-control-plane.service on the gateway: clan: probe idss-control-plane.service on gateway over ssh: exit status 255: ... WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! ... Offending ED25519 key in .../state/own-vps/known_hosts:1 Host key verification failed." ``` The screenshot confirms this rendered on screen, with a Retry / "Switch the Access option" pair of buttons — i.e. the UI *did* show a fault banner, but not one of the three statuses the leg watches for. ## Root cause, two layers **Product bug (classification):** `app/src/components/founding/FoundingStandupRented.vue` renders `standup.fault` as `data-status="journey-fault"` (lines 31-34), documented explicitly as covering the *pre-deploy* legs ("connect refused / point / seed / supply / configure / pair"). But this fault fired at `step: "deploying", stage: "control-plane"` — after pairing, once the screen should have handed off to `FoundingDeployOutcome` (`deploy-live` / `deploy-failed` / `finish-fault`). Worse, that child is gated `v-if="!standup?.fault"` (line 61) — so once `journey-fault` is set, `deploy-failed` can structurally never render. The activation leg's own locator (`journey.rented.spec.ts:573`) only watches `hand-off`/`finish-fault`/`deploy-failed`, never `journey-fault`, so it waits out the entire 900s ceiling instead of failing on the real, already-known error. **Underlying infra fact the classification bug is masking:** the rented VMMode path's own comments (`internal/founding/rentedpath.go:34,265`) assert *"no reboot — the box keeps the host key connect learned"*, i.e. `RotateHostKey` is deliberately skipped for rented (unlike own-VPS after a takeover). That invariant was violated in this run: the SSH host key the control-plane probe met differs from the one `connect` pinned into `state/own-vps/known_hosts`, right after `enroll-activate` logged "the overwritten host came back a clan member" — wording that implies the box went away and came back. `docs/GOTCHAS.md` #47 documents exactly this hazard class (gateway image `disko.nix` drifting from `internal/clan/nodeconfig.go`'s `DiskoLayout`, so a VMMode `clan update` disturbs the already-installed disk on activation — worst case the box never returns; this run's milder case would be a reboot that regenerates `/etc/ssh` host keys). Note the `image-boot` leg's disko **label** check passed, so if #47 is the cause it's a subtler layout drift than bare label presence catches, not a missing partition. ## Live droplet `ssh -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=8 root@170.64.134.129` → `Connection timed out`, matching the harvested `logs/droplet-journal.txt` / `droplet-units.txt` / `droplet-caddy.txt` (all: "ssh: connect ... Connection timed out"). The box is unreachable for both the original harvest and this live check — falling back entirely to the app-side artifacts above; no unit/journal/disk evidence could be pulled live. ## What plugging it needs 1. **Harness (fast, safe fix):** widen `journey.rented.spec.ts`'s activation-leg locator to also match `[data-status="journey-fault"]` (or read `standup.fault` directly via the existing `readFault` helper) so a deploy-stage fault fails in seconds with its real message instead of a 15-minute timeout. 2. **Product:** decide whether a `step:"deploying"` fault should route through `FoundingDeployOutcome`'s `deploy-failed` surface instead of (or in addition to) the pre-deploy `journey-fault` banner — currently the banner's own doc comment says it's scoped to legs before deploy, but the fault plumbing doesn't enforce that scope. 3. **Infra:** confirm whether the rented box actually rebooted during `enroll-activate` (contradicting rentedpath.go's no-reboot assumption) and, if so, wheither fix the cause (check `nix/gateway-image/disko.nix` against `DiskoLayout` per GOTCHAS #47) or add a rented-path host-key re-learn step analogous to `RotateHostKey`, rather than treating a real key change as an unrecoverable MITM refusal. drive `20260823T092947Z` red at `activation`: `expect(locator).toBeVisible() failed Locator: locator('[data-status="hand-off"]').or(locator('[data-status="finish-fault"]')).or(locator('[data-status="deploy-failed"]')).first() Expected: visible Tim` evidence: `test-results/…/20260823T092947Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596) <!-- rehearsal-sig: 4c82deb1e678 -->
Author
Member

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

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

Ruled by agent under ADR 0174 — veto anytime.

Item 2 asked whether a step:"deploying" fault should route through FoundingDeployOutcome's deploy-failed surface. Ruling: yes — a control-plane probe error at the deploy stage is classified as a DeployFailed outcome with per-mode recovery, not a pre-deploy journey-fault.

Why this is a two-way door: it is a revertible classification change in runDeploy (internal/founding/deploy.go), it is provable by an existing-style Go seam test (TestDeploy_ProbeTransportErrorSurfacesAsDeployFailedNotJourneyFault, red before / green after), and it is not a security-posture widening — the changed host key is surfaced honestly (the raw REMOTE HOST IDENTIFICATION HAS CHANGED error rides the failure's downloadable Tail, #546), never auto-accepted. It only moves the SAME fault from a banner that offered Retry/switch-access to the recovery surface that offers resume/reinstall/rescue-boot + download-log + switch-access, matching the documented failJourney contract ("a proper clan deploy failure never lands here — runDeploy records its own per-mode recovery").

What proves it: the new seam test, plus the full internal/founding + internal/clan suites, vue-tsc, and eslint all clean.

The infra root cause (item 3 — did the box reboot, contradicting rentedpath.go's no-reboot assumption; disko drift per GOTCHAS #47 vs a host-key re-learn) is split off to #701 as ready-for-human: it needs a live droplet and a one-way-door host-key-accept decision, both outside a sandbox agent's reach.

**Ruled by agent under ADR 0174 — veto anytime.** Item 2 asked whether a `step:"deploying"` fault should route through `FoundingDeployOutcome`'s `deploy-failed` surface. **Ruling: yes** — a control-plane probe error at the deploy stage is classified as a `DeployFailed` outcome with per-mode recovery, not a pre-deploy `journey-fault`. **Why this is a two-way door:** it is a revertible classification change in `runDeploy` (`internal/founding/deploy.go`), it is provable by an existing-style Go seam test (`TestDeploy_ProbeTransportErrorSurfacesAsDeployFailedNotJourneyFault`, red before / green after), and it is **not** a security-posture widening — the changed host key is surfaced honestly (the raw `REMOTE HOST IDENTIFICATION HAS CHANGED` error rides the failure's downloadable `Tail`, #546), never auto-accepted. It only moves the SAME fault from a banner that offered Retry/switch-access to the recovery surface that offers resume/reinstall/rescue-boot + download-log + switch-access, matching the documented `failJourney` contract ("a proper clan deploy failure never lands here — runDeploy records its own per-mode recovery"). **What proves it:** the new seam test, plus the full `internal/founding` + `internal/clan` suites, `vue-tsc`, and `eslint` all clean. The **infra root cause** (item 3 — did the box reboot, contradicting `rentedpath.go`'s no-reboot assumption; disko drift per GOTCHAS #47 vs a host-key re-learn) is split off to **#701** as `ready-for-human`: it needs a live droplet and a one-way-door host-key-accept decision, both outside a sandbox agent's reach.
Author
Member

close-report for #700 — status success

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

envelope
{
  "issue": 700,
  "status": "success",
  "commits": [
    "734e466c"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/journey.rented.spec.ts",
    "internal/founding/deploy.go",
    "internal/founding/deploy_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/ -run TestDeploy -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/founding/ ./internal/clan/... -count=1",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vue-tsc -p tsconfig.json",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/eslint app/tests/e2e/journey.rented.spec.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Harness: a deploy-stage fault fails the activation leg fast, not a 15-min timeout": "journey.rented.spec.ts activation-leg locator now also watches [data-status=\"journey-fault\"], so readFault reds in seconds with the real message (commit 734e466c)",
    "Product: a step:deploying fault routes through the deploy-failed surface, not journey-fault": "runDeploy (internal/founding/deploy.go) classifies a non-context control-plane probe error as DeployFailed via buildDeployFailure instead of returning it raw; standup.fault is left empty so FoundingDeployOutcome (v-if=!standup.fault) renders deploy-failed — proven by TestDeploy_ProbeTransportErrorSurfacesAsDeployFailedNotJourneyFault (red before / green after)",
    "Infra: confirm whether the rented box rebooted and fix disko drift or add a host-key re-learn": "Split to #701 (ready-for-human): needs a live droplet and a one-way-door host-key-accept decision, outside a sandbox agent's reach"
  },
  "summary": "A deploy-stage control-plane probe transport error now surfaces as deploy-failed with per-mode recovery instead of a journey-fault the activation leg waited out; the E2E locator also watches journey-fault as a safety net.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #700 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 700, "status": "success", "commits": [ "734e466c" ], "changed_files": [ "STATUS.md", "app/tests/e2e/journey.rented.spec.ts", "internal/founding/deploy.go", "internal/founding/deploy_test.go" ], "tests": [ { "command": "go test ./internal/founding/ -run TestDeploy -count=1", "exit_code": 0 }, { "command": "go test ./internal/founding/ ./internal/clan/... -count=1", "exit_code": 0 }, { "command": "node_modules/.bin/vue-tsc -p tsconfig.json", "exit_code": 0 }, { "command": "node_modules/.bin/eslint app/tests/e2e/journey.rented.spec.ts", "exit_code": 0 } ], "criteria": { "Harness: a deploy-stage fault fails the activation leg fast, not a 15-min timeout": "journey.rented.spec.ts activation-leg locator now also watches [data-status=\"journey-fault\"], so readFault reds in seconds with the real message (commit 734e466c)", "Product: a step:deploying fault routes through the deploy-failed surface, not journey-fault": "runDeploy (internal/founding/deploy.go) classifies a non-context control-plane probe error as DeployFailed via buildDeployFailure instead of returning it raw; standup.fault is left empty so FoundingDeployOutcome (v-if=!standup.fault) renders deploy-failed — proven by TestDeploy_ProbeTransportErrorSurfacesAsDeployFailedNotJourneyFault (red before / green after)", "Infra: confirm whether the rented box rebooted and fix disko drift or add a host-key re-learn": "Split to #701 (ready-for-human): needs a live droplet and a one-way-door host-key-accept decision, outside a sandbox agent's reach" }, "summary": "A deploy-stage control-plane probe transport error now surfaces as deploy-failed with per-mode recovery instead of a journey-fault the activation leg waited out; the E2E locator also watches journey-fault as a safety net.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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.

Reference
Matou/idss#700
No description provided.