device-add: full-install-takeover-ready — Full-install device lands takeover-ready #59

Closed
opened 2026-07-25 04:56:50 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #13 (device-add).

What to build

The residue a full-install join leaves behind — takeover-ready, not taken over. On full-install consent (Linux, CLI P2-S3 or app P3-S3L) nothing destructive happens during the join: when it completes the machine still runs its existing OS at Connected. What device-add leaves is exactly what provisioning's first deploy needs to execute the wipe — the agent as a persistent service, sshd up and reachable over the mesh, the community's SSH trust installed, and the consented mode bound into the NodeCert. The wipe itself (kexec/disk-overwrite via the clan seam) belongs to provisioning's first deploy, never here (ADR 0024).

Because a freshly re-imaged host is statically configured and cannot self-describe at takeover time, the spec-gate/facter probe also captures the host's network facts — public IP + CIDR, default gateway, DNS, and the public NIC's MAC — which ride the takeover-ready contract (spike #12 §6, confirmed 2026-07-24: DHCP-only boots come up unreachable, so the public interface must be matched by MAC). The contract carries a MAC-matched systemd-networkd node config (clan-core is networkd fleet-wide) and a hybrid BIOS+UEFI disko layout (clan-core's ext4-single-disk template) so the overwritten host boots regardless of firmware; the community-signed SSH host cert is what carries the gateway's trust across the re-image without known_hosts churn. Story 14 was amended at the spec gate for exactly these spike inputs.

Notes: this contract is consumed by provisioning's full-install deploy (the wipe is provisioning's). Spike #12 is already closed, so its blocking edge is satisfied. The takeover-ready stager is a fake below THE seam.

Acceptance criteria

  • (story 14) Given full-install consent, When the join completes, Then the machine still runs its existing OS at Connected — takeover-ready: agent as a service, sshd up over the mesh, community SSH trust installed, and the consented mode bound into the NodeCert; the wipe belongs to provisioning's first deploy.
  • (story 14) Given full-install consent, When the agent probes the machine, Then the probe also captures the host's network facts — public IP + CIDR, default gateway, DNS, and the public NIC's MAC — and they ride the takeover-ready contract (a fresh host cannot self-describe at takeover time; spike #12 §6: DHCP-only boots unreachable, the public interface matched by MAC).
  • (story 14, spike #12 §6) Given the takeover-ready contract, When it is assembled, Then it carries a MAC-matched systemd-networkd node config and a hybrid BIOS+UEFI disko layout (clan-core ext4-single-disk) so the overwritten host boots regardless of firmware, with the community-signed SSH host cert carrying trust across the re-image without known_hosts churn.

Blocked by

  • #49 — the CLI full-install consent path
  • #50 — the Linux app full-install consent path

Task manifest

task: device-add:full-install-takeover-ready
implements_flow: p2-device-add-cli
implements_edge: P2-S3→P2-S4 (full install), P3-S3L→P3-S4 (full install)
wireframe:
  - docs/ux/wireframes/p2-device-add-cli/p2-s3-install-mode-consent.html
  - docs/ux/wireframes/p3-device-add-app/p3-s3l-linux-install-mode.html
interface: "takeover-ready stager (fake below the seam) — from the probe assembles the takeover-ready contract: NodeCert (consented mode), community SSH host cert, ClanTrust, captured network facts (public IP/CIDR, gateway, DNS, public NIC MAC) + hybrid BIOS+UEFI disko for the `clan` seam"
seam: "`join`-orchestrator seam tests (ADR 0057) — real `enroll` control-plane face + in-memory ledger/clock; fake takeover-ready stager and clan adapter; assert the contract contents, not the wipe"
acceptance:
  - given: full-install consent
    when: the join completes
    then: the machine still runs its OS at Connected — takeover-ready (agent service, sshd over mesh, community SSH trust, consented mode in NodeCert); wipe is provisioning's
  - given: full-install consent
    when: the agent probes
    then: it captures public IP/CIDR, gateway, DNS, and public NIC MAC, riding the takeover-ready contract (spike #12 §6)
  - given: the takeover-ready contract
    when: assembled
    then: carries a MAC-matched networkd node config + hybrid BIOS+UEFI disko so the re-imaged host boots regardless of firmware; SSH host cert carries trust across re-image
depends_on: [cli-join-happy, app-join-happy]
out_of_scope:
  - "the full-install wipe/takeover execution and its failure screens — provisioning:provision-deploy-full-install's"
  - "story 16 spec-gate rejection — spec-gate-and-virt's"
  - "story 17–20 approve/enroll/land — approve-enroll-land's"
needs_human_decision: []
## Parent Feature spec: #13 (device-add). ## What to build The residue a full-install join leaves behind — takeover-ready, not taken over. On full-install consent (Linux, CLI P2-S3 or app P3-S3L) nothing destructive happens during the join: when it completes the machine still runs its existing OS at Connected. What device-add leaves is exactly what provisioning's first deploy needs to execute the wipe — the agent as a persistent service, sshd up and reachable over the mesh, the community's SSH trust installed, and the consented mode bound into the NodeCert. The wipe itself (kexec/disk-overwrite via the `clan` seam) belongs to provisioning's first deploy, never here (ADR 0024). Because a freshly re-imaged host is statically configured and cannot self-describe at takeover time, the spec-gate/facter probe also **captures the host's network facts** — public IP + CIDR, default gateway, DNS, and the **public NIC's MAC** — which ride the takeover-ready contract (spike #12 §6, confirmed 2026-07-24: DHCP-only boots come up unreachable, so the public interface must be matched by MAC). The contract carries a **MAC-matched systemd-networkd node config** (clan-core is networkd fleet-wide) and a **hybrid BIOS+UEFI disko layout** (clan-core's `ext4-single-disk` template) so the overwritten host boots regardless of firmware; the community-signed SSH host cert is what carries the gateway's trust across the re-image without `known_hosts` churn. Story 14 was amended at the spec gate for exactly these spike inputs. Notes: this contract is consumed by provisioning's full-install deploy (the wipe is provisioning's). Spike #12 is already closed, so its blocking edge is satisfied. The takeover-ready stager is a fake below THE seam. ## Acceptance criteria - [ ] (story 14) Given full-install consent, When the join completes, Then the machine still runs its existing OS at Connected — takeover-ready: agent as a service, sshd up over the mesh, community SSH trust installed, and the consented mode bound into the NodeCert; the wipe belongs to provisioning's first deploy. - [ ] (story 14) Given full-install consent, When the agent probes the machine, Then the probe also captures the host's network facts — public IP + CIDR, default gateway, DNS, and the public NIC's MAC — and they ride the takeover-ready contract (a fresh host cannot self-describe at takeover time; spike #12 §6: DHCP-only boots unreachable, the public interface matched by MAC). - [ ] (story 14, spike #12 §6) Given the takeover-ready contract, When it is assembled, Then it carries a MAC-matched systemd-networkd node config and a hybrid BIOS+UEFI disko layout (clan-core `ext4-single-disk`) so the overwritten host boots regardless of firmware, with the community-signed SSH host cert carrying trust across the re-image without `known_hosts` churn. ## Blocked by - #49 — the CLI full-install consent path - #50 — the Linux app full-install consent path ## Task manifest ```yaml task: device-add:full-install-takeover-ready implements_flow: p2-device-add-cli implements_edge: P2-S3→P2-S4 (full install), P3-S3L→P3-S4 (full install) wireframe: - docs/ux/wireframes/p2-device-add-cli/p2-s3-install-mode-consent.html - docs/ux/wireframes/p3-device-add-app/p3-s3l-linux-install-mode.html interface: "takeover-ready stager (fake below the seam) — from the probe assembles the takeover-ready contract: NodeCert (consented mode), community SSH host cert, ClanTrust, captured network facts (public IP/CIDR, gateway, DNS, public NIC MAC) + hybrid BIOS+UEFI disko for the `clan` seam" seam: "`join`-orchestrator seam tests (ADR 0057) — real `enroll` control-plane face + in-memory ledger/clock; fake takeover-ready stager and clan adapter; assert the contract contents, not the wipe" acceptance: - given: full-install consent when: the join completes then: the machine still runs its OS at Connected — takeover-ready (agent service, sshd over mesh, community SSH trust, consented mode in NodeCert); wipe is provisioning's - given: full-install consent when: the agent probes then: it captures public IP/CIDR, gateway, DNS, and public NIC MAC, riding the takeover-ready contract (spike #12 §6) - given: the takeover-ready contract when: assembled then: carries a MAC-matched networkd node config + hybrid BIOS+UEFI disko so the re-imaged host boots regardless of firmware; SSH host cert carries trust across re-image depends_on: [cli-join-happy, app-join-happy] out_of_scope: - "the full-install wipe/takeover execution and its failure screens — provisioning:provision-deploy-full-install's" - "story 16 spec-gate rejection — spec-gate-and-virt's" - "story 17–20 approve/enroll/land — approve-enroll-land's" needs_human_decision: [] ```
Author
Owner

Done — commit 58b8b10 (sandcastle: device-add:full-install-takeover-ready #59).

What was built (at the ADR 0057 join-orchestrator seam: real enroll ledger + clock, takeover-ready stager and clan adapter faked below):

  • Takeover-ready, not taken over — new TakeoverStager port (internal/join/takeover.go). On a full-install join nothing destructive runs: no VM, no self-remove, and no wipe verb exists on the surface by construction (the wipe is provisioning's first deploy's, ADR 0024). Staging is a gate step before ConfirmEnrolled: sshd up over the mesh + the contract persisted, or the request holds at Approved and retries clean — a machine is never called Connected without the residue.
  • The probe captures the network facts (spike #12 §6) — new enroll.NetworkFacts (public IP/CIDR, gateway, DNS, public NIC MAC), captured on full-install consent, riding Pair and echoed monotonically in RequestView at Pending, so provisioning reads them where it reads the rest of the request. VM-mode joins capture none; a LAN/DHCP host's zero facts still validate.
  • The contract boots the re-imaged host regardless of firmware — facts baked through the clan seam's single constructor (clan.BuildNodeConfig): MAC-matched systemd-networkd node config (explicit gateway interface — the networkd assertion the spike hit) + hybrid BIOS+UEFI disko (clan-core ext4-single-disk), validated against the Q2.2 assertions before staging. The community-signed SSH host cert rides the contract verbatim (trust across the re-image, no known_hosts churn), and the NodeCert now binds the consented mode and consent hash (the ledger stores Pair's ConsentHash and threads it into the GrantSpec — previously dropped).

Evidence: internal/join/takeover_test.go — 6 seam tests covering all three acceptance clauses (landing takeover-ready with the gate order asserted, stage-failure holds at Approved, VM-mode never stages, facts ride Pair → contract, firmware-agnostic node config + SSH-cert carry, zero-fact LAN join). Full Go suite, vet, gofmt green. Seam contract doc (docs/seams/agent-control-plane.md) and STATUS.md updated in the same commit.

Done — commit `58b8b10` (`sandcastle: device-add:full-install-takeover-ready #59`). **What was built** (at the ADR 0057 `join`-orchestrator seam: real `enroll` ledger + clock, takeover-ready stager and clan adapter faked below): - **Takeover-ready, not taken over** — new `TakeoverStager` port (`internal/join/takeover.go`). On a full-install join nothing destructive runs: no VM, no self-remove, and no wipe verb exists on the surface by construction (the wipe is provisioning's first deploy's, ADR 0024). Staging is a gate step **before** `ConfirmEnrolled`: sshd up over the mesh + the contract persisted, or the request holds at Approved and retries clean — a machine is never called Connected without the residue. - **The probe captures the network facts** (spike #12 §6) — new `enroll.NetworkFacts` (public IP/CIDR, gateway, DNS, public NIC MAC), captured on full-install consent, riding `Pair` and echoed monotonically in `RequestView` at Pending, so provisioning reads them where it reads the rest of the request. VM-mode joins capture none; a LAN/DHCP host's zero facts still validate. - **The contract boots the re-imaged host regardless of firmware** — facts baked through the clan seam's single constructor (`clan.BuildNodeConfig`): MAC-matched systemd-networkd node config (explicit gateway interface — the networkd assertion the spike hit) + hybrid BIOS+UEFI disko (clan-core `ext4-single-disk`), validated against the Q2.2 assertions before staging. The community-signed SSH host cert rides the contract verbatim (trust across the re-image, no known_hosts churn), and the NodeCert now binds the consented mode **and consent hash** (the ledger stores Pair's ConsentHash and threads it into the GrantSpec — previously dropped). **Evidence**: `internal/join/takeover_test.go` — 6 seam tests covering all three acceptance clauses (landing takeover-ready with the gate order asserted, stage-failure holds at Approved, VM-mode never stages, facts ride Pair → contract, firmware-agnostic node config + SSH-cert carry, zero-fact LAN join). Full Go suite, vet, gofmt green. Seam contract doc (`docs/seams/agent-control-plane.md`) and `STATUS.md` updated in the same commit.
ben closed this issue 2026-07-25 16:24:03 +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#59
No description provided.