Spike Q2.2 — real fresh-host full-install takeover (S13 residual) #12

Closed
opened 2026-07-23 05:58:40 +00:00 by ben · 8 comments
Owner

Spike Q2.2 — real fresh-host full-install takeover

Focused gating spike — the one clan-shaped risk still carrying paper instead of evidence. S13 (issue #4) confirmed the takeover mechanism (headless-capable, nixos-anywhere/kexec-style disk overwrite driven via clan) but did not execute it against a real non-NixOS host. Ticket #9 carries the ruling: this must be executed before the device-add slice ships. Filed from the device-add grill (2026-07-23); when to-tickets emits device-add's slices, the deploy-touching slice takes a native depends_on this issue.

Task manifest

task: spike-q22-fresh-host-takeover
type: spike
validates:
  - docs/adr/0024-design-install-mode-on-device-end.md   # full-install failure semantics
  - docs/adr/0028-one-enrollment-mechanism.md            # deploy-over-established-connection
informs:
  - docs/seams/clan.md                                   # layered outcome detection at takeover
  - the device-add feature spec (takeover-ready contract, CONTEXT.md)
interface: n/a — spike; produces findings + prototype, not product code
seam: docs/spike-findings/q22-fresh-host-takeover.md
acceptance:
  - given: a fresh stock-Ubuntu host with only the takeover-ready residue staged
      (sshd up, community-shaped SSH trust installed; agent stand-in acceptable)
    when: the takeover is driven headlessly over the established SSH connection
    then: the host is disk-overwritten to NixOS and comes back as a clan member,
          end to end, with commands/output/timings recorded
  - given: the takeover is interrupted mid-run (connection drop; forced reboot
      mid-write as a power-cut analog)
    then: each failure is classified for legibility per clan.md's layered
          outcome detection, and the recovery observed matches ADR 0024's
          promise (resume the deploy, or reinstall the agent / rescue boot —
          there is no old OS to roll back to)
  - given: the findings doc
    when: the spike closes
    then: it ends with an explicit verdict — confirmed / confirmed-with-workaround
          (described) / broken (described) — plus measured constraints (kexec
          RAM floor, disk, duration) checked against the takeover-ready
          contract in CONTEXT.md
depends_on: []
out_of_scope:
  - VM mode (ADR 0056 — no takeover there)
  - the operator app / dashboard surfaces (scripts stand in)
  - the agent binary itself (a stand-in staging script is fine; the contract
    under test is takeover-ready, not the agent)
needs_human_decision: []

Environment

The clan-lab skill environment, plus one extra plain DigitalOcean droplet from a stock Ubuntu image as the takeover target (it must NOT come from the golden snapshot — the whole point is a fresh non-NixOS host). Drive the takeover from the lab's gateway-shaped node over SSH, mirroring the fleet direction. Destroy everything at the end (clan-lab teardown + the extra droplet).

Deliverables

  • docs/spike-findings/q22-fresh-host-takeover.md (verdict-shaped, evidence inline)
  • prototype under spikes/q22-fresh-host-takeover/
  • close this issue with the verdict as the closing comment
# Spike Q2.2 — real fresh-host full-install takeover **Focused gating spike** — the one clan-shaped risk still carrying paper instead of evidence. S13 (issue #4) confirmed the takeover *mechanism* (headless-capable, nixos-anywhere/kexec-style disk overwrite driven via clan) but did not execute it against a real non-NixOS host. Ticket #9 carries the ruling: **this must be executed before the device-add slice ships**. Filed from the device-add grill (2026-07-23); when `to-tickets` emits device-add's slices, the deploy-touching slice takes a native `depends_on` this issue. ## Task manifest ```yaml task: spike-q22-fresh-host-takeover type: spike validates: - docs/adr/0024-design-install-mode-on-device-end.md # full-install failure semantics - docs/adr/0028-one-enrollment-mechanism.md # deploy-over-established-connection informs: - docs/seams/clan.md # layered outcome detection at takeover - the device-add feature spec (takeover-ready contract, CONTEXT.md) interface: n/a — spike; produces findings + prototype, not product code seam: docs/spike-findings/q22-fresh-host-takeover.md acceptance: - given: a fresh stock-Ubuntu host with only the takeover-ready residue staged (sshd up, community-shaped SSH trust installed; agent stand-in acceptable) when: the takeover is driven headlessly over the established SSH connection then: the host is disk-overwritten to NixOS and comes back as a clan member, end to end, with commands/output/timings recorded - given: the takeover is interrupted mid-run (connection drop; forced reboot mid-write as a power-cut analog) then: each failure is classified for legibility per clan.md's layered outcome detection, and the recovery observed matches ADR 0024's promise (resume the deploy, or reinstall the agent / rescue boot — there is no old OS to roll back to) - given: the findings doc when: the spike closes then: it ends with an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — plus measured constraints (kexec RAM floor, disk, duration) checked against the takeover-ready contract in CONTEXT.md depends_on: [] out_of_scope: - VM mode (ADR 0056 — no takeover there) - the operator app / dashboard surfaces (scripts stand in) - the agent binary itself (a stand-in staging script is fine; the contract under test is takeover-ready, not the agent) needs_human_decision: [] ``` ## Environment The `clan-lab` skill environment, plus **one extra plain DigitalOcean droplet from a stock Ubuntu image** as the takeover target (it must NOT come from the golden snapshot — the whole point is a fresh non-NixOS host). Drive the takeover from the lab's gateway-shaped node over SSH, mirroring the fleet direction. Destroy everything at the end (`clan-lab` teardown + the extra droplet). ## Deliverables - `docs/spike-findings/q22-fresh-host-takeover.md` (verdict-shaped, evidence inline) - prototype under `spikes/q22-fresh-host-takeover/` - close this issue with the verdict as the closing comment
Author
Owner

Sandcastle picked this up but is blocked in this run: no DigitalOcean credentials in the sandbox. DIGITALOCEAN_ACCESS_TOKEN is unset and doctl is unauthenticated here, so clan-lab create (and the extra stock-Ubuntu takeover-target droplet) cannot be provisioned — this spike needs a real lab it cannot reach. No repo or state changes made; leaving open.

To run this spike, the swarm invocation needs the DO token forwarded into the sandbox (the org-level Actions secret the matou-workstation runner normally materialises into .env). Everything else the manifest asks for is in place (clan-lab + lab-dns skills, doctl binary present).

Sandcastle picked this up but is **blocked in this run: no DigitalOcean credentials in the sandbox**. `DIGITALOCEAN_ACCESS_TOKEN` is unset and `doctl` is unauthenticated here, so `clan-lab create` (and the extra stock-Ubuntu takeover-target droplet) cannot be provisioned — this spike needs a real lab it cannot reach. No repo or state changes made; leaving open. To run this spike, the swarm invocation needs the DO token forwarded into the sandbox (the org-level Actions secret the matou-workstation runner normally materialises into `.env`). Everything else the manifest asks for is in place (clan-lab + lab-dns skills, `doctl` binary present).
Author
Owner

Blocked — external dependency: no DigitalOcean credentials in this Sandcastle run.

This spike's acceptance is real execution: stand up the clan-lab control plane and one extra plain stock-Ubuntu droplet (explicitly not from the golden snapshot), drive a headless disk-overwrite takeover over SSH, interrupt it mid-run, classify the failures, and record commands/output/timings — then tear it all down. Every deliverable is real-world evidence; the issue itself frames this as "the one clan-shaped risk still carrying paper instead of evidence." Both the lab and the takeover target require provisioning on DigitalOcean.

The clan-lab skill (and the extra target, via clan-lab create --fresh) drive doctl, which needs DIGITALOCEAN_ACCESS_TOKEN. In this iteration that token is absent:

  • no .sandcastle/.env (only .env.example, which documents the key as required for clan-lab tasks and empty by default);
  • DIGITALOCEAN_ACCESS_TOKEN unset in the environment;
  • no doctl auth config (doctl account get → "access token is required").

Only FORGEJO_* credentials were forwarded into the sandbox. Without a DO token I cannot provision either the lab or the takeover target, so the spike cannot run. I will not fabricate a findings report — paper evidence is exactly what this spike exists to replace.

To unblock: supply DIGITALOCEAN_ACCESS_TOKEN to the Sandcastle run (via .sandcastle/.env or the runner's org secrets, per .sandcastle/.env.example). With it present, the plan is: clan-lab create for the gateway-shaped control plane + clan-lab create --fresh (tagged/TTL'd, stock Ubuntu) as the takeover target, drive the takeover from the lab node over SSH mirroring fleet direction, run the two interruption cases, write docs/spike-findings/q22-fresh-host-takeover.md (verdict-shaped) + prototype under spikes/q22-fresh-host-takeover/, then clan-lab destroy everything.

Leaving this issue open. No repo changes made this iteration.

**Blocked — external dependency: no DigitalOcean credentials in this Sandcastle run.** This spike's acceptance is *real* execution: stand up the `clan-lab` control plane **and** one extra plain stock-Ubuntu droplet (explicitly not from the golden snapshot), drive a headless disk-overwrite takeover over SSH, interrupt it mid-run, classify the failures, and record commands/output/timings — then tear it all down. Every deliverable is real-world evidence; the issue itself frames this as "the one clan-shaped risk still carrying paper instead of evidence." Both the lab and the takeover target require provisioning on DigitalOcean. The `clan-lab` skill (and the extra target, via `clan-lab create --fresh`) drive `doctl`, which needs `DIGITALOCEAN_ACCESS_TOKEN`. In this iteration that token is absent: - no `.sandcastle/.env` (only `.env.example`, which documents the key as required for clan-lab tasks and empty by default); - `DIGITALOCEAN_ACCESS_TOKEN` unset in the environment; - no `doctl` auth config (`doctl account get` → "access token is required"). Only `FORGEJO_*` credentials were forwarded into the sandbox. Without a DO token I cannot provision either the lab or the takeover target, so the spike cannot run. I will **not** fabricate a findings report — paper evidence is exactly what this spike exists to replace. **To unblock:** supply `DIGITALOCEAN_ACCESS_TOKEN` to the Sandcastle run (via `.sandcastle/.env` or the runner's org secrets, per `.sandcastle/.env.example`). With it present, the plan is: `clan-lab create` for the gateway-shaped control plane + `clan-lab create --fresh` (tagged/TTL'd, stock Ubuntu) as the takeover target, drive the takeover from the lab node over SSH mirroring fleet direction, run the two interruption cases, write `docs/spike-findings/q22-fresh-host-takeover.md` (verdict-shaped) + prototype under `spikes/q22-fresh-host-takeover/`, then `clan-lab destroy` everything. Leaving this issue **open**. No repo changes made this iteration.
Author
Owner

Sandcastle: blocked on lab credentials — leaving open.

This spike requires real DigitalOcean infrastructure (a clan-lab plus one extra fresh stock-Ubuntu droplet as the takeover target), but the Sandcastle runner has no DO access: doctl is unauthenticated, DIGITALOCEAN_ACCESS_TOKEN is unset, and there is no .sandcastle/.env. The clan-lab skill (and the extra droplet) cannot be provisioned, so the takeover cannot be driven or its failures classified.

To unblock: provide a DigitalOcean token to the runner (e.g. DIGITALOCEAN_ACCESS_TOKEN in .sandcastle/.env, per the clan-lab skill), then re-run. Nothing else here is blocking — depends_on: [], and this should run early.

**Sandcastle: blocked on lab credentials — leaving open.** This spike requires real DigitalOcean infrastructure (a `clan-lab` plus one extra fresh stock-Ubuntu droplet as the takeover target), but the Sandcastle runner has no DO access: `doctl` is unauthenticated, `DIGITALOCEAN_ACCESS_TOKEN` is unset, and there is no `.sandcastle/.env`. The `clan-lab` skill (and the extra droplet) cannot be provisioned, so the takeover cannot be driven or its failures classified. To unblock: provide a DigitalOcean token to the runner (e.g. `DIGITALOCEAN_ACCESS_TOKEN` in `.sandcastle/.env`, per the `clan-lab` skill), then re-run. Nothing else here is blocking — `depends_on: []`, and this should run early.
Author
Owner

Blocked (this Sandcastle iteration): no DigitalOcean credential in the sandbox.

This is a real-infrastructure gating spike — it requires the clan-lab environment (a DO droplet) plus one extra stock-Ubuntu DO droplet as the fresh-host takeover target. Neither can be provisioned without a DigitalOcean API token, and this run has none:

  • DIGITALOCEAN_ACCESS_TOKEN is unset; .sandcastle/.env does not exist (only .env.example, where the key is blank).
  • doctl account get → Error: ... access token is required.
  • .claude/skills/clan-lab/clan-lab status → same error (the CLI can't init the DO client).

No code/test workaround is possible: the spike's whole point is a real disk-overwrite takeover of a real fresh non-NixOS host with measured commands/output/timings and mid-run interruption — a mock would validate nothing (interface: n/a — spike; produces findings + prototype, not product code).

To unblock: provide a DigitalOcean token to the swarm (populate DIGITALOCEAN_ACCESS_TOKEN in .sandcastle/.env, per .sandcastle/.env.example and the clan-lab SKILL). Then a future iteration can: clan-lab create a lab host, provision one plain stock-Ubuntu droplet (deliberately not from the golden snapshot), stage the takeover-ready residue, drive the headless nixos-anywhere/kexec takeover from the gateway-shaped node over SSH, exercise the two interrupt cases, write the verdict-shaped docs/spike-findings/q22-fresh-host-takeover.md + prototype under spikes/q22-fresh-host-takeover/, and destroy everything.

Leaving open — not guessing a verdict. depends_on: [] and needs_human_decision: [] are satisfied; the only gap is the credential.

Context: device-add spec #13 carries this as a native depends_on for its deploy-touching slice (per ticket #9), so this stays on the critical path for device-add.

**Blocked (this Sandcastle iteration): no DigitalOcean credential in the sandbox.** This is a real-infrastructure gating spike — it requires the `clan-lab` environment (a DO droplet) **plus** one extra stock-Ubuntu DO droplet as the fresh-host takeover target. Neither can be provisioned without a DigitalOcean API token, and this run has none: - `DIGITALOCEAN_ACCESS_TOKEN` is unset; `.sandcastle/.env` does not exist (only `.env.example`, where the key is blank). - `doctl account get` → `Error: ... access token is required`. - `.claude/skills/clan-lab/clan-lab status` → same error (the CLI can't init the DO client). No code/test workaround is possible: the spike's whole point is a *real* disk-overwrite takeover of a *real* fresh non-NixOS host with measured commands/output/timings and mid-run interruption — a mock would validate nothing (`interface: n/a — spike; produces findings + prototype, not product code`). **To unblock:** provide a DigitalOcean token to the swarm (populate `DIGITALOCEAN_ACCESS_TOKEN` in `.sandcastle/.env`, per `.sandcastle/.env.example` and the `clan-lab` SKILL). Then a future iteration can: `clan-lab create` a lab host, provision one plain stock-Ubuntu droplet (deliberately *not* from the golden snapshot), stage the takeover-ready residue, drive the headless nixos-anywhere/kexec takeover from the gateway-shaped node over SSH, exercise the two interrupt cases, write the verdict-shaped `docs/spike-findings/q22-fresh-host-takeover.md` + prototype under `spikes/q22-fresh-host-takeover/`, and destroy everything. Leaving open — not guessing a verdict. `depends_on: []` and `needs_human_decision: []` are satisfied; the only gap is the credential. Context: device-add spec #13 carries this as a native `depends_on` for its deploy-touching slice (per ticket #9), so this stays on the critical path for device-add.
Author
Owner

Blocked in this Sandcastle iteration — no DigitalOcean credentials in the sandbox.

This spike's Environment section requires the clan-lab skill to stand up real DO infrastructure (the lab control plane + one extra plain stock-Ubuntu droplet as the fresh-host takeover target). clan-lab needs an authenticated doctl / DIGITALOCEAN_ACCESS_TOKEN.

This sandbox only carries FORGEJO_TOKEN / FORGEJO_API. DIGITALOCEAN_ACCESS_TOKEN is unset and .sandcastle/.env does not exist (only .env.example, which reserves that key precisely 'for tasks that use the clan-lab skill'). Verified:

  • doctl account get -> Error: ... access token is required
  • clan-lab status -> same

Without provisioning I cannot execute the headless takeover, the mid-run interruption cases, or capture the measured constraints the acceptance clauses ask for. To unblock: add DIGITALOCEAN_ACCESS_TOKEN to the swarm runner's .sandcastle/.env so it forwards into the sandbox.

No code changed. Prior art the execution will build on when unblocked: spikes/S13-clan-orchestration/ + docs/spike-findings/S13-clan-orchestration.md (Q2.2 mechanism-confirmed, execution-pending). Leaving open.

**Blocked in this Sandcastle iteration — no DigitalOcean credentials in the sandbox.** This spike's Environment section requires the `clan-lab` skill to stand up real DO infrastructure (the lab control plane + one extra plain stock-Ubuntu droplet as the fresh-host takeover target). `clan-lab` needs an authenticated `doctl` / `DIGITALOCEAN_ACCESS_TOKEN`. This sandbox only carries `FORGEJO_TOKEN` / `FORGEJO_API`. `DIGITALOCEAN_ACCESS_TOKEN` is unset and `.sandcastle/.env` does not exist (only `.env.example`, which reserves that key precisely 'for tasks that use the clan-lab skill'). Verified: - `doctl account get` -> `Error: ... access token is required` - `clan-lab status` -> same Without provisioning I cannot execute the headless takeover, the mid-run interruption cases, or capture the measured constraints the acceptance clauses ask for. **To unblock:** add `DIGITALOCEAN_ACCESS_TOKEN` to the swarm runner's `.sandcastle/.env` so it forwards into the sandbox. No code changed. Prior art the execution will build on when unblocked: `spikes/S13-clan-orchestration/` + `docs/spike-findings/S13-clan-orchestration.md` (Q2.2 mechanism-confirmed, execution-pending). Leaving open.
Author
Owner

Blocked — external dependency (no DigitalOcean credentials in the swarm environment).

Picked this spike up in a Sandcastle iteration (it is the one genuinely-ready, self-contained task of the three currently ready-for-agent; #11 and #13 are feature specs still waiting on the Phase-2 slice-map, with no repo skeleton to build into yet).

The spike's substance is real evidence: stand up the clan-lab, provision one fresh stock-Ubuntu droplet as the takeover target, drive a headless disk-overwrite takeover over SSH, exercise the interruption/recovery cases, and record measured constraints (kexec RAM floor, disk, duration). Every acceptance clause requires executing against real DigitalOcean infrastructure — a nested-VM stand-in cannot produce the honest resource-floor/duration numbers the manifest asks for, and fabricating a verdict would defeat the whole point of a gating spike.

What I verified in this environment:

  • DIGITALOCEAN_ACCESS_TOKEN is not set, and there is no .sandcastle/.env carrying it (run-swarm.sh copies .env.example, whose DIGITALOCEAN_ACCESS_TOKEN= is empty).
  • doctl has no authenticated context (doctl account get → access token is required), so clan-lab create / status / any droplet op fails.
  • .sandcastle/.env.example documents this token as "only needed by tasks that use the clan-lab skill" — i.e. it is deliberately optional and was not forwarded into this swarm run.

To unblock: provision a DigitalOcean API token into the swarm's sandbox — set DIGITALOCEAN_ACCESS_TOKEN in .sandcastle/.env (or the Actions secret the workflow forwards), the same credential the two prior gating spikes (#4, #5) used. Once present, this spike can run end-to-end via the clan-lab skill (lab as the gateway-shaped driver) plus one extra reapable stock-Ubuntu droplet as the fresh takeover target, producing docs/spike-findings/q22-fresh-host-takeover.md + spikes/q22-fresh-host-takeover/ and closing with the verdict.

Leaving open. No code or findings committed (there is nothing real to report yet).

**Blocked — external dependency (no DigitalOcean credentials in the swarm environment).** Picked this spike up in a Sandcastle iteration (it is the one genuinely-ready, self-contained task of the three currently `ready-for-agent`; #11 and #13 are feature specs still waiting on the Phase-2 slice-map, with no repo skeleton to build into yet). The spike's substance is *real evidence*: stand up the `clan-lab`, provision **one fresh stock-Ubuntu droplet** as the takeover target, drive a headless disk-overwrite takeover over SSH, exercise the interruption/recovery cases, and record measured constraints (kexec RAM floor, disk, duration). Every acceptance clause requires executing against real DigitalOcean infrastructure — a nested-VM stand-in cannot produce the honest resource-floor/duration numbers the manifest asks for, and fabricating a verdict would defeat the whole point of a gating spike. What I verified in this environment: - `DIGITALOCEAN_ACCESS_TOKEN` is **not set**, and there is no `.sandcastle/.env` carrying it (`run-swarm.sh` copies `.env.example`, whose `DIGITALOCEAN_ACCESS_TOKEN=` is empty). - `doctl` has no authenticated context (`doctl account get` → *access token is required*), so `clan-lab create` / `status` / any droplet op fails. - `.sandcastle/.env.example` documents this token as *"only needed by tasks that use the clan-lab skill"* — i.e. it is deliberately optional and was not forwarded into this swarm run. **To unblock:** provision a DigitalOcean API token into the swarm's sandbox — set `DIGITALOCEAN_ACCESS_TOKEN` in `.sandcastle/.env` (or the Actions secret the workflow forwards), the same credential the two prior gating spikes (#4, #5) used. Once present, this spike can run end-to-end via the `clan-lab` skill (lab as the gateway-shaped driver) plus one extra reapable stock-Ubuntu droplet as the fresh takeover target, producing `docs/spike-findings/q22-fresh-host-takeover.md` + `spikes/q22-fresh-host-takeover/` and closing with the verdict. Leaving open. No code or findings committed (there is nothing real to report yet).
Author
Owner

Unblocked: DIGITALOCEAN_ACCESS_TOKEN is now a Matou org Actions secret and swarm.yml forwards it into the sandbox (commit 749ba2b), so doctl / the clan-lab skill can authenticate. Re-arming with ready-for-agent.

Unblocked: `DIGITALOCEAN_ACCESS_TOKEN` is now a Matou org Actions secret and `swarm.yml` forwards it into the sandbox (commit 749ba2b), so `doctl` / the clan-lab skill can authenticate. Re-arming with `ready-for-agent`.
Author
Owner

Q2.2 executed on real hardware — verdict: CONFIRMED-WITH-WORKAROUND.

A real fresh stock-Ubuntu DigitalOcean droplet (not the golden snapshot) was disk-overwritten to NixOS and came back a clan member, end to end, driven headlessly from the gateway over the established community SSH trust — mirroring the fleet direction. The takeover mechanism S13 flagged is real and executable.

Acceptance — all PASS (evidence in the findings doc):

  • Fresh Ubuntu + takeover-ready residue (agent stand-in, ClanTrust key, community-signed host cert, consented full-install NodeCert stand-in) → clan machines install (kexec→disko wipe→install→GRUB→reboot) → NixOS 26.11 on the overwritten disk (ext4 /dev/vda3); the residue was WIPED (no old OS underneath); the gateway then drove clan machines update over the connection (rc=0, ~33s — ADR 0028).
  • Interruptions per ADR 0024: a connection drop mid-run → classified interrupted → resume the deploy (idempotent re-drive) → reachable member; a forced reboot mid-write (power-cut during the closure copy, after disko wiped Ubuntu's table) → the half-written disk boots nothing — no old OS to roll back to → rescue boot + reinstall recovered it to a member.
  • Measured constraints (real, non-nested droplet): 2.0 GB system closure · 2.6 GB disk on / + 58 MB ESP · ~120 s on 8 GB / ~204 s on 2 GB · kexec RAM floor probed ≤ 2 GB (validated on a real s-1vcpu-2gb droplet, no OOM; zswap on by default).

The workaround (not a clan defect — inputs to the device-add takeover-ready contract): a fresh cloud host cannot self-describe, so the node config must carry facts captured at enrollment: DO is static-networked via a config drive, not DHCP, so capture the public IP/CIDR, gateway, DNS and the public NIC's MAC (a droplet has two NICs; match by MAC like DO's own netplan) and bake them in; use a hybrid BIOS+UEFI disko layout (clan-core's ext4-single-disk); clan-core is networkd fleet-wide. Also fed to docs/seams/clan.md: two takeover-time classifier token-stealing bugs (config-eval stolen by "disko"; SIGKILL "Killed" stolen by OOM) — the echo of S13's connectivity-before-secrets lesson, both fixed.

Deliverables: docs/spike-findings/q22-fresh-host-takeover.md (verdict-shaped, evidence inline) + prototype spikes/q22-fresh-host-takeover/. Committed on sandcastle/worker/20260724-021537-50d2d5 (a9c7289); STATUS.md updated — the validation ledger is now empty, and the device-add deploy slice's depends_on #12 is satisfied. All lab infrastructure (driver + target droplets, extra SSH key) destroyed.

**Q2.2 executed on real hardware — verdict: CONFIRMED-WITH-WORKAROUND.** A real fresh **stock-Ubuntu DigitalOcean droplet** (not the golden snapshot) was **disk-overwritten to NixOS and came back a clan member, end to end**, driven **headlessly from the gateway** over the established community SSH trust — mirroring the fleet direction. The takeover mechanism S13 flagged is real and executable. **Acceptance — all PASS (evidence in the findings doc):** - Fresh Ubuntu + takeover-ready residue (agent stand-in, ClanTrust key, community-signed host cert, consented full-install NodeCert stand-in) → `clan machines install` (kexec→disko wipe→install→GRUB→reboot) → **NixOS 26.11 on the overwritten disk (ext4 /dev/vda3); the residue was WIPED** (no old OS underneath); the gateway then drove `clan machines update` over the connection (rc=0, ~33s — ADR 0028). - **Interruptions per ADR 0024:** a **connection drop** mid-run → classified `interrupted` → **resume the deploy** (idempotent re-drive) → reachable member; a **forced reboot mid-write** (power-cut during the closure copy, after disko wiped Ubuntu's table) → **the half-written disk boots nothing — no old OS to roll back to** → **rescue boot + reinstall** recovered it to a member. - **Measured constraints (real, non-nested droplet):** 2.0 GB system closure · 2.6 GB disk on `/` + 58 MB ESP · ~120 s on 8 GB / ~204 s on 2 GB · **kexec RAM floor probed ≤ 2 GB** (validated on a real `s-1vcpu-2gb` droplet, no OOM; zswap on by default). **The workaround (not a clan defect — inputs to the device-add takeover-ready contract):** a fresh cloud host cannot self-describe, so the node config must carry facts captured at enrollment: DO is **static-networked via a config drive, not DHCP**, so capture the public IP/CIDR, gateway, DNS **and the public NIC's MAC** (a droplet has two NICs; match by MAC like DO's own netplan) and bake them in; use a **hybrid BIOS+UEFI disko layout** (clan-core's `ext4-single-disk`); clan-core is **networkd fleet-wide**. Also fed to `docs/seams/clan.md`: two takeover-time classifier **token-stealing** bugs (config-eval stolen by "disko"; SIGKILL "Killed" stolen by OOM) — the echo of S13's connectivity-before-secrets lesson, both fixed. **Deliverables:** `docs/spike-findings/q22-fresh-host-takeover.md` (verdict-shaped, evidence inline) + prototype `spikes/q22-fresh-host-takeover/`. Committed on `sandcastle/worker/20260724-021537-50d2d5` (`a9c7289`); `STATUS.md` updated — the validation ledger is now empty, and the device-add deploy slice's `depends_on` #12 is satisfied. All lab infrastructure (driver + target droplets, extra SSH key) destroyed.
ben closed this issue 2026-07-24 04:23:55 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#12
No description provided.