engine-adapters: clan-adapter-enroll — install takeover + update join, resumable (Q2.2 contract) #163
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
Depends on
Reference
Matou/idss#163
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?
Parent
Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending.
What to build
The enrollment verbs real (ADR 0102):
install(full-install takeover — kexec → disko → install → reboot,--phasesresumable) andupdate(VM-mode join), carrying the Q2.2 takeover-ready reconciliations: captured network facts baked as a MAC-matched networkd config, hybrid BIOS+UEFI disko layout, and the interruption classes (severed control → resume; vanished host → timeout, classify, durable Enrollment blocks on a Remedy — never spins forever).Acceptance criteria
Blocked by
Task manifest
enrollpackage + in-memory fakeLanded in
77315f4onorigin/main.ADR 0102
clan.ClanEnroll/Resumeare now the real forward-only, snapshot-resumable state machine (internal/clan/enrollment.go): configure → preflight → install → verify → done, driving the pinned clan CLI headlessly.clan machines install --phases <p>invocations; phase bookkeeping (DonePhases) makes a resume run only the derived retry subset and never re-run destructive disk work. VM-mode joins with a singleupdate.defaultGatewayinterface the spike assertion needs) + hybrid BIOS+UEFI disko, committed as ONE commit through the single writer (BuildNodeConfig→ per-machine Nix undermachines/<node>/), alongside the freshdeploy.targetHost(#162 deferred this per-operation SSH target to #163).Classifyabsorbs two Q2.2 §4 findings: a signal-kill (rc 137/143) reads interrupted from the exit code first; afailed assertionseval failure classifies config_eval before the disk class.clan machines update, ADR 0028) over the community-signed host trust.Acceptance — proven by contract tests over a scripted install-CLI double + a real single-writer git repo (
internal/clan/enrollment_test.go):TestEnroll_FullInstallTakeoverBecomesMember— the bake (MAC networkd + EF02/EF00 disko), all four phases in order, then the verify update.TestEnroll_SeveredControlResumesIdempotently— the block is resumable, Resume drives to Done, and the whole install ran exactly once across the two objects.TestEnroll_VanishedHostTimesOutAndBlocks— a genuinely-hung CLI; the adapters phase timeout fires (never spins), classifies interrupted, blocks on a resumable Remedy.Agent-decided (post-hoc review pending): per-phase
--phasesinvocations (vs one multi-phase call) for testable phase bookkeeping; per-machine Nix rendering of the networkd/disko config.go build ./.../vet/gofmt/ the full Go suite (incl.-race) clean. The engine-adapters arc is complete — every child #162–#183 landed.deploy-files' switch stopsidss-control-plane, whose cgroup holds theclanCLI, andswitch-to-configurationdies at 101 before it ever restarts anything #858