enroll-activate: SSH never came back after nixos-anywhere reboot (own-VPS frontier) #426
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#426
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?
Failing leg
enroll-activate— the drive threw:(
legs.jsonis[]andartifacts/journey.jsonis{"rows": null, "fault": null}for this run — the per-leg ledger the harness normally writes never got populated; see "Harness defects" below. What actually shows what happened isstate/founding-state.jsonand the app's own fault frame, captured in the Playwright error-context snapshot.)Evidence
state/founding-state.jsonrecords the standup reachingenroll-configure, completing install, then failing to reconnect:fault_resumable: trueis set on that same record — the seam classified this as a re-drivable block, not a manual one. The Playwright page snapshot (artifacts/.../error-context.md) shows the UI rendering exactly that fault with the "Retry the connection" affordance up, confirming the app rendered the carrier-level block correctly rather than crashing.Suspected layer
Infra, matching the KNOWN frontier: nixos-anywhere reboots the VPS mid-takeover (
install · reboot: reboot completefires), but the box does not reliably come back up on :22 within the drive's budget —168.144.172.115refused the connection for the full 1200s. This is the own-VPS carrier issue tracked by the recent hardening commitec5f246("own-VPS takeover comes back over SSH — one networkd unit, plus sshd + root keys the box already trusted"): the pairing (reboot → SSH back up) still does not flip reliably on this box. Nothing in this run's evidence points at a product-code regression — the standup got cleanly through connect, point, seed, and enroll-configure; only the boot-order/networking dependency for SSH-after-reboot is implicated.Plugging it needs: infra-side — either lengthen the enroll-activate wait budget to tolerate this VPS's slower cold-boot networking, or continue the #414 line of work verifying the networkd/sshd unit ordering actually holds across every reboot path this VPS's provider image takes (not just the one #414 fixed). A human/infra call, not something a swarm agent can patch in product code.
Harness defects (secondary, found while diagnosing — worth their own tickets)
These didn't cause the RED, but they degraded this run's diagnosability and blocked the automated healer from getting a turn:
artifacts/legs.jsonis[]andartifacts/journey.jsonis{"rows": null, "fault": null}even thoughstate/founding-state.jsonclearly has a full event list and a fault. The harness's leg-recording step isn't reading the same state the app itself wrote.logs/droplet-journal.txtshowsREMOTE HOST IDENTIFICATION HAS CHANGEDagainst/home/dev/.ssh/known_hosts:86for168.144.172.115, with strict host-key checking rejecting the connection ("note: droplet evidence gather failed (droplet unreachable?) — the run dir keeps the app-side story"). This is a stale system-levelknown_hostsentry from a prior rehearsal against the same reused VPS (each takeover mints a fresh host key) — the evidence-gather step needs to key off the app's ownstate/own-vps/known_hosts(which has the current key) or drop strict checking for this reused rehearsal box.healer-claudenever ran:logs/healer-claude.outis justError: Input must be provided either through stdin or as a prompt argument when using --print, andlogs/healer-claude.errshows five--allowedToolsrules being ignored (**Diagnose.**,**Judge.**,**If,fixing:**,`.sandcastle/rehearsal-*`) — all malformed wildcard patterns rejected by the CLI's allow-rule parser. Even though the fault wasfault_resumable: true(a case the healer is meant to act on), the healer subprocess invocation itself is broken, so no automated retry was ever attempted.drive
20260811T001112Zred atwizard:drive red at wizard — the wizard died before any leg ranevidence:
test-results/…/20260811T001112Z/on matou-workstation (legs.json, droplet-journal.txt, trace)LIVE-PROBE VERDICT (manual session, 2026-08-11 ~01:35Z) — the box CAME BACK; the wait is the defect
The kept droplet from this run (
clan-lab-rehearsal-5f007f33,168.144.172.115— preserved byREHEARSAL_KEEP_RED_DROPLET) is fully alive right now: ping answers, port 22 accepts, SSH as root with the operator key works,hostname=gateway,sshdactive. The #414 triad landed whole (closure autopsy on this run's captured flake: one wan0 unit with address+route,sshd.servicepresent, firewall accepts 22,Port 22).The failure sequence was pure timing: post-reboot, enroll-activate's reconnect got
Connection refused— the box mid-boot, sshd not listening YET (contrast every earlier run'stimed out= no L3 at all) — and treated it as terminal within its window, faulting "the node has not come back yet". The node then finished booting and has served SSH ever since. (On-boxkanidmsits failed as expected — activation bailed before pushing its secrets; not a separate defect.)Scope for this ticket (replaces "never came back"): the own-VPS enroll-activate post-reboot reconnect must tolerate a fresh droplet's boot time — treat
Connection refusedANDtimed outas retryable within a generous bounded window (droplet boot ≈ 30–90s; give it ~5 min with backoff) before classifying the resumable block. The classification/remedy region isinternal/clan/enrollment.go:695-716(the connectivity-block classifier the #406 worker mapped); the reconnect loop that gave up sits on the activate path just above it. A unit case: refused-then-accepting fake target → activate succeeds.With this landed, the next drive's frontier is genuinely past reachability: secrets push → activation → seed services → pairing ceremony.
Landed in
fd108b4onorigin/main.Fix (product code, adopting this ticket's LIVE-PROBE VERDICT scope — the box came back; the wait was the defect):
verify(the enroll-activatemachines updateon the activate path) now re-drives on aFailConnectivity— bothconnection refusedandconnection timed outclassify there — within a bounded backoff budget before conceding the still-resumable block. A fresh droplet reboots mid-takeover and can honestly refuse/time-out on:22for its cold-boot window (≈30–90s); giving up on the first knock faulted "the node has not come back yet" on a healthy box.Adapter.reconnectWindow(defaultdefaultReconnectWindow= 5 min) bounds the total reconnect backoff budget;reconnectBackoffis 5s→10s→20s→30s-capped;sleepCtxis a ctx-cancellable wait (injectable for the seam tests).Seam tests (
internal/clan/enrollment_test.go), incl. the ticket's named unit case:TestEnroll_ActivateRetriesRefusedRebootThenBecomesMember— refused-then-accepting fake target → activate succeeds (member).TestEnroll_ActivateGivesUpAfterReconnectWindowThenBlocksResumable— refused-forever → resumable block, only after spending the budget.TestEnroll_ActivateSeveredMidReconnectBlocksResumable— severed mid-wait → resumable block, one attempt.TestEnroll_ActivateTerminalFailureDoesNotRetry— secrets fault → terminal, no retry.Files:
internal/clan/enrollment.go,internal/clan/adapter.go,internal/clan/enrollment_test.go,STATUS.md.Out of scope — the three harness defects flagged while diagnosing are left to their own tickets (per-leg evidence not captured; post-run evidence-gather host-key mismatch; broken
healer-claude--allowedToolsparsing). The next drive's frontier is genuinely past reachability: secrets push → activation → seed services → pairing ceremony.clan machines update, and the droplet never comes back — reboot-vs-no-reboot contradiction (follow-on to #700) #702clan machines update, and the droplet never comes back — reboot-vs-no-reboot contradiction (follow-on to #700) #702