self-hosted full-install: SeedAmbient refuses on the box's post-takeover SSH host key — RotateHostKey never runs (mirrors #438) #633
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#633
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failure
Drive
20260821T051631Z, legdeploy-takeover, red:founding-state.log's failure detail (the real cause, under the honest no-rollback headline):Root cause
The self-hosted "machine at your place" full-install path never rotates the box's pinned SSH host key across the takeover reboot, unlike the own-VPS carrier path which already solved this exact class of bug for #438.
Sequence:
internal/fleetwire/relay.go:125-137(RelayForwarder.Open) opens anssh -N -Rforward to the box overaccept-newagainst the shared known-hosts file (ownVPSKnownHostsPath(), wired atapp/helper/cmd/helper/wiring_prod.go:497-500). It's held open across the whole device-driven pairing ceremony (agent-install → consent → pair), pinning the box's pre-takeover Ubuntu SSH host key. All these legs were green in this run.internal/founding/deploy.go:336-344callscomposeSelfHostedGateway, which drivesclan.Enroll's FullInstall takeover (kexec/disko/install/reboot — also all green: "install complete", "reboot complete", "the overwritten host came back a clan member"). The takeover wipes the disk; fresh NixOS mints a new SSH host key. The install phases pass--host-key-check none(internal/clan/enrollment.goinstallArgs), so they never notice the key changed.internal/founding/deploy.go:362-368then callso.guestSupply.SeedAmbient(ctx, st.GatewayIP, selfHostedSSHPort)→internal/fleetwire/supply.go:60-92(prepare the guest dirsssh step) — the FIRST pinned-posture reconnect after the reboot, overRemoteTarget'sStrictHostKeyChecking=accept-newagainst the SAME known-hosts file the relay already pinned.accept-newonly trusts a host with no prior entry, so it correctly refuses the now-different key as a possible MITM — reproducing verbatim in the evidence above.The existing fix pattern (#438) not reused here
internal/founding/ownvpspath.go:381-397: right after its own FullInstall takeover, the own-VPS carrier path callso.ownVPSCarrier.RotateHostKey(ctx, ip), which doesssh-keygen -R <ip> -f <knownHosts>then re-connectsaccept-newto re-pin the fresh key (internal/fleetwire/carrier.go:122-148). The self-hosted path (internal/founding/selfhostedpath.go,deploy.go) has no equivalent call between the takeover completing andSeedAmbientrunning.o.ownVPSCarrier(theOwnVPSCarrierinterface, which exposesRotateHostKey) is unconditionally wired in production (wiring_prod.go:416-419) regardless of which founding path is taken, so it's reachable from the self-hosted deploy code — this isn't a wiring gap, just a missing call.Suspected layer / what plugging it needs
internal/founding/deploy.go'srunDeploy, self-hosted branch (around line 344-368): aftercomposeSelfHostedGatewaysucceeds (takeover done) and beforeguestSupply.SeedAmbientruns, call something equivalent too.ownVPSCarrier.RotateHostKey(ctx, st.GatewayIP), with a resumable fault on failure (mirroringownvpspath.go:390-396's wording: "the box came back with a new identity; wait for the reboot to finish, then re-drive").This is NOT a same-day self-fix: it requires new fault-handling in
deploy.go, and breaks all six existing tests ininternal/founding/selfhostedpath_test.go(TestSelfHosted_DeployComposesGatewayWithClaimSecretApexAndBaseline,TestSelfHosted_OwnDomainComposesWithoutClaimSecret,TestSelfHosted_SeedsTheCommunityFlakeAndBootstrapsTheOperatorBeforeComposing,TestSelfHosted_RedriveDoesNotRecompose,TestSelfHosted_SupplyFailureRedsTheDeploy,TestSelfHosted_ResumeAfterSupplyFaultRelandsTheBinary), none of which currently wireWithOwnVPSCarrier— each needs a fake carrier wired and possibly new assertions. That's a multi-file, judgment-laden change, not a mechanical one-liner.Worth checking during the fix: whether
RotateHostKey'sssh-keygen -Rshould be scoped to only fire when a self-hosted relay forward actually ran (it's "always wired" per the wiring comment, so may be a safe unconditional call), and whether the resume/idempotency story matches — a resume after a supply fault should re-rotate cleanly (rotating an already-rotated pin is a no-op percarrier.go:135-136's own comment).Evidence
test-results/drive-selfhosted/20260821T051631Z/logs/founding-state.log— full failure detail + event log (install/reboot green, supply red)test-results/drive-selfhosted/20260821T051631Z/state/own-vps/known_hosts— the single stale pinned entry800a2936720bdrive
20260821T051631Zred atdeploy-takeover:the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this machine was taken over for the community.]evidence:
test-results/…/20260821T051631Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)swarm-claim host=matou-dev-server-01 run=8328
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #633 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope