Spec: device-add — enrol a device into an existing fleet (P2+P3) #13

Closed
opened 2026-07-23 06:39:17 +00:00 by ben · 7 comments
Owner

Parent

Wayfinder map: Matou/ourcloud#7 — device-add's definition was locked on ticket #9 (2026-07-21); this spec inherits the map's cross-feature constraints (clan substrate behind the clan seam, one enrollment mechanism with full community CA at v1, Netbird mesh with no relay, hardware minima + spec gate at pairing, advice never veto, seeded-cache supply chain).

Design contract: docs/ux/flows/p2-device-add-cli.mermaid + docs/ux/flows/p3-device-add-app.mermaid + docs/ux/wireframes/p2-device-add-cli/ (5 screens) + docs/ux/wireframes/p3-device-add-app/ (7 screens). Engineering tree: ADRs 0053–0057 plus the enroll seam's additive MintCode/RevokeCode amendment (device-add grill, 2026-07-23). Carried residual — resolved: spike #12 (S13 Q2.2 fresh-host takeover) was executed 2026-07-24, verdict CONFIRMED-WITH-WORKAROUND (docs/spike-findings/q22-fresh-host-takeover.md); its §6 inputs are folded into the takeover-ready acceptance below and the clan seam's Enrollment notes.

Problem Statement

A community's fleet has to grow beyond its first node, and the machines it grows with are whatever the community has: a member's spare PC in a cupboard, an old laptop, a second-hand server. The people at those machines are not sysadmins, and the operator is not standing next to them. Today there is no safe way for an operator to say "add that machine" and for the person holding it to make it happen — without install media to burn and verify, without granting anyone standing access, and without the machine's owner losing the ability to consent to what happens to their hardware (especially a full wipe).

The join also has to be honest about time and failure: approval can take days, machines get rebooted mid-join, codes get mistyped, hardware turns out too weak, and an operator must be able to change their mind — decline — and know the device ends up clean, not half-joined.

Solution

Device-add enrols a device into an existing fleet through the one enrollment mechanism, over two doorways that converge immediately.

The operator starts at Fleet → Add device (P2-S1), picks an intended-role hint (default helper — advice for the device end, never an assignment), and gets a generated enrollment code: short, human-typeable, single-use, expiring (7 days by default), revocable.

On the CLI path (P2, Linux machines and servers), the device owner copy-pastes one install command — served by the community's own gateway — which installs the agent as a persistent service and starts the join. On the app path (P3, Windows/Mac/Linux with no terminal), the owner downloads the operator app, enters the code, and the app's first real act is installing that same standing agent; the join screens are thin UI over it.

Either way the owner consents to an install mode on the device end — full install (Linux only; wipe at first deploy) or VM mode (a local NixOS VM on the agent's bundled QEMU, sized by the hint) — then the agent probes hardware, passes the spec gate, and sends the connection request. The operator sees the pending card (the echoed probe), and approves or declines. Approval converts the weak code into strong, individually revocable device identity; the agent joins the mesh, brings up the clan connection, and the device lands at Connected — not yet set up (full-install devices takeover-ready), heartbeating, waiting for provisioning's Assess. Decline tears the device down clean — VM removed or agent self-removed.

User Stories

Acceptance criteria are Given/When/Then, sourced from the P2/P3 flow nodes and edges (including failure branches), the enroll seam's state machine and error taxonomy, and the ADRs noted.

Minting (operator, dashboard)

  1. As an operator, I want to start every device add from Fleet → Add device (P2-S1), so that both paths begin at one place with one code discipline.

    • Given the Fleet surface, When I choose Add device, Then the CLI path and the app path are both offered and either issues a generated enrollment code — short, human-typeable, single-use, expiring, revocable.
  2. As an operator, I want to give the code an intended-role hint, defaulting to helper (ADR 0055), so that the device end can check specs and size a VM without me committing to anything.

    • Given Add device, When I mint without changing anything, Then the code carries intended role = helper and a 7-day expiry.
    • Given I pick a different hint (storage, gateway), When the code is minted, Then the hint selects the device-end spec-gate floor and VM-mode guest sizing and nothing else — the role is assigned later at provisioning, never here.
  3. As an operator, I want to revoke an unspent code (seam amendment: RevokeCode), so that a code that leaked or went stale stops working.

    • Given an unspent code, When I revoke it, Then redeeming it returns the revoked outcome ("contact the operator"), distinct from expiry and typo.
    • Given a request in flight on that code, When I revoke, Then the agent learns the request is closed (Closure: Revoked) and performs the same teardown as a decline.
  4. As an operator, I want the code screen (P2-S2) to show the code, its expiry, a revoke affordance, and the one install command, so that handing the join to a device owner is one copy-paste.

    • Given P2-S2, When I read the install command, Then it curls the community's own gateway (https://<community-domain>/get) with the code as its argument (ADR 0054) — no Matou-hosted URL.
    • Given P2-S2 is open, When the device calls in, Then the page updates itself without a reload, and leaving the page loses nothing.

CLI path (device owner, device end)

  1. As a device owner, I want one copy-pasted install command on my stock Linux OS, so that joining needs no install media and leaves no operator-driveable tool behind.

    • Given a stock Linux machine, When I run the install command with the code, Then the agent is fetched from the gateway at the fleet's pinned release (never upstream — S13 Q9), installed as a persistent service, and the join starts with the embedded code; the command itself is a doorway, nothing standing is left for an operator to drive.
  2. As a device owner on the CLI path, I want the install-mode choice and consent in my terminal (P2-S3), so that only the person at the machine authorises what happens to it (ADR 0024).

    • Given the agent is installed and the code redeemed, When I am asked for an install mode, Then full install states plainly that the machine will be wiped at first deploy and requires explicit consent; VM mode states what it dedicates and keeps.

App path (device owner, operator app)

  1. As an operator, I want to send the device owner a download link or QR plus the code (P3-S1), so that a non-technical owner can join with no terminal.

    • Given P3-S1, When I share the app, Then the link/QR points at Matou's release channel (ADR 0054) — the app is generic; the community appears only after the code is entered.
  2. As a device owner, I want to enter the code in the app (P3-S2) and see what I'm joining, so that I can trust the request before giving consent.

    • Given a valid code, When it is redeemed, Then the screen shows the branded community, the role hint, the spec floor, the valid install modes for this OS, and the code's expiry — and redeeming does not consume the code.
    • Given I mistype the code, When redemption fails, Then I get the "no such code — retype" outcome and can try again with the same code.
  3. As a device owner, I want the app's first real act to be installing the standing agent (ADR 0053), so that the join — and my machine's membership — never depends on the app staying open.

    • Given the code redeemed, When the join proceeds, Then the agent is installed as a persistent OS service and every join screen from here renders the agent's state over its local socket; closing the app does not stop the join.
  4. As a device owner on Windows or Mac (P3-S3), I want VM mode presented as the way my machine joins, so that my existing OS is kept.

    • Given Windows or Mac, When I reach This computer, Then VM mode is the offered mode (no full install on these hosts) and consent states the dedicated CPU/RAM/disk, sized by the role hint.
  5. As a device owner whose machine has virtualisation disabled, I want per-OS enable steps (P3-S3 self-loop), so that a fixable machine gets fixed rather than rejected.

    • Given VM mode is chosen and virtualisation is unavailable, When the check fails, Then I get the per-OS remedy (enable VT-x/AMD-V in firmware; enable the Windows Hypervisor Platform feature on Windows) or the option to use another machine — and the code survives.
  6. As a device owner on Linux in the app (P3-S3L), I want the mode choice, so that I decide between reversibility and reliability.

    • Given Linux, When I reach the install-mode screen, Then VM mode and full install are both offered, full install carrying the explicit wipe consent (ADR 0024).
  7. As a device owner in VM mode, I want the agent to create and keep the local NixOS VM (ADR 0056), so that my contribution survives reboots without my attention.

    • Given VM-mode consent, When the agent proceeds, Then it creates the guest on its bundled QEMU (KVM/WHPX/HVF acceleration), sized by the hint, registers it for autostart, and then pairs.
  8. As a device owner consenting to full install, I want the wipe deferred to first deploy, so that nothing destructive happens before the operator has approved and set the device up.

    • Given full-install consent, When the join completes, Then my machine still runs its existing OS at Connected — it is takeover-ready (agent as a service, sshd up over the mesh, community SSH trust installed, consented mode bound into the NodeCert) and the wipe belongs to provisioning's first deploy.
    • Given full-install consent, When the agent probes the machine (the spec-gate/facter probe), 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, because a fresh host is statically configured and cannot self-describe at takeover time (spike #12 §6: DHCP-only boots unreachable; the public interface is matched by MAC).

Pairing and the spec gate (both paths)

  1. As a device owner, I want pairing to happen in one shot after consent, so that the probe, my consented mode, and the machine's SSH host key travel together.

    • Given consent is given, When the agent pairs, Then the connection request advances to Pending and the probe report is what the operator's pending card shows — device screen and dashboard card share one type and cannot disagree.
  2. As a device owner with a too-weak machine, I want the spec gate to fail early with a remedy (ADR 0030/0026), so that I'm not stranded mid-deploy later.

    • Given the probe fails the hint's floor, When pairing is rejected, Then I see Need vs Got and a remedy, the request stays Redeemed, and the code survives — I can fix the machine or use another one.
    • Given a Mac that fails the VM arithmetic, When the gate fails, Then the copy says plainly that a Mac has no full-install fallback and this Mac cannot contribute (ADR 0030).
    • Given the hint's floor, When it is evaluated, Then it equals the floor of the cheapest service that role can actually run (ADR 0064) — so a device that passes this gate can be given at least one real job by provisioning; where fleet state has moved on since pairing, provisioning's P4-S1x names why in the device's own numbers and always offers a next step.

Approval, decline, and waiting (operator + device owner)

  1. As an operator, I want a pending-device card (P2-S4 / P3-S4) showing the probed specs and label, so that I approve real hardware, not a guess.

    • Given a Pending request, When I open Fleet, Then the pending card shows the echoed probe and offers approve and decline — the human gate the code discipline exists to reach.
  2. As a device owner, I want the joining screen to wait honestly for days if needed (P3-S4), so that approval on someone else's schedule doesn't fail my join.

    • Given a Pending request, When approval hasn't happened yet, Then the agent long-polls across reboots and network loss and the screen reflects "waiting for approval"; nothing can reach the device inbound before mesh admission, so polling is the only forward mechanism.
  3. As an operator, I want approval to convert the code into strong device identity, so that the community holds every key and can revoke any device individually.

    • Given I approve, When the grant is issued, Then the code is spent forever, and the IdentityGrant carries the community-CA-signed NodeCert (binding device key, consented mode, and role-hint context), the community-signed SSH host cert, the ClanTrust material, and a single-use Netbird setup key.
  4. As an operator, I want the dashboard to show a device as joined only when it truly is, so that the Fleet surface never lies.

    • Given approval, When the agent has joined the mesh, installed its certs, and brought the clan connection up, Then and only then the request reaches Enrolled and the device shows Connected (Approved → Enrolled split).
  5. As an operator, I want decline to end the request cleanly (P2-S4 decline / P3-S4x), so that a device I turned away holds nothing of the community.

    • Given a Pending request, When I decline, Then the request is terminal, the code is consumed, and the agent is informed: a VM-mode join removes its local VM; a full-install join has no VM and the agent removes itself.
    • Given the declined device's owner (P3-S4x), When teardown completes, Then they land back at Welcome — or, with a fresh code from the operator, join again as a new request.
  6. As a device owner whose join was declined mid-wait, I want the decline to reach me as an outcome, not an error, so that the screen tells me what happened and what was removed.

    • Given Declined, When the agent polls, Then it receives the closure (reason + self-removal directive) and the screen states the outcome plainly.

Codes, errors, and resumability (both paths)

  1. As a device owner, I want expired, revoked, consumed, and in-use codes each to say what they are, so that the fix is obvious.

    • Given an expired code, When redeemed, Then "was valid, past expiry — get a fresh code" (distinct from typo).
    • Given a consumed code, When redeemed, Then the already-spent outcome; Given a code bound to a different device, When redeemed by mine, Then the in-use outcome.
  2. As a device owner whose machine crashed or rebooted mid-join, I want the join to resume, not duplicate, so that the operator never sees two pending cards for one machine.

    • Given the agent restarts with its persisted device key, When it re-redeems the same code, Then it rejoins its existing request ((code, KeyID) idempotency anchor); a re-pair returns the existing Pending; a lost approval is re-delivered verbatim.
  3. As an operator, I want the pending list to be a live query over connection requests, so that pending devices appear and resolve without me refreshing.

    • Given pending requests exist, When I view Fleet, Then the list reflects the current request states; terminal requests leave the pending list.

Landing (both paths)

  1. As an operator, I want a newly enrolled device to land at Connected — not yet set up (P2-S5 / P3-S5), so that joining and setting up stay two decisions.

    • Given Enrolled, When I view the device, Then its state is Connected — not yet set up, no role or services are assigned, and the next action offered is provisioning's Assess (P4-S1).
    • Given Enrolled, When the device lands, Then it appears on the resting Fleet list (shell's surface) with its probed identity.
  2. As an operator, I want heartbeats from the moment a device is enrolled, so that staleness is visible from day one.

    • Given Enrolled, When the agent runs, Then it reports on the fleet-reporting face (NodeCert mTLS over the mesh): agent version, uptime, clan-connection state, VM health in VM mode; a missed heartbeat is the staleness signal (monitoring's to surface).
  3. As a device owner on the app path, I want the app to rest at Device home after joining (P3-S5 → shell), so that my machine's membership is visible where I'd look for it.

    • Given Joined, When I exit the join flow, Then I land on Device home showing this device's state; provisioning happens from the operator's side, not mine.

Implementation Decisions

  • One enrollment mechanism (ADR 0028), one state machine. Both paths run the enroll seam's connection-request resource exactly as confirmed: Redeemed → Pending → Approved → Enrolled, with Declined/Expired terminal; monotonic states; non-consuming Redeem; codes spent only on terminal outcomes. The seam doc's state ↔ flow-node mapping is the design contract's spine.
  • The agent owns the join on every path (ADRs 0053/0057). The join orchestrator is a Go package in the agent, running as a persistent OS service. On P3 the app (via its bundled helper) first installs the agent, then renders the agent's states over its local Unix socket — the same carrier founding's relayed paths use. The helper holds no standing duty; the app can close without consequence.
  • Install artifacts split by community-specificity (ADR 0054). The gateway's control plane serves the install script and per-arch agent binaries at the fleet's pinned release (/get); the install command curls the community's own domain; the operator app ships and self-updates on Matou's release channel (ADR 0033). The enrollment code carries no URL.
  • Intended-role hint (ADR 0055). Minted with the code (default helper, operator-selectable), it drives exactly two device-end mechanics — spec-gate floor (ADR 0030's per-role, threads-not-cores arithmetic) and VM-mode guest sizing — and is never a role assignment (ADR 0015). Amended by ADR 0064 (provisioning grill, 2026-07-23): the hint's spec-gate floor is pinned to the floor of the cheapest service that role can actually run. Device-add's gate and provisioning's available-service list must not be able to disagree — otherwise a device owner can wipe a machine on a pass that the setup screen then refuses. The catalogue's per-service minima are the single source for those floors, never a second hand-maintained list.
  • VM substrate (ADR 0056). The agent bundles a pinned QEMU per platform (KVM/WHPX/HVF acceleration; qcow2 + virtio; per-arch NixOS guest artifact), behind a VM-manager interface; the agent registers guests for autostart and supervises them, which is what makes the heartbeat's VM-health field honest. Native hypervisor stacks are a later per-platform swap behind the same interface.
  • Takeover-ready, not taken over (CONTEXT.md). A full-install device at Connected still runs its stock OS with the agent as a service, sshd reachable over the mesh, ClanTrust + community SSH host cert installed, and the consented mode bound into the NodeCert. The wipe (kexec/disk-overwrite via the clan seam) is provisioning's first deploy. Full install is Linux-only; Macs have no full-install fallback.
  • Takeover-ready includes the host's captured network + boot facts (spike #12 §6, 2026-07-24). "Everything provisioning's first deploy needs" must include: the network facts captured at probe time (public IP/CIDR, gateway, DNS, public NIC MAC — baked by the clan seam into 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 (observed live). None of this reverses ADR 0024/0028 — it is the concrete shape of takeover-ready for a real host; see the clan seam's "Spike Q2.2 reconciliation" section.
  • Operator-face contract (seam amendment, 2026-07-23). MintCode (intended role + TTL, default 7 days) and RevokeCode join List/Approve/Decline on the enroll seam's Operator face — additive verbs over the code ledger the seam already hides. Shell's standing codes ledger later consumes the same verbs.
  • Identity conversion as confirmed at the seam gate. Approval issues the IdentityGrant — community-CA-signed NodeCert (90-day, auto-renew at ⅔ validity, 30-day renewal-only grace), community-signed SSH host cert, ClanTrust, single-use Netbird setup key — full community CA at v1. Nothing strong is issued before operator approval; trust-on-first-redeem is bounded by short TTL, single-use, revocation, and the pending-card human gate.
  • Error taxonomy is the screen map. Each typed enrollment error (unknown/expired/revoked/consumed/in-use/spec-gate/virt-unavailable) corresponds to a distinct device-end outcome; a decline is a successful poll with a Closure, never a transport error.

Testing Decisions

  • A good test drives external behaviour at the seam: operator verbs and owner actions in, observable states and issued artifacts out — never the orchestrator's internals, never a faked enroll state machine.
  • THE seam (ADR 0057, re-confirmed at spec time): the agent's join orchestrator wired in-process against the real enroll control-plane service backed by its in-memory ledger + clock (a first-class build target per ADR 0043). Fakes below: VM manager (ADR 0056's interface), mesh admission, takeover-ready stager, artifact serving. Acceptance tests drive both ends — MintCode/Approve/Decline/RevokeCode and mode consent — and assert flow-node states, IdentityGrant contents, teardown residue, and idempotent resume. Every Given/When/Then above executes at this seam.
  • Below the seam: one thin local-socket round-trip test against the real agent binary (mirror of founding's stdio round-trip). Above it: nothing — dashboard and app Vue render states, they do not decide them.
  • Prior art: founding's seam-test harness (in-memory enroll ledger + clock, fake-driven orchestrator — ADR 0052) and the S13 prototype's clan fakes.
  • Non-gating real-lab device-add smoke (spec-time addition, confirmed by Ben): scheduled, clan-lab — stand up the lab control plane, mint a code, join one fresh stock-Ubuntu droplet via the real install command served from the lab gateway's /get, approve, assert Connected/takeover-ready with heartbeats flowing. Fake-drift insurance for the VM-manager and artifact-serving fakes; explicitly not an acceptance gate. The full-install takeover itself is spike #12's, not the smoke's.
  • Spike #12 is a blocking edge, not a test — now satisfied: #12 executed and closed 2026-07-24 (CONFIRMED-WITH-WORKAROUND), so the deploy-touching device-add slice's native depends_on #12 edge is already closed when to-tickets runs.

Out of Scope

  • Role and service assignment, and the first deploy — provisioning's (P4-S1 Assess onward), including executing the full-install takeover and its failure screens (ADR 0024's "no old OS to roll back to" family).
  • The standing enrollment-codes ledger UI and the resting Fleet list — shell's surfaces; device-add only makes new devices appear there and shares the ledger verbs.
  • Steady-state health, alerting, and staleness surfacing — monitoring's, from Connected onward; device-add only starts the heartbeats.
  • Member invites — members admit people (IdP-only, never mesh peers); enrollment codes admit devices. Parallel artifacts, separate feature.
  • Founding's first-node wrap — the same mechanism against the app-hosted face is specced in founding (#11), not here.
  • NodeCert renewal and beyond-grace re-enrolment mechanics — decided at the seam gate; exercised by steady-state features, with re-enrol deliberately being this feature's existing flow.
  • ISO/USB install media and a kept operator CLI — do not exist (ADR 0028; install command is a doorway).
  • Catalogue growth, product renaming — map-level out of scope.

Further Notes

  • needs_human_decision (carried, not re-derived): multi-arch fleet support — Apple Silicon VM-mode helpers make the fleet mixed x86_64 + aarch64, which every service build and the binary cache must then serve (flagged in ADRs 0030/0056; a migration-spec §12 leftover). Decide before (or at) the slice-map if aarch64 devices are admitted at v1 or steered away at the spec gate.
  • Known strain accepted from the seam: spec-gate rejections are typed errors, not states — there is no queryable history of "device X was rejected for RAM". If operators want that history it becomes an audit-log entry later, not a state machine change.
  • Sequencing: this spec waits on the Phase-2 slice-map (needs all eight feature specs); spike #12 can run any time and should run early.
## Parent Wayfinder map: https://git.matou.nz/Matou/ourcloud/issues/7 — device-add's definition was locked on ticket #9 (2026-07-21); this spec inherits the map's cross-feature constraints (clan substrate behind the `clan` seam, one enrollment mechanism with full community CA at v1, Netbird mesh with no relay, hardware minima + spec gate at pairing, advice never veto, seeded-cache supply chain). Design contract: `docs/ux/flows/p2-device-add-cli.mermaid` + `docs/ux/flows/p3-device-add-app.mermaid` + `docs/ux/wireframes/p2-device-add-cli/` (5 screens) + `docs/ux/wireframes/p3-device-add-app/` (7 screens). Engineering tree: ADRs 0053–0057 plus the `enroll` seam's additive MintCode/RevokeCode amendment (device-add grill, 2026-07-23). Carried residual — resolved: spike #12 (S13 Q2.2 fresh-host takeover) was executed 2026-07-24, verdict **CONFIRMED-WITH-WORKAROUND** (`docs/spike-findings/q22-fresh-host-takeover.md`); its §6 inputs are folded into the takeover-ready acceptance below and the clan seam's Enrollment notes. ## Problem Statement A community's fleet has to grow beyond its first node, and the machines it grows with are whatever the community has: a member's spare PC in a cupboard, an old laptop, a second-hand server. The people at those machines are not sysadmins, and the operator is not standing next to them. Today there is no safe way for an operator to say "add that machine" and for the person holding it to make it happen — without install media to burn and verify, without granting anyone standing access, and without the machine's owner losing the ability to consent to what happens to their hardware (especially a full wipe). The join also has to be honest about time and failure: approval can take days, machines get rebooted mid-join, codes get mistyped, hardware turns out too weak, and an operator must be able to change their mind — decline — and know the device ends up clean, not half-joined. ## Solution Device-add enrols a device into an existing fleet through the one enrollment mechanism, over two doorways that converge immediately. The operator starts at **Fleet → Add device** (P2-S1), picks an intended-role hint (default helper — advice for the device end, never an assignment), and gets a generated **enrollment code**: short, human-typeable, single-use, expiring (7 days by default), revocable. On the **CLI path** (P2, Linux machines and servers), the device owner copy-pastes one install command — served by the community's own gateway — which installs the agent as a persistent service and starts the join. On the **app path** (P3, Windows/Mac/Linux with no terminal), the owner downloads the operator app, enters the code, and the app's first real act is installing that same standing agent; the join screens are thin UI over it. Either way the owner **consents to an install mode on the device end** — full install (Linux only; wipe at first deploy) or VM mode (a local NixOS VM on the agent's bundled QEMU, sized by the hint) — then the agent probes hardware, passes the **spec gate**, and sends the **connection request**. The operator sees the pending card (the echoed probe), and **approves or declines**. Approval converts the weak code into strong, individually revocable device identity; the agent joins the mesh, brings up the clan connection, and the device lands at **Connected — not yet set up** (full-install devices takeover-ready), heartbeating, waiting for provisioning's Assess. Decline tears the device down clean — VM removed or agent self-removed. ## User Stories Acceptance criteria are Given/When/Then, sourced from the P2/P3 flow nodes and edges (including failure branches), the `enroll` seam's state machine and error taxonomy, and the ADRs noted. ### Minting (operator, dashboard) 1. As an operator, I want to start every device add from Fleet → Add device (P2-S1), so that both paths begin at one place with one code discipline. - Given the Fleet surface, When I choose Add device, Then the CLI path and the app path are both offered and either issues a generated enrollment code — short, human-typeable, single-use, expiring, revocable. 2. As an operator, I want to give the code an intended-role hint, defaulting to helper (ADR 0055), so that the device end can check specs and size a VM without me committing to anything. - Given Add device, When I mint without changing anything, Then the code carries intended role = helper and a 7-day expiry. - Given I pick a different hint (storage, gateway), When the code is minted, Then the hint selects the device-end spec-gate floor and VM-mode guest sizing and nothing else — the role is assigned later at provisioning, never here. 3. As an operator, I want to revoke an unspent code (seam amendment: RevokeCode), so that a code that leaked or went stale stops working. - Given an unspent code, When I revoke it, Then redeeming it returns the revoked outcome ("contact the operator"), distinct from expiry and typo. - Given a request in flight on that code, When I revoke, Then the agent learns the request is closed (Closure: Revoked) and performs the same teardown as a decline. 4. As an operator, I want the code screen (P2-S2) to show the code, its expiry, a revoke affordance, and the one install command, so that handing the join to a device owner is one copy-paste. - Given P2-S2, When I read the install command, Then it curls the community's own gateway (`https://<community-domain>/get`) with the code as its argument (ADR 0054) — no Matou-hosted URL. - Given P2-S2 is open, When the device calls in, Then the page updates itself without a reload, and leaving the page loses nothing. ### CLI path (device owner, device end) 5. As a device owner, I want one copy-pasted install command on my stock Linux OS, so that joining needs no install media and leaves no operator-driveable tool behind. - Given a stock Linux machine, When I run the install command with the code, Then the agent is fetched from the gateway at the fleet's pinned release (never upstream — S13 Q9), installed as a persistent service, and the join starts with the embedded code; the command itself is a doorway, nothing standing is left for an operator to drive. 6. As a device owner on the CLI path, I want the install-mode choice and consent in my terminal (P2-S3), so that only the person at the machine authorises what happens to it (ADR 0024). - Given the agent is installed and the code redeemed, When I am asked for an install mode, Then full install states plainly that the machine will be wiped at first deploy and requires explicit consent; VM mode states what it dedicates and keeps. ### App path (device owner, operator app) 7. As an operator, I want to send the device owner a download link or QR plus the code (P3-S1), so that a non-technical owner can join with no terminal. - Given P3-S1, When I share the app, Then the link/QR points at Matou's release channel (ADR 0054) — the app is generic; the community appears only after the code is entered. 8. As a device owner, I want to enter the code in the app (P3-S2) and see what I'm joining, so that I can trust the request before giving consent. - Given a valid code, When it is redeemed, Then the screen shows the branded community, the role hint, the spec floor, the valid install modes for this OS, and the code's expiry — and redeeming does not consume the code. - Given I mistype the code, When redemption fails, Then I get the "no such code — retype" outcome and can try again with the same code. 9. As a device owner, I want the app's first real act to be installing the standing agent (ADR 0053), so that the join — and my machine's membership — never depends on the app staying open. - Given the code redeemed, When the join proceeds, Then the agent is installed as a persistent OS service and every join screen from here renders the agent's state over its local socket; closing the app does not stop the join. 10. As a device owner on Windows or Mac (P3-S3), I want VM mode presented as the way my machine joins, so that my existing OS is kept. - Given Windows or Mac, When I reach This computer, Then VM mode is the offered mode (no full install on these hosts) and consent states the dedicated CPU/RAM/disk, sized by the role hint. 11. As a device owner whose machine has virtualisation disabled, I want per-OS enable steps (P3-S3 self-loop), so that a fixable machine gets fixed rather than rejected. - Given VM mode is chosen and virtualisation is unavailable, When the check fails, Then I get the per-OS remedy (enable VT-x/AMD-V in firmware; enable the Windows Hypervisor Platform feature on Windows) or the option to use another machine — and the code survives. 12. As a device owner on Linux in the app (P3-S3L), I want the mode choice, so that I decide between reversibility and reliability. - Given Linux, When I reach the install-mode screen, Then VM mode and full install are both offered, full install carrying the explicit wipe consent (ADR 0024). 13. As a device owner in VM mode, I want the agent to create and keep the local NixOS VM (ADR 0056), so that my contribution survives reboots without my attention. - Given VM-mode consent, When the agent proceeds, Then it creates the guest on its bundled QEMU (KVM/WHPX/HVF acceleration), sized by the hint, registers it for autostart, and then pairs. 14. As a device owner consenting to full install, I want the wipe deferred to first deploy, so that nothing destructive happens before the operator has approved and set the device up. - Given full-install consent, When the join completes, Then my machine still runs its existing OS at Connected — it is takeover-ready (agent as a service, sshd up over the mesh, community SSH trust installed, consented mode bound into the NodeCert) and the wipe belongs to provisioning's first deploy. - Given full-install consent, When the agent probes the machine (the spec-gate/facter probe), 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, because a fresh host is statically configured and cannot self-describe at takeover time (spike #12 §6: DHCP-only boots unreachable; the public interface is matched by MAC). ### Pairing and the spec gate (both paths) 15. As a device owner, I want pairing to happen in one shot after consent, so that the probe, my consented mode, and the machine's SSH host key travel together. - Given consent is given, When the agent pairs, Then the connection request advances to Pending and the probe report is what the operator's pending card shows — device screen and dashboard card share one type and cannot disagree. 16. As a device owner with a too-weak machine, I want the spec gate to fail early with a remedy (ADR 0030/0026), so that I'm not stranded mid-deploy later. - Given the probe fails the hint's floor, When pairing is rejected, Then I see Need vs Got and a remedy, the request stays Redeemed, and the code survives — I can fix the machine or use another one. - Given a Mac that fails the VM arithmetic, When the gate fails, Then the copy says plainly that a Mac has no full-install fallback and this Mac cannot contribute (ADR 0030). - Given the hint's floor, When it is evaluated, Then it equals the floor of the cheapest service that role can actually run (ADR 0064) — so a device that passes this gate can be given at least one real job by provisioning; where fleet state has moved on since pairing, provisioning's P4-S1x names why in the device's own numbers and always offers a next step. ### Approval, decline, and waiting (operator + device owner) 17. As an operator, I want a pending-device card (P2-S4 / P3-S4) showing the probed specs and label, so that I approve real hardware, not a guess. - Given a Pending request, When I open Fleet, Then the pending card shows the echoed probe and offers approve and decline — the human gate the code discipline exists to reach. 18. As a device owner, I want the joining screen to wait honestly for days if needed (P3-S4), so that approval on someone else's schedule doesn't fail my join. - Given a Pending request, When approval hasn't happened yet, Then the agent long-polls across reboots and network loss and the screen reflects "waiting for approval"; nothing can reach the device inbound before mesh admission, so polling is the only forward mechanism. 19. As an operator, I want approval to convert the code into strong device identity, so that the community holds every key and can revoke any device individually. - Given I approve, When the grant is issued, Then the code is spent forever, and the IdentityGrant carries the community-CA-signed NodeCert (binding device key, consented mode, and role-hint context), the community-signed SSH host cert, the ClanTrust material, and a single-use Netbird setup key. 20. As an operator, I want the dashboard to show a device as joined only when it truly is, so that the Fleet surface never lies. - Given approval, When the agent has joined the mesh, installed its certs, and brought the clan connection up, Then and only then the request reaches Enrolled and the device shows Connected (Approved → Enrolled split). 21. As an operator, I want decline to end the request cleanly (P2-S4 decline / P3-S4x), so that a device I turned away holds nothing of the community. - Given a Pending request, When I decline, Then the request is terminal, the code is consumed, and the agent is informed: a VM-mode join removes its local VM; a full-install join has no VM and the agent removes itself. - Given the declined device's owner (P3-S4x), When teardown completes, Then they land back at Welcome — or, with a fresh code from the operator, join again as a new request. 22. As a device owner whose join was declined mid-wait, I want the decline to reach me as an outcome, not an error, so that the screen tells me what happened and what was removed. - Given Declined, When the agent polls, Then it receives the closure (reason + self-removal directive) and the screen states the outcome plainly. ### Codes, errors, and resumability (both paths) 23. As a device owner, I want expired, revoked, consumed, and in-use codes each to say what they are, so that the fix is obvious. - Given an expired code, When redeemed, Then "was valid, past expiry — get a fresh code" (distinct from typo). - Given a consumed code, When redeemed, Then the already-spent outcome; Given a code bound to a different device, When redeemed by mine, Then the in-use outcome. 24. As a device owner whose machine crashed or rebooted mid-join, I want the join to resume, not duplicate, so that the operator never sees two pending cards for one machine. - Given the agent restarts with its persisted device key, When it re-redeems the same code, Then it rejoins its existing request ((code, KeyID) idempotency anchor); a re-pair returns the existing Pending; a lost approval is re-delivered verbatim. 25. As an operator, I want the pending list to be a live query over connection requests, so that pending devices appear and resolve without me refreshing. - Given pending requests exist, When I view Fleet, Then the list reflects the current request states; terminal requests leave the pending list. ### Landing (both paths) 26. As an operator, I want a newly enrolled device to land at Connected — not yet set up (P2-S5 / P3-S5), so that joining and setting up stay two decisions. - Given Enrolled, When I view the device, Then its state is Connected — not yet set up, no role or services are assigned, and the next action offered is provisioning's Assess (P4-S1). - Given Enrolled, When the device lands, Then it appears on the resting Fleet list (shell's surface) with its probed identity. 27. As an operator, I want heartbeats from the moment a device is enrolled, so that staleness is visible from day one. - Given Enrolled, When the agent runs, Then it reports on the fleet-reporting face (NodeCert mTLS over the mesh): agent version, uptime, clan-connection state, VM health in VM mode; a missed heartbeat is the staleness signal (monitoring's to surface). 28. As a device owner on the app path, I want the app to rest at Device home after joining (P3-S5 → shell), so that my machine's membership is visible where I'd look for it. - Given Joined, When I exit the join flow, Then I land on Device home showing this device's state; provisioning happens from the operator's side, not mine. ## Implementation Decisions - **One enrollment mechanism (ADR 0028), one state machine.** Both paths run the `enroll` seam's connection-request resource exactly as confirmed: Redeemed → Pending → Approved → Enrolled, with Declined/Expired terminal; monotonic states; non-consuming Redeem; codes spent only on terminal outcomes. The seam doc's state ↔ flow-node mapping is the design contract's spine. - **The agent owns the join on every path (ADRs 0053/0057).** The `join` orchestrator is a Go package in the agent, running as a persistent OS service. On P3 the app (via its bundled helper) first installs the agent, then renders the agent's states over its local Unix socket — the same carrier founding's relayed paths use. The helper holds no standing duty; the app can close without consequence. - **Install artifacts split by community-specificity (ADR 0054).** The gateway's control plane serves the install script and per-arch agent binaries at the fleet's pinned release (`/get`); the install command curls the community's own domain; the operator app ships and self-updates on Matou's release channel (ADR 0033). The enrollment code carries no URL. - **Intended-role hint (ADR 0055).** Minted with the code (default helper, operator-selectable), it drives exactly two device-end mechanics — spec-gate floor (ADR 0030's per-role, threads-not-cores arithmetic) and VM-mode guest sizing — and is never a role assignment (ADR 0015). **Amended by ADR 0064 (provisioning grill, 2026-07-23):** the hint's spec-gate floor is *pinned to the floor of the cheapest service that role can actually run*. Device-add's gate and provisioning's available-service list must not be able to disagree — otherwise a device owner can wipe a machine on a pass that the setup screen then refuses. The catalogue's per-service minima are the single source for those floors, never a second hand-maintained list. - **VM substrate (ADR 0056).** The agent bundles a pinned QEMU per platform (KVM/WHPX/HVF acceleration; qcow2 + virtio; per-arch NixOS guest artifact), behind a VM-manager interface; the agent registers guests for autostart and supervises them, which is what makes the heartbeat's VM-health field honest. Native hypervisor stacks are a later per-platform swap behind the same interface. - **Takeover-ready, not taken over (CONTEXT.md).** A full-install device at Connected still runs its stock OS with the agent as a service, sshd reachable over the mesh, ClanTrust + community SSH host cert installed, and the consented mode bound into the NodeCert. The wipe (kexec/disk-overwrite via the clan seam) is provisioning's first deploy. Full install is Linux-only; Macs have no full-install fallback. - **Takeover-ready includes the host's captured network + boot facts (spike #12 §6, 2026-07-24).** "Everything provisioning's first deploy needs" must include: the network facts captured at probe time (public IP/CIDR, gateway, DNS, public NIC MAC — baked by the clan seam into 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 (observed live). None of this reverses ADR 0024/0028 — it is the concrete shape of takeover-ready for a real host; see the clan seam's "Spike Q2.2 reconciliation" section. - **Operator-face contract (seam amendment, 2026-07-23).** MintCode (intended role + TTL, default 7 days) and RevokeCode join List/Approve/Decline on the `enroll` seam's Operator face — additive verbs over the code ledger the seam already hides. Shell's standing codes ledger later consumes the same verbs. - **Identity conversion as confirmed at the seam gate.** Approval issues the IdentityGrant — community-CA-signed NodeCert (90-day, auto-renew at ⅔ validity, 30-day renewal-only grace), community-signed SSH host cert, ClanTrust, single-use Netbird setup key — full community CA at v1. Nothing strong is issued before operator approval; trust-on-first-redeem is bounded by short TTL, single-use, revocation, and the pending-card human gate. - **Error taxonomy is the screen map.** Each typed enrollment error (unknown/expired/revoked/consumed/in-use/spec-gate/virt-unavailable) corresponds to a distinct device-end outcome; a decline is a successful poll with a Closure, never a transport error. ## Testing Decisions - **A good test drives external behaviour at the seam**: operator verbs and owner actions in, observable states and issued artifacts out — never the orchestrator's internals, never a faked `enroll` state machine. - **THE seam (ADR 0057, re-confirmed at spec time):** the agent's `join` orchestrator wired in-process against the **real** `enroll` control-plane service backed by its in-memory ledger + clock (a first-class build target per ADR 0043). Fakes below: VM manager (ADR 0056's interface), mesh admission, takeover-ready stager, artifact serving. Acceptance tests drive both ends — MintCode/Approve/Decline/RevokeCode and mode consent — and assert flow-node states, IdentityGrant contents, teardown residue, and idempotent resume. Every Given/When/Then above executes at this seam. - **Below the seam:** one thin local-socket round-trip test against the real agent binary (mirror of founding's stdio round-trip). **Above it:** nothing — dashboard and app Vue render states, they do not decide them. - **Prior art:** founding's seam-test harness (in-memory `enroll` ledger + clock, fake-driven orchestrator — ADR 0052) and the S13 prototype's clan fakes. - **Non-gating real-lab device-add smoke (spec-time addition, confirmed by Ben):** scheduled, clan-lab — stand up the lab control plane, mint a code, join one fresh stock-Ubuntu droplet via the real install command served from the lab gateway's `/get`, approve, assert Connected/takeover-ready with heartbeats flowing. Fake-drift insurance for the VM-manager and artifact-serving fakes; explicitly **not** an acceptance gate. The full-install takeover itself is spike #12's, not the smoke's. - **Spike #12 is a blocking edge, not a test — now satisfied:** #12 executed and closed 2026-07-24 (CONFIRMED-WITH-WORKAROUND), so the deploy-touching device-add slice's native `depends_on` #12 edge is already closed when `to-tickets` runs. ## Out of Scope - **Role and service assignment, and the first deploy** — provisioning's (P4-S1 Assess onward), including executing the full-install takeover and its failure screens (ADR 0024's "no old OS to roll back to" family). - **The standing enrollment-codes ledger UI and the resting Fleet list** — shell's surfaces; device-add only makes new devices appear there and shares the ledger verbs. - **Steady-state health, alerting, and staleness surfacing** — monitoring's, from Connected onward; device-add only starts the heartbeats. - **Member invites** — members admit people (IdP-only, never mesh peers); enrollment codes admit devices. Parallel artifacts, separate feature. - **Founding's first-node wrap** — the same mechanism against the app-hosted face is specced in founding (#11), not here. - **NodeCert renewal and beyond-grace re-enrolment mechanics** — decided at the seam gate; exercised by steady-state features, with re-enrol deliberately being this feature's existing flow. - **ISO/USB install media and a kept operator CLI** — do not exist (ADR 0028; install command is a doorway). - **Catalogue growth, product renaming** — map-level out of scope. ## Further Notes - **`needs_human_decision` (carried, not re-derived):** multi-arch fleet support — Apple Silicon VM-mode helpers make the fleet mixed x86_64 + aarch64, which every service build and the binary cache must then serve (flagged in ADRs 0030/0056; a migration-spec §12 leftover). Decide before (or at) the slice-map if aarch64 devices are admitted at v1 or steered away at the spec gate. - **Known strain accepted from the seam:** spec-gate rejections are typed errors, not states — there is no queryable history of "device X was rejected for RAM". If operators want that history it becomes an audit-log entry later, not a state machine change. - **Sequencing:** this spec waits on the Phase-2 slice-map (needs all eight feature specs); spike #12 can run any time and should run early.
Author
Owner

Note from the Sandcastle swarm (leaving open, not relabeling/closing — that is a human triage call):

This issue is the Phase-1 device-add spec deliverable, not an implementable vertical slice, so the swarm has nothing to build against yet:

  • no ticket-level task manifest (interface/seam/acceptance/depends_on);
  • the seam it would test at — the agents joinorchestrator wired to the realenroll` service — does not exist; the ADR 0040 repo skeleton is still unbuilt (STATUS "Now" checklist);
  • it carries an open needs_human_decision (multi-arch fleet / aarch64 admission at v1), to be resolved at or before the slice-map.

Implementable slices for this feature come from Phase 2 (/slice-map) → /to-tickets, which emit tickets with manifests and depends_on edges (the deploy-touching slice will take depends_on #12). Because it is labeled ready-for-agent, the swarm re-selects it every iteration with no actionable work — suggest retriaging the label until its tickets exist.

Note from the Sandcastle swarm (leaving open, not relabeling/closing — that is a human triage call): This issue is the **Phase-1 device-add spec deliverable**, not an implementable vertical slice, so the swarm has nothing to build against yet: - no ticket-level task manifest (`interface`/`seam`/`acceptance`/`depends_on`); - the seam it would test at — the agent`s `join` orchestrator wired to the real `enroll` service — does not exist; the **ADR 0040 repo skeleton is still unbuilt** (STATUS "Now" checklist); - it carries an open `needs_human_decision` (multi-arch fleet / aarch64 admission at v1), to be resolved at or before the slice-map. Implementable slices for this feature come from **Phase 2 (`/slice-map`) → `/to-tickets`**, which emit tickets with manifests and `depends_on` edges (the deploy-touching slice will take `depends_on #12`). Because it is labeled `ready-for-agent`, the swarm re-selects it every iteration with no actionable work — suggest retriaging the label until its tickets exist.
Author
Owner

Sandcastle note (not implementable yet — leaving open): this is a to-spec output (a feature spec), not a vertical slice. It carries user stories/acceptance but no implementation task manifest (interface/seam/depends_on), and the spec itself states it "waits on the Phase-2 slice-map (needs all eight feature specs)". Phase 2 is not started (docs/slices/ holds only the README; 2 of 8 features specced) and the slice-map + to-tickets steps — which are what emit the implementable, DAG-ordered tickets — are human-gated (Ben confirms the graph). Until those run there is no seam for the swarm to build/test against, so I'm not implementing this here. Also note the carried residual: the deploy-touching device-add slice takes a depends_on on spike #12, which is currently blocked on missing DigitalOcean credentials (see #12).

**Sandcastle note (not implementable yet — leaving open):** this is a `to-spec` output (a feature spec), not a vertical slice. It carries user stories/acceptance but **no implementation task manifest** (`interface`/`seam`/`depends_on`), and the spec itself states it "waits on the Phase-2 slice-map (needs all eight feature specs)". Phase 2 is not started (`docs/slices/` holds only the README; 2 of 8 features specced) and the slice-map + `to-tickets` steps — which are what emit the implementable, DAG-ordered tickets — are human-gated (Ben confirms the graph). Until those run there is no seam for the swarm to build/test against, so I'm not implementing this here. Also note the carried residual: the deploy-touching device-add slice takes a `depends_on` on spike #12, which is currently blocked on missing DigitalOcean credentials (see #12).
Author
Owner

Sandcastle: not yet implementable as a code slice — leaving open.

This is a published spec artifact, not a to-tickets task manifest. There is no code target to build against yet: no repo skeleton (ADR 0040 / Phase 2½ not built — the repo holds no Go module), and no slice-map (docs/slices/ holds only its README; Phase 2 has not started, and the slice-map needs all eight feature specs — only 2 of 8 exist). The spec itself states it waits on the Phase-2 slice-map. Implementing device-add code now would violate the dependency and scope rules.

This will become swarm-ready after: 6 remaining grills+specs → slice-map (Phase 2) → to-tickets emits code tickets with interface/seam/acceptance manifests. (Founding spec #11 is in the identical state.) Consider dropping ready-for-agent from the spec issues until their code tickets exist, so the swarm stops surfacing them as ready.

**Sandcastle: not yet implementable as a code slice — leaving open.** This is a published *spec* artifact, not a `to-tickets` task manifest. There is no code target to build against yet: no repo skeleton (ADR 0040 / Phase 2½ not built — the repo holds no Go module), and no slice-map (`docs/slices/` holds only its README; Phase 2 has not started, and the slice-map needs all eight feature specs — only 2 of 8 exist). The spec itself states it *waits on the Phase-2 slice-map*. Implementing device-add code now would violate the dependency and scope rules. This will become swarm-ready after: 6 remaining grills+specs → slice-map (Phase 2) → `to-tickets` emits code tickets with `interface`/`seam`/`acceptance` manifests. (Founding spec #11 is in the identical state.) Consider dropping `ready-for-agent` from the spec issues until their code tickets exist, so the swarm stops surfacing them as ready.
Author
Owner

Not an executable slice for the swarm yet — this is the published feature spec, not an implementation ticket.

The swarm implements the per-slice tickets that to-tickets emits after the Phase-2 slice-map, not the feature specs directly. As of this iteration that pipeline stage has not run: no docs/slices/*.yaml exists (this spec's own Sequencing note: it 'waits on the Phase-2 slice-map'), there is no repo skeleton / enroll·clan seam packages to build the join orchestrator against (Phase 2.5 incomplete, ADR 0040), and this feature's deploy-touching slice natively depends_on spike #12 (still open/blocked — see #12).

Building the whole feature now would violate one-vertical-slice-per-iteration, stay-in-scope, and honour-dependencies. Consider dropping ready-for-agent from the spec issues so the ready-list surfaces implementation tickets rather than design artifacts. Leaving open; no code changed.

**Not an executable slice for the swarm yet — this is the published feature spec, not an implementation ticket.** The swarm implements the per-slice tickets that `to-tickets` emits *after* the Phase-2 slice-map, not the feature specs directly. As of this iteration that pipeline stage has not run: no `docs/slices/*.yaml` exists (this spec's own Sequencing note: it 'waits on the Phase-2 slice-map'), there is no repo skeleton / `enroll`·`clan` seam packages to build the `join` orchestrator against (Phase 2.5 incomplete, ADR 0040), and this feature's deploy-touching slice natively `depends_on` spike #12 (still open/blocked — see #12). Building the whole feature now would violate one-vertical-slice-per-iteration, stay-in-scope, and honour-dependencies. Consider dropping `ready-for-agent` from the spec issues so the ready-list surfaces implementation tickets rather than design artifacts. Leaving open; no code changed.
Author
Owner

Amended by the provisioning grill (2026-07-23) — ADR 0064.

Provisioning's grill surfaced a gap between this spec's spec gate and provisioning's available-service list: the gate checks a device against the hint's declared minimum, while P4-S1 assesses it against every service in the catalogue. A device could therefore pass the gate — and, on the full-install path, be wiped on the strength of that pass — and then land on a setup screen that says there is nothing it can do.

ADR 0064 pins the gate's floor for a role to the floor of the cheapest service that role can actually run, with the catalogue's per-service minima as the single source. Two edits applied to the spec body above:

  • the Intended-role hint (ADR 0055) decision bullet now carries the constraint;
  • story 16 gains an acceptance criterion asserting the floor equals the cheapest real service's floor.

The residual case — fleet state moving between pairing and setup — is handled on provisioning's side by the new P4-S1x empty state, which names why each service is out of reach and always offers a next step (lowest-floor job, or removal). No user story here is invalidated; the enroll seam is unchanged.

**Amended by the provisioning grill (2026-07-23) — ADR 0064.** Provisioning's grill surfaced a gap between this spec's spec gate and provisioning's available-service list: the gate checks a device against *the hint's declared minimum*, while P4-S1 assesses it against *every service in the catalogue*. A device could therefore pass the gate — and, on the full-install path, be **wiped** on the strength of that pass — and then land on a setup screen that says there is nothing it can do. [ADR 0064](https://git.matou.nz/Matou/ourcloud/src/branch/main/docs/adr/0064-spec-gate-floor-pinned-to-cheapest-real-service.md) pins the gate's floor for a role to the floor of the cheapest service that role can actually run, with the catalogue's per-service minima as the single source. Two edits applied to the spec body above: - the **Intended-role hint (ADR 0055)** decision bullet now carries the constraint; - **story 16** gains an acceptance criterion asserting the floor equals the cheapest real service's floor. The residual case — fleet state moving between pairing and setup — is handled on provisioning's side by the new `P4-S1x` empty state, which names why each service is out of reach and always offers a next step (lowest-floor job, or removal). No user story here is invalidated; the `enroll` seam is unchanged.
Author
Owner

Spec amended for spike #12 findings (Q2.2, docs/spike-findings/q22-fresh-host-takeover.md, 2026-07-24). Four changes: (1) the header's carried residual is marked resolved — #12 executed, CONFIRMED-WITH-WORKAROUND; (2) story 14 gained an acceptance criterion: the spec-gate/facter probe also captures the host's network facts (public IP/CIDR, gateway, DNS, public NIC MAC) and they ride the takeover-ready contract; (3) the constraints gained a §6 block: takeover-ready includes the captured network facts (→ MAC-matched systemd-networkd node config) and a hybrid BIOS+UEFI disko layout, with the community-signed host cert carrying trust across the re-image; (4) the #12 blocking-edge note now records the edge as satisfied. Mirrored in the clan seam: docs/seams/clan.md § Spike Q2.2 reconciliation (additive; nothing confirmed retracted).

**Spec amended for spike #12 findings (Q2.2, `docs/spike-findings/q22-fresh-host-takeover.md`, 2026-07-24).** Four changes: (1) the header's carried residual is marked resolved — #12 executed, CONFIRMED-WITH-WORKAROUND; (2) story 14 gained an acceptance criterion: the spec-gate/facter probe also captures the host's network facts (public IP/CIDR, gateway, DNS, public NIC MAC) and they ride the takeover-ready contract; (3) the constraints gained a §6 block: takeover-ready includes the captured network facts (→ MAC-matched systemd-networkd node config) and a hybrid BIOS+UEFI disko layout, with the community-signed host cert carrying trust across the re-image; (4) the #12 blocking-edge note now records the edge as satisfied. Mirrored in the clan seam: `docs/seams/clan.md` § Spike Q2.2 reconciliation (additive; nothing confirmed retracted).
Author
Owner

Closed in the 2026-08-27 other-state sweep (Ben's ruling) — child spec complete: all derived tickets closed; the remaining device-add work was re-specced as rehearsal phase 5 (spec 129efa32, #842–#854).

Closed in the 2026-08-27 `other`-state sweep (Ben's ruling) — child spec complete: all derived tickets closed; the remaining device-add work was re-specced as rehearsal phase 5 (spec 129efa32, #842–#854).
ben closed this issue 2026-08-27 04:43:48 +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#13
No description provided.