supply leg red: guest-trust SSH key never created for own-vps carrier before fleetwire uses it #432

Closed
opened 2026-08-11 07:33:04 +00:00 by ben · 1 comment
Owner

Failure

The drive got through the entire own-vps install/enroll sequence — connect, DNS pointing, flake/brand seeding, nixos-anywhere takeover (kexec/disko/install/reboot), and enroll-activate confirming clan membership — then went red on the very next stage, supply ("seed the fleet software onto the server"), and the Playwright wait timed out 600s later because the standup never moved past it.

Evidence

logs/founding-state.log (standup.fault, and the last supply event):

the stand-up hit a problem — founding: seed the fleet software onto the server: fleetwire: prepare the guest dirs: fleetwire: ssh: exit status 255 — Warning: Identity file /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/20260811T071123Z/state/guest-trust/id_ed25519 not accessible: No such file or directory.
root@127.0.0.1: Permission denied (publickey).

artifacts/journey.droplet-.../error-context.md (rendered fault line and the Playwright timeout):

JourneyFailure: journey leg "supply" went red: budget of 600s elapsed at "absent"
...
"founding: seed the fleet software onto the server: fleetwire: prepare the guest dirs: fleetwire: ssh: exit status 255 — Warning: Identity file .../state/guest-trust/id_ed25519 not accessible: No such file or directory. root@127.0.0.1: Permission denied (publickey)."

Confirmed directly against the run's own state tree — the identity file's parent directory doesn't exist at all:

$ ls state/guest-trust
ls: cannot access 'state/guest-trust': No such file or directory

Compare with sibling per-run trust material that WAS seeded:

state/own-vps/known_hosts   (142 bytes — present)
state/sops/age/keys.txt     (152 bytes — present)
state/guest-trust/          (absent)

Nothing in founding-state.log's event list — connect/point/seed/enroll-configure/enroll-activate/supply — ever mentions generating or installing a guest-trust keypair; the supply stage's first action is to use state/guest-trust/id_ed25519 against root@127.0.0.1 (fleetwire tunnelling through the gateway to the guest), and that is the only reference to it anywhere in the run.

Absent: artifacts/legs.json is [] and artifacts/journey.json is {"rows": null, "fault": null} — the harness's leg/row recording never got populated because founding died before reaching that point. Consistent with the above, not independent evidence.

Suspected layer

Product (founding/fleetwire), with a possible harness contribution. The supply stage's fleetwire step is handed a path (state/guest-trust/id_ed25519) under the run's own state directory that some step is supposed to populate before fleetwire's first SSH call — the same way state/own-vps/known_hosts and state/sops/age/keys.txt get pre-seeded. Whichever side owns it (a founding stage that should generate the keypair and push it as an authorized key onto the gateway before invoking fleetwire, or a harness-side state-seeding step analogous to the known_hosts/age-key seeding that simply omits guest-trust for the own-vps carrier), the step is missing outright — not misconfigured, not racing, just never run. This is NOT the known own-vps-pairing frontier ("pairing never flips"): legs.json here is empty, carrying no skip reason, so this is a distinct defect.

Two secondary, separate gaps observed in the same run (worth their own tickets, not this one's root cause):

  • logs/healer-claude.err: the auto-healer crashed on launch (Error: Input must be provided either through stdin or as a prompt argument when using --print, plus six "Wildcard tool name ... not supported in allow rules" warnings against its --allowedTools config) — so no auto-remediation/retry was attempted against this fault.
  • logs/droplet-journal.txt: the post-mortem droplet evidence-gather itself failed — "Host key verification failed" / "REMOTE HOST IDENTIFICATION HAS CHANGED" — because it went through the harness's ambient ~/.ssh/known_hosts (stale entry from a prior droplet at the same IP) instead of the run's own freshly-learned state/own-vps/known_hosts. That is why every logs/guest-*.log is empty/failed — not because the guest software didn't run.

What plugging it needs

Find wherever the own-vps supply/fleetwire path is wired up and add (or fix) the step that generates a guest-trust ed25519 keypair into the run's state directory and installs the public half as an authorized key on the gateway, ordered before fleetwire's first "prepare the guest dirs" SSH call — mirroring however state/own-vps/known_hosts and state/sops/age/keys.txt already get pre-seeded for this carrier. A regression test should assert state/guest-trust/id_ed25519 exists and is readable before the supply stage's first SSH attempt.

drive 20260811T071123Z red at wizard: drive red at wizard — the wizard died before any leg ran
evidence: test-results/…/20260811T071123Z/ on matou-workstation (legs.json, droplet-journal.txt, trace)

## Failure The drive got through the entire `own-vps` install/enroll sequence — connect, DNS pointing, flake/brand seeding, nixos-anywhere takeover (kexec/disko/install/reboot), and enroll-activate confirming clan membership — then went red on the very next stage, **supply** ("seed the fleet software onto the server"), and the Playwright wait timed out 600s later because the standup never moved past it. ## Evidence `logs/founding-state.log` (`standup.fault`, and the last `supply` event): ``` the stand-up hit a problem — founding: seed the fleet software onto the server: fleetwire: prepare the guest dirs: fleetwire: ssh: exit status 255 — Warning: Identity file /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/20260811T071123Z/state/guest-trust/id_ed25519 not accessible: No such file or directory. root@127.0.0.1: Permission denied (publickey). ``` `artifacts/journey.droplet-.../error-context.md` (rendered fault line and the Playwright timeout): ``` JourneyFailure: journey leg "supply" went red: budget of 600s elapsed at "absent" ... "founding: seed the fleet software onto the server: fleetwire: prepare the guest dirs: fleetwire: ssh: exit status 255 — Warning: Identity file .../state/guest-trust/id_ed25519 not accessible: No such file or directory. root@127.0.0.1: Permission denied (publickey)." ``` Confirmed directly against the run's own state tree — the identity file's parent directory doesn't exist at all: ``` $ ls state/guest-trust ls: cannot access 'state/guest-trust': No such file or directory ``` Compare with sibling per-run trust material that WAS seeded: ``` state/own-vps/known_hosts (142 bytes — present) state/sops/age/keys.txt (152 bytes — present) state/guest-trust/ (absent) ``` Nothing in `founding-state.log`'s event list — connect/point/seed/enroll-configure/enroll-activate/supply — ever mentions generating or installing a guest-trust keypair; the supply stage's first action is to *use* `state/guest-trust/id_ed25519` against `root@127.0.0.1` (fleetwire tunnelling through the gateway to the guest), and that is the only reference to it anywhere in the run. Absent: `artifacts/legs.json` is `[]` and `artifacts/journey.json` is `{"rows": null, "fault": null}` — the harness's leg/row recording never got populated because founding died before reaching that point. Consistent with the above, not independent evidence. ## Suspected layer **Product** (founding/fleetwire), with a possible **harness** contribution. The `supply` stage's fleetwire step is handed a path (`state/guest-trust/id_ed25519`) under the run's own state directory that some step is supposed to populate before fleetwire's first SSH call — the same way `state/own-vps/known_hosts` and `state/sops/age/keys.txt` get pre-seeded. Whichever side owns it (a founding stage that should generate the keypair and push it as an authorized key onto the gateway before invoking fleetwire, or a harness-side state-seeding step analogous to the known_hosts/age-key seeding that simply omits guest-trust for the own-vps carrier), the step is missing outright — not misconfigured, not racing, just never run. This is NOT the known own-vps-pairing frontier ("pairing never flips"): `legs.json` here is empty, carrying no skip reason, so this is a distinct defect. Two secondary, separate gaps observed in the same run (worth their own tickets, not this one's root cause): - `logs/healer-claude.err`: the auto-healer crashed on launch (`Error: Input must be provided either through stdin or as a prompt argument when using --print`, plus six "Wildcard tool name ... not supported in allow rules" warnings against its `--allowedTools` config) — so no auto-remediation/retry was attempted against this fault. - `logs/droplet-journal.txt`: the post-mortem droplet evidence-gather itself failed — "Host key verification failed" / "REMOTE HOST IDENTIFICATION HAS CHANGED" — because it went through the harness's ambient `~/.ssh/known_hosts` (stale entry from a prior droplet at the same IP) instead of the run's own freshly-learned `state/own-vps/known_hosts`. That is why every `logs/guest-*.log` is empty/failed — not because the guest software didn't run. ## What plugging it needs Find wherever the own-vps `supply`/fleetwire path is wired up and add (or fix) the step that generates a guest-trust ed25519 keypair into the run's state directory and installs the public half as an authorized key on the gateway, ordered before fleetwire's first "prepare the guest dirs" SSH call — mirroring however `state/own-vps/known_hosts` and `state/sops/age/keys.txt` already get pre-seeded for this carrier. A regression test should assert `state/guest-trust/id_ed25519` exists and is readable before the supply stage's first SSH attempt. drive `20260811T071123Z` red at `wizard`: `drive red at wizard — the wizard died before any leg ran` evidence: `test-results/…/20260811T071123Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) <!-- rehearsal-sig: dcf630511b50 -->
Author
Owner

Fixed in e7a21d7 (on origin/main).

Root cause: the own-VPS guest-facing family (supply, fleet, enrolment) drives the box over the founding guest-trust identity at the loopback forward, but only the PRIVATE path ever minted that key (guestTrust.Ensure, baked into the local VM via fw_cfg). The own-VPS carrier never ran that step, so state/guest-trust/id_ed25519 was never created and the installed box never trusted it — supplys first prepare the guest dirs SSH died on the missing identity file / Permission denied (publickey).

Fix (internal/founding/ownvpspath.go): runOwnVPSJourney now mints the guest trust (the SAME guestTrust seam the private path uses — never a second key) BEFORE the FullInstall, and threads its public half into the takeover request's AuthorizedKeys via appendGuestTrust, so access.nix bakes it ALONGSIDE the operator's own keys (#414). The private-key file therefore exists on disk before supply's first SSH, and the installed box already trusts it. The guest-trust seam is now a required own-VPS seam (requireOwnVPSSeams -> ErrGuestTrustUnavailable), fail-loud before minting anything (ADR 0100).

Regression tests (seam): TestOwnVPS_MintsGuestTrustAndInstallsItOnTheBoxBeforeSupply (asserts the guest trust is minted and its public key is in the FullInstall AuthorizedKeys, alongside the operator key, before supply seeds) and TestOwnVPS_UnwiredGuestTrustFailsLoud. The real file-write behaviour (state/guest-trust/id_ed25519, 0600) is covered by the existing internal/sshkey tests the production adapter calls.

Deferred to their own tickets (the same run's two secondary gaps noted in this issue): the auto-healer crashing on launch (--print with no prompt + wildcard --allowedTools), and the post-mortem evidence-gather failing strict host-key checking through ambient ~/.ssh/known_hosts instead of the run's own state/own-vps/known_hosts.

Fixed in e7a21d7 (on origin/main). **Root cause:** the own-VPS guest-facing family (supply, fleet, enrolment) drives the box over the founding guest-trust identity at the loopback forward, but only the PRIVATE path ever minted that key (`guestTrust.Ensure`, baked into the local VM via fw_cfg). The own-VPS carrier never ran that step, so `state/guest-trust/id_ed25519` was never created and the installed box never trusted it — `supply`s first `prepare the guest dirs` SSH died on the missing identity file / `Permission denied (publickey)`. **Fix (`internal/founding/ownvpspath.go`):** `runOwnVPSJourney` now mints the guest trust (the SAME `guestTrust` seam the private path uses — never a second key) BEFORE the FullInstall, and threads its public half into the takeover request's `AuthorizedKeys` via `appendGuestTrust`, so access.nix bakes it ALONGSIDE the operator's own keys (#414). The private-key file therefore exists on disk before supply's first SSH, and the installed box already trusts it. The guest-trust seam is now a required own-VPS seam (`requireOwnVPSSeams` -> `ErrGuestTrustUnavailable`), fail-loud before minting anything (ADR 0100). **Regression tests (seam):** `TestOwnVPS_MintsGuestTrustAndInstallsItOnTheBoxBeforeSupply` (asserts the guest trust is minted and its public key is in the FullInstall `AuthorizedKeys`, alongside the operator key, before supply seeds) and `TestOwnVPS_UnwiredGuestTrustFailsLoud`. The real file-write behaviour (`state/guest-trust/id_ed25519`, 0600) is covered by the existing `internal/sshkey` tests the production adapter calls. **Deferred to their own tickets (the same run's two secondary gaps noted in this issue):** the auto-healer crashing on launch (`--print` with no prompt + wildcard `--allowedTools`), and the post-mortem evidence-gather failing strict host-key checking through ambient `~/.ssh/known_hosts` instead of the run's own `state/own-vps/known_hosts`.
ben closed this issue 2026-08-11 14:47:00 +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.

Reference
Matou/idss#432
No description provided.