Spike S13: headless clan driving — gates every clan-shaped slice (ADR 0002 / DDR 0010) #4

Closed
opened 2026-07-09 02:25:36 +00:00 by ben · 3 comments
Owner

Spike S13 — headless clan driving

Gating spike (PROCESS.md Phase 2½): validates ADR feasibility, references no
seam contract, depends on nothing — a root by construction. Its findings feed
the seam gate: the review of docs/seams/clan.md (status: proposed)
happens with this spike's evidence in hand, not on paper.

Task manifest

task: spike-s13-headless-clan-driving
type: spike
validates:
  - docs/adr/0002-adopt-clan-lol.md        # adoption decision this spike gates
  - docs/adr/0010-clan-behind-internal-interface.md
  - docs/adr/0037-go-for-machine-surfaces.md
informs:
  - docs/seams/clan.md                     # seam gate reviews with this evidence
interface: n/a — spike; produces findings + prototype, not product code
seam: docs/spike-findings/S13-clan-orchestration.md   # the deliverable reviewed
acceptance:
  - given: questions Q1–Q10 below
    when: the two-week timebox ends
    then: each question has an explicit verdict — confirmed /
          confirmed-with-workaround (described) / broken (described) — with
          evidence (commands, output, timings)
  - given: verdicts on Q1–Q5
    when: Q1, Q2.1, or Q4 is broken (not merely awkward)
    then: the spike stops early and writes up — ADR 0002 is reversed cheaply
  - given: the findings doc
    when: the spike closes
    then: it ends with a recommendation (adopt / adopt-with-wrapper /
          do-not-adopt + alternative) and the integration interfaces the build
          should code against, checked against docs/seams/clan.md
depends_on: []
out_of_scope:
  - per-OS VM management UX on Windows/Mac (separate spike)
  - the operator app and web dashboard themselves (shell scripts stand in)
  - identity/OIDC, branding, DNS/ACME (the kanidm/Netbird spike covers identity)
  - performance tuning or hardening beyond clan/sops defaults
  - porting any catalogue service beyond Garage
needs_human_decision: []   # resolved 2026-07-09: run on clan-lab (see agent brief)

Why this spike exists

ADR 0002 adopts clan.lol as the fleet layer: OurCloud generates clan
configuration and drives the clan CLI programmatically, so operators never see
Nix. Founding creates a community's first node; devices join via an enrollment
code and the install command; the control plane (config repo, deploy runner,
IdP, dashboard) lives on the cluster and is self-managing. None of this has
been exercised headlessly by us — clan is pre-1.0, mid-migration
(clanModules → clanServices), and its docs assume an interactive human at a
terminal. This spike determines whether ADR 0002 survives contact with
reality
, and produces the integration notes the build codes against. Every
clan-shaped slice in the slice-map is gated on it. If it fails, the fallback (a
bespoke thin layer over plain NixOS + deploy-rs/colmena-class tools) needs the
same questions answered — nothing is wasted either way.

The earlier clan-mauke spike (git.matou.nz/waipuna/clan-mauke-spike, DEVLOG)
proved clan runs a real HA stack hand-driven; its 22 gotchas are already
absorbed as requirements in docs/seams/clan.md. What it did not prove is
the load-bearing question here: driving clan from a program.

Environment

  • Resolved 2026-07-09 (triage): the clan-lab skill environment. One
    disposable DigitalOcean droplet from the clan-lab-golden-* snapshot boots a
    3-machine clan.lol cluster (node1–node3 as libvirt VMs; node1 is
    gateway-shaped — the droplet's public 80/443 forward to it) in ~2–3 min. See
    the skill's SKILL.md for the CLI, guardrails, and honesty limits (functional
    findings only — no perf/resource-floor numbers from nested VMs). Q2.3's
    "VPS from a stock cloud image" runs as a stock-cloud-image VM inside the lab,
    a functional stand-in; note it as such in the findings.
  • Pin ONE clan release/commit at the start; record it in the findings. Do not
    chase upstream during the spike. (The golden image pins clan-core
    db4db726, recorded in /root/lab/GOLDEN-INFO on the lab host and in
    docs/spike-findings/clan-lab-golden.md — reuse that pin unless there is a
    written reason not to.)
  • Prototype code in spikes/S13-clan-orchestration/ — bash/Python glue +
    generated Nix is fine; quality bar is "reproducible by the next person".

The questions

Each gets an explicit verdict in the findings doc with evidence.

Q1. Headless, programmatic driving (load-bearing)

Can a program — not a human editing Nix — own the full clan lifecycle?
Generate clan configuration from structured data (JSON → rendered Nix or
clan's own APIs): is there a stable data interface, or are we templating Nix
text? Run every operation non-interactively (no TTY prompts, no editor
spawns): create machine, deploy machine, update fleet, remove machine. Capture
exit codes and machine-parseable output — can failures be detected and
explained programmatically? (Product context: errors must translate to plain
language for a non-technical operator; log-spelunking is banned. Assess
honestly what is catchable at generation time vs exploding at deploy time.
docs/seams/clan.md assumes PTY driving with outcomes read from the log,
never $? — validate or refute that assumption.)

Q2. Bootstrap paths (no ISO/USB anywhere)

  1. Founding VM (the seed): build a NixOS VM image carrying a community's
    founding payload — initial clan config, founding secrets, mesh enrollment —
    such that first boot brings up the mesh + control plane unattended. How is
    it parameterized per-community, how big, how long from create to
    dashboard-up?
  2. Existing Linux device via install command + enrollment code: the
    one-shot install command takes the code, the device calls in over the mesh;
    after approval, NixOS takeover over that established connection
    (nixos-anywhere/kexec-class). This is THE path for real Linux hardware —
    measure reliability and failure legibility hardest.
  3. VPS as gateway host: same mechanism as (2) against a stock cloud image —
    confirm nothing assumes physical hardware.
  4. Joiner VM: an app-created VM joining an existing community via code
    (same enrollment, no takeover — already NixOS).

Confirm (a) paths 2–4 share one enrollment mechanism with takeover as the only
Linux-host extra; (b) founding VM and joiner VM are the same image
parameterized differently. The design assumes both.

Q3. Secrets — clan vars / sops-nix

Programmatic generation and management (no interactive prompts). Where do
secrets live at rest, who decrypts what, and can the tiered model be
implemented: deploy runner holds day-to-day secrets; per-operator keys
revocable individually without re-keying the world; crown jewels kept OUT of
the runner's reach (escrowed offline)? Rotate one secret, redeploy, confirm no
other secrets churned.

Q4. Self-management — the runner lives on the cluster

Stand up the control plane ON a fleet node: bare git repo + deploy runner
(systemd timer or webhook) applying clan config to all nodes including
itself
. Does clan tolerate self-deploy? Footguns (restarting the runner
mid-deploy; SSH-to-self)? Demonstrate the full loop: dashboard-shaped mutation
→ commit → runner applies → fleet converges. Break-glass rescue: with the
runner node DOWN, drive the fleet from an external machine using only a clone
of the repo + operator key.

Q5. Mutation lifecycle & timings

Headlessly, timing each: add a machine; add a service instance across two
machines; move a service between machines; remove a machine cleanly (secrets
revoked?); roll back the last change (git revert → converge). Report
wall-clock times and idempotence (second run is a no-op).

Q6. Service module fit — port Garage as the template

Port ONE real catalogue service: Garage (behavioural reference:
matou-distributed-servers/roles/garage/ — config template, RF=3, zones,
per-app keys, bucket provisioning). Write it clanServices-style with roles
across 3 nodes. Is clanServices usable today or still moving? How much of
the imperative post-daemon provisioning fits clan's declarative model vs needs
an out-of-band reconciler — this shapes all future catalogue ports.

Q7. Updates, rollback, channel mechanics

Bump a pinned input, deploy staged (one node, health-check, then rest) — does
clan give us staged rollout or do we script it? Break a node deliberately;
confirm NixOS generation rollback restores it and what the runner sees.
Channel model: can a community's flake pin OUR channel such that "pin/fork the
channel" (sovereignty exit) is real? Demonstrate a community repo consuming a
shared upstream + local overrides.

Q8. Mesh coupling

We are committed to Netbird (ADR 0039), not clan's default ZeroTier. Confirm
clan works with its VPN modules unused: deploys over SSH across our own mesh
IPs, no hidden ZeroTier assumptions. Note anything that gets harder without
their mesh module.

Q9. Resource floor & build placement

Deploy to a 4 GB RAM node (the declared gateway minimum): does on-device
evaluation/build fit, or does the model require builds elsewhere + a binary
cache? If a cache is required, sketch what OurCloud-as-supply-chain must run.
Rough numbers: eval time, closure download size, disk footprint.

Q10. Stability & maintenance judgment (qualitative)

After two weeks: doc accuracy, error quality, upgrade churn risk, community
responsiveness. Finish with the recommendation and the 5–10 integration
interfaces the build should code against — reconciled against
docs/seams/clan.md.

Deliverables & exit criteria

  1. Findings doc docs/spike-findings/S13-clan-orchestration.md: verdict
    per Q1–Q10 with evidence, timings table (Q5), recommendation +
    integration-interface list (Q10).
  2. Prototype spikes/S13-clan-orchestration/: config generator, runner
    script, Garage module port, README reproducing the whole loop from scratch.
  3. Demo script: one command (or short README sequence) showing the golden
    path — generate → found first node → self-managing cluster → add node → add
    Garage → staged update → rollback.

Success = Q1–Q5 confirmed (workarounds acceptable if specified), Q6
answered decisively either way, confident Q10 recommendation.
Failure is a valid result = if Q1, Q2.1, or Q4 is broken, stop early and
write up; ADR 0002 gets reversed cheaply — that is the spike doing its job.

Timebox

Two weeks. If week 1 ends without Q1 + Q2.2 working, that is itself a major
finding — raise it then rather than grinding. Ugly-but-honest workarounds with
notes beat polished partial coverage.


Provenance: adapted for OurCloud from
idss:docs/plans/2026-07-02-s13-clan-orchestration-spike.md (2026-07-02),
which DDR 0010 names as the gating validation for clan-shaped work.

# Spike S13 — headless clan driving **Gating spike** (PROCESS.md Phase 2½): validates ADR feasibility, references no seam contract, depends on nothing — a root by construction. Its findings feed the **seam gate**: the review of `docs/seams/clan.md` (`status: proposed`) happens with this spike's evidence in hand, not on paper. ## Task manifest ```yaml task: spike-s13-headless-clan-driving type: spike validates: - docs/adr/0002-adopt-clan-lol.md # adoption decision this spike gates - docs/adr/0010-clan-behind-internal-interface.md - docs/adr/0037-go-for-machine-surfaces.md informs: - docs/seams/clan.md # seam gate reviews with this evidence interface: n/a — spike; produces findings + prototype, not product code seam: docs/spike-findings/S13-clan-orchestration.md # the deliverable reviewed acceptance: - given: questions Q1–Q10 below when: the two-week timebox ends then: each question has an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — with evidence (commands, output, timings) - given: verdicts on Q1–Q5 when: Q1, Q2.1, or Q4 is broken (not merely awkward) then: the spike stops early and writes up — ADR 0002 is reversed cheaply - given: the findings doc when: the spike closes then: it ends with a recommendation (adopt / adopt-with-wrapper / do-not-adopt + alternative) and the integration interfaces the build should code against, checked against docs/seams/clan.md depends_on: [] out_of_scope: - per-OS VM management UX on Windows/Mac (separate spike) - the operator app and web dashboard themselves (shell scripts stand in) - identity/OIDC, branding, DNS/ACME (the kanidm/Netbird spike covers identity) - performance tuning or hardening beyond clan/sops defaults - porting any catalogue service beyond Garage needs_human_decision: [] # resolved 2026-07-09: run on clan-lab (see agent brief) ``` ## Why this spike exists ADR 0002 adopts clan.lol as the fleet layer: OurCloud generates clan configuration and drives the clan CLI programmatically, so operators never see Nix. Founding creates a community's first node; devices join via an enrollment code and the install command; the control plane (config repo, deploy runner, IdP, dashboard) lives on the cluster and is self-managing. None of this has been exercised headlessly by us — clan is pre-1.0, mid-migration (`clanModules` → `clanServices`), and its docs assume an interactive human at a terminal. **This spike determines whether ADR 0002 survives contact with reality**, and produces the integration notes the build codes against. Every clan-shaped slice in the slice-map is gated on it. If it fails, the fallback (a bespoke thin layer over plain NixOS + deploy-rs/colmena-class tools) needs the same questions answered — nothing is wasted either way. The earlier clan-mauke spike (`git.matou.nz/waipuna/clan-mauke-spike`, DEVLOG) proved clan runs a real HA stack *hand-driven*; its 22 gotchas are already absorbed as requirements in `docs/seams/clan.md`. What it did **not** prove is the load-bearing question here: driving clan from a program. ## Environment - **Resolved 2026-07-09 (triage): the `clan-lab` skill environment.** One disposable DigitalOcean droplet from the `clan-lab-golden-*` snapshot boots a 3-machine clan.lol cluster (node1–node3 as libvirt VMs; node1 is gateway-shaped — the droplet's public 80/443 forward to it) in ~2–3 min. See the skill's SKILL.md for the CLI, guardrails, and honesty limits (functional findings only — no perf/resource-floor numbers from nested VMs). Q2.3's "VPS from a stock cloud image" runs as a stock-cloud-image VM inside the lab, a functional stand-in; note it as such in the findings. - Pin ONE clan release/commit at the start; record it in the findings. Do not chase upstream during the spike. (The golden image pins clan-core `db4db726`, recorded in `/root/lab/GOLDEN-INFO` on the lab host and in `docs/spike-findings/clan-lab-golden.md` — reuse that pin unless there is a written reason not to.) - Prototype code in `spikes/S13-clan-orchestration/` — bash/Python glue + generated Nix is fine; quality bar is "reproducible by the next person". ## The questions Each gets an explicit verdict in the findings doc with evidence. ### Q1. Headless, programmatic driving (load-bearing) Can a program — not a human editing Nix — own the full clan lifecycle? Generate clan configuration from structured data (JSON → rendered Nix or clan's own APIs): is there a stable data interface, or are we templating Nix text? Run every operation non-interactively (no TTY prompts, no editor spawns): create machine, deploy machine, update fleet, remove machine. Capture exit codes and machine-parseable output — can failures be detected and *explained* programmatically? (Product context: errors must translate to plain language for a non-technical operator; log-spelunking is banned. Assess honestly what is catchable at generation time vs exploding at deploy time. `docs/seams/clan.md` assumes PTY driving with outcomes read from the log, never `$?` — validate or refute that assumption.) ### Q2. Bootstrap paths (no ISO/USB anywhere) 1. **Founding VM (the seed):** build a NixOS VM image carrying a community's founding payload — initial clan config, founding secrets, mesh enrollment — such that first boot brings up the mesh + control plane unattended. How is it parameterized per-community, how big, how long from create to dashboard-up? 2. **Existing Linux device via install command + enrollment code:** the one-shot install command takes the code, the device calls in over the mesh; after approval, NixOS takeover over that established connection (nixos-anywhere/kexec-class). This is THE path for real Linux hardware — measure reliability and failure legibility hardest. 3. **VPS as gateway host:** same mechanism as (2) against a stock cloud image — confirm nothing assumes physical hardware. 4. **Joiner VM:** an app-created VM joining an existing community via code (same enrollment, no takeover — already NixOS). Confirm (a) paths 2–4 share one enrollment mechanism with takeover as the only Linux-host extra; (b) founding VM and joiner VM are the same image parameterized differently. The design assumes both. ### Q3. Secrets — clan vars / sops-nix Programmatic generation and management (no interactive prompts). Where do secrets live at rest, who decrypts what, and can the tiered model be implemented: deploy runner holds day-to-day secrets; per-operator keys revocable individually without re-keying the world; crown jewels kept OUT of the runner's reach (escrowed offline)? Rotate one secret, redeploy, confirm no other secrets churned. ### Q4. Self-management — the runner lives on the cluster Stand up the control plane ON a fleet node: bare git repo + deploy runner (systemd timer or webhook) applying clan config to all nodes **including itself**. Does clan tolerate self-deploy? Footguns (restarting the runner mid-deploy; SSH-to-self)? Demonstrate the full loop: dashboard-shaped mutation → commit → runner applies → fleet converges. Break-glass rescue: with the runner node DOWN, drive the fleet from an external machine using only a clone of the repo + operator key. ### Q5. Mutation lifecycle & timings Headlessly, timing each: add a machine; add a service instance across two machines; move a service between machines; remove a machine cleanly (secrets revoked?); roll back the last change (git revert → converge). Report wall-clock times and idempotence (second run is a no-op). ### Q6. Service module fit — port Garage as the template Port ONE real catalogue service: **Garage** (behavioural reference: `matou-distributed-servers/roles/garage/` — config template, RF=3, zones, per-app keys, bucket provisioning). Write it `clanServices`-style with roles across 3 nodes. Is `clanServices` usable today or still moving? How much of the imperative post-daemon provisioning fits clan's declarative model vs needs an out-of-band reconciler — this shapes all future catalogue ports. ### Q7. Updates, rollback, channel mechanics Bump a pinned input, deploy staged (one node, health-check, then rest) — does clan give us staged rollout or do we script it? Break a node deliberately; confirm NixOS generation rollback restores it and what the runner sees. Channel model: can a community's flake pin OUR channel such that "pin/fork the channel" (sovereignty exit) is real? Demonstrate a community repo consuming a shared upstream + local overrides. ### Q8. Mesh coupling We are committed to Netbird (ADR 0039), not clan's default ZeroTier. Confirm clan works with its VPN modules unused: deploys over SSH across our own mesh IPs, no hidden ZeroTier assumptions. Note anything that gets harder without their mesh module. ### Q9. Resource floor & build placement Deploy to a 4 GB RAM node (the declared gateway minimum): does on-device evaluation/build fit, or does the model require builds elsewhere + a binary cache? If a cache is required, sketch what OurCloud-as-supply-chain must run. Rough numbers: eval time, closure download size, disk footprint. ### Q10. Stability & maintenance judgment (qualitative) After two weeks: doc accuracy, error quality, upgrade churn risk, community responsiveness. Finish with the recommendation and the 5–10 integration interfaces the build should code against — reconciled against `docs/seams/clan.md`. ## Deliverables & exit criteria 1. **Findings doc** `docs/spike-findings/S13-clan-orchestration.md`: verdict per Q1–Q10 with evidence, timings table (Q5), recommendation + integration-interface list (Q10). 2. **Prototype** `spikes/S13-clan-orchestration/`: config generator, runner script, Garage module port, README reproducing the whole loop from scratch. 3. **Demo script**: one command (or short README sequence) showing the golden path — generate → found first node → self-managing cluster → add node → add Garage → staged update → rollback. **Success** = Q1–Q5 confirmed (workarounds acceptable if specified), Q6 answered decisively either way, confident Q10 recommendation. **Failure is a valid result** = if Q1, Q2.1, or Q4 is broken, stop early and write up; ADR 0002 gets reversed cheaply — that is the spike doing its job. ## Timebox Two weeks. If week 1 ends without Q1 + Q2.2 working, that is itself a major finding — raise it then rather than grinding. Ugly-but-honest workarounds with notes beat polished partial coverage. --- **Provenance:** adapted for OurCloud from `idss:docs/plans/2026-07-02-s13-clan-orchestration-spike.md` (2026-07-02), which DDR 0010 names as the gating validation for clan-shaped work.
Author
Owner

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Run spike S13 (headless clan driving) on the clan-lab environment and deliver a verdict per question, closing with an adopt / adopt-with-wrapper / do-not-adopt recommendation.

Current behavior:
ADR 0002 adopts clan.lol, but nothing has exercised driving the clan CLI from a program. The docs/seams/clan.md contract (status: proposed) rests on untested assumptions — notably that clan must be PTY-driven with outcomes read from logs, never $?. Spike step-zero (the clan-lab golden image build, findings in docs/spike-findings/clan-lab-golden.md) already made first contact: clan's own prompts are isatty-guarded, but service-level prompt = true vars still demand interactive answers, and upstream CLI shapes drift fast. Those observations are leads, not verdicts.

Desired behavior:
Every question Q1–Q10 in the issue body has an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — with evidence (commands, output, timings), written to the findings doc named in the task manifest. The doc ends with a recommendation and the integration interfaces the build should code against, checked against docs/seams/clan.md. If Q1, Q2.1, or Q4 is broken (not merely awkward), stop early and write up — reversing ADR 0002 cheaply is a success outcome, not a failure.

Environment (the resolved human decision):
Use the clan-lab skill — read its SKILL.md before any infrastructure action; provision only through the clan-lab CLI, never raw doctl. clan-lab create boots the 3-node lab from the golden snapshot in ~2–3 min. Reuse the golden image's clan-core pin (db4db726) unless a written reason says otherwise. Honesty limits apply: functional findings only — no performance or resource-floor numbers from nested VMs; the 80/443 port-forward simulates public reachability functionally. Q2.3 ("VPS from a stock cloud image") runs as a stock-cloud-image VM inside the lab and must be flagged as a functional stand-in in the findings.

Key interfaces:

  • The findings doc and prototype directory named in the issue's task manifest (seam: and Environment sections) — the prototype's quality bar is "reproducible by the next person".
  • docs/seams/clan.md — each of its stated assumptions the spike touches gets validated or refuted by name.
  • The clan-lab CLI's lifecycle (create / ssh / extend / snapshot / destroy / status) — the lab is disposable; clan-lab status must be empty when the spike ends.

Acceptance criteria:

  • Each of Q1–Q10 has a verdict with evidence in the findings doc
  • Early-stop rule honored: Q1/Q2.1/Q4 broken → stop and write up
  • Findings end with a recommendation + integration interfaces, checked against docs/seams/clan.md
  • Prototype code committed under the manifest's spike directory, reproducible
  • Clan-core pin recorded in the findings
  • clan-lab status empty at the end (no droplets left running)
  • STATUS.md updated in the same commit as the findings (repo convention)

Out of scope (from the manifest):

  • Per-OS VM management UX on Windows/Mac; the operator app / web dashboard (shell scripts stand in)
  • Identity/OIDC, branding, DNS/ACME (issue #5 covers identity)
  • Performance tuning or hardening beyond clan/sops defaults; porting any catalogue service beyond Garage
  • Deciding the seam gate — this spike produces evidence; the human reviews docs/seams/clan.md with it
> *This was generated by AI during triage.* ## Agent Brief **Category:** enhancement **Summary:** Run spike S13 (headless clan driving) on the clan-lab environment and deliver a verdict per question, closing with an adopt / adopt-with-wrapper / do-not-adopt recommendation. **Current behavior:** ADR 0002 adopts clan.lol, but nothing has exercised driving the clan CLI from a program. The `docs/seams/clan.md` contract (status: proposed) rests on untested assumptions — notably that clan must be PTY-driven with outcomes read from logs, never `$?`. Spike step-zero (the clan-lab golden image build, findings in `docs/spike-findings/clan-lab-golden.md`) already made first contact: clan's own prompts are isatty-guarded, but service-level `prompt = true` vars still demand interactive answers, and upstream CLI shapes drift fast. Those observations are leads, not verdicts. **Desired behavior:** Every question Q1–Q10 in the issue body has an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — with evidence (commands, output, timings), written to the findings doc named in the task manifest. The doc ends with a recommendation and the integration interfaces the build should code against, checked against `docs/seams/clan.md`. If Q1, Q2.1, or Q4 is broken (not merely awkward), stop early and write up — reversing ADR 0002 cheaply is a success outcome, not a failure. **Environment (the resolved human decision):** Use the `clan-lab` skill — read its SKILL.md before any infrastructure action; provision only through the `clan-lab` CLI, never raw `doctl`. `clan-lab create` boots the 3-node lab from the golden snapshot in ~2–3 min. Reuse the golden image's clan-core pin (`db4db726`) unless a written reason says otherwise. Honesty limits apply: functional findings only — no performance or resource-floor numbers from nested VMs; the 80/443 port-forward simulates public reachability functionally. Q2.3 ("VPS from a stock cloud image") runs as a stock-cloud-image VM inside the lab and must be flagged as a functional stand-in in the findings. **Key interfaces:** - The findings doc and prototype directory named in the issue's task manifest (`seam:` and Environment sections) — the prototype's quality bar is "reproducible by the next person". - `docs/seams/clan.md` — each of its stated assumptions the spike touches gets validated or refuted by name. - The clan-lab CLI's lifecycle (create / ssh / extend / snapshot / destroy / status) — the lab is disposable; `clan-lab status` must be empty when the spike ends. **Acceptance criteria:** - [ ] Each of Q1–Q10 has a verdict with evidence in the findings doc - [ ] Early-stop rule honored: Q1/Q2.1/Q4 broken → stop and write up - [ ] Findings end with a recommendation + integration interfaces, checked against `docs/seams/clan.md` - [ ] Prototype code committed under the manifest's spike directory, reproducible - [ ] Clan-core pin recorded in the findings - [ ] `clan-lab status` empty at the end (no droplets left running) - [ ] STATUS.md updated in the same commit as the findings (repo convention) **Out of scope (from the manifest):** - Per-OS VM management UX on Windows/Mac; the operator app / web dashboard (shell scripts stand in) - Identity/OIDC, branding, DNS/ACME (issue #5 covers identity) - Performance tuning or hardening beyond clan/sops defaults; porting any catalogue service beyond Garage - Deciding the seam gate — this spike produces evidence; the human reviews `docs/seams/clan.md` with it
Author
Owner

Seam-gate update (2026-07-09): docs/seams/clan.md open decisions are now DECIDED (recorded in the doc): (1) during founding the operator app embeds the clan seam as a bundled Go helper (stdio JSON) — steady-state stays on the control plane; the package must build both ways. (2) Enrollment progress is checklist-only at stage/phase granularity — do not build percent-style progress. Q10's reconciliation against docs/seams/clan.md should read the updated doc.

Seam-gate update (2026-07-09): `docs/seams/clan.md` open decisions are now DECIDED (recorded in the doc): (1) during founding the operator app **embeds** the clan seam as a bundled Go helper (stdio JSON) — steady-state stays on the control plane; the package must build both ways. (2) Enrollment progress is **checklist-only** at stage/phase granularity — do not build percent-style progress. Q10's reconciliation against `docs/seams/clan.md` should read the updated doc.
Author
Owner

Spike S13 complete — recommendation: ADOPT clan.lol behind the docs/seams/clan.md wrapper.

Ran headless against the clan-lab lab (pinned clan-core db4db726). Every load-bearing question (Q1, Q2.1, Q3, Q4, Q5) confirmed; no stop-early gate tripped.

  • Q1 headless driving — confirmed. A program owns the full lifecycle from structured data: inventory.json is clan's own JSON (emitted as data), machine configs are templated Nix. clan machines update returns truthful non-zero exits with legible messages for eval/connectivity/missing-var — this softens the seam's “never $?” to a layered model (trust $? pre/at-deploy; reserve log-derivation for activation-time masked exits). Classify connectivity before secrets (clan's SSH errors embed the sops-nix path).
  • Q3 secrets — confirmed. Tiered sops/vars model; rotating one secret churns nothing else; crown jewels kept out of the runner by excluding its recipient key.
  • Q4 self-management — confirmed (workaround). A cluster node self-deploys (node1 activated its own config and stayed up) and drives the fleet; break-glass from an external host with repo clone + key works. Workaround: seed the runner's cache — eval precedes build, so --build-host alone is insufficient; the node needs flake-input + clan-helper closures offline. This is the concrete Q9 supply-chain requirement.
  • Q5 mutations — confirmed with timings + idempotence. Runner must refuse conflict markers; prefer exact-revision rollback over git revert of a non-tip commit.
  • Q6 Garage — confirmed (decisive). Ported as a clanService and run live at RF=3 across 3 zones with bucket + app key. clanServices is usable today; layout/keys/buckets need an out-of-band reconciler — the pattern for every future catalogue port.
  • Q7 NixOS-generation rollback (instant) and Q8 mesh (plain SSH over our IPs, ZeroTier unused) confirmed. Q9 answered structurally (no perf numbers — nested-VM honesty limit): a binary cache / seeding step is required on the gateway floor.

Caveat: Q2.2 — a full disk-overwrite takeover of a fresh non-NixOS host — is mechanism-confirmed (clan machines install --phases/--update-hardware-config nixos-facter) but not executed this run (all-NixOS lab + host load). A focused takeover follow-up is owed before the device-add slice ships. Does not trip the stop-early gate (Q2.1 founding-image proven; Q1/Q4 green).

Deliverables (commit 984286a):

  • docs/spike-findings/S13-clan-orchestration.md — verdicts per Q1–Q10, timings, recommendation, and 8 integration interfaces reconciled against the seam (3 amendments: layered outcome-detection, a supply/seeding interface, service-carried reconcilers).
  • spikes/S13-clan-orchestration/ — generate.sh (JSON→clan flake), runner.sh (commit→apply→classify), garage/ (clanService port + reconcile-demo.sh), demo.sh, README.
  • STATUS.md — clan validation debt resolved; clan seam now ready for the seam gate.

Lab destroyed after evidence capture.

**Spike S13 complete — recommendation: ADOPT clan.lol behind the `docs/seams/clan.md` wrapper.** Ran headless against the `clan-lab` lab (pinned clan-core `db4db726`). Every load-bearing question (Q1, Q2.1, Q3, Q4, Q5) confirmed; no stop-early gate tripped. - **Q1 headless driving — confirmed.** A program owns the full lifecycle from structured data: `inventory.json` is clan's own JSON (emitted as data), machine configs are templated Nix. `clan machines update` returns **truthful non-zero exits with legible messages** for eval/connectivity/missing-var — this *softens the seam's “never `$?`”* to a layered model (trust `$?` pre/at-deploy; reserve log-derivation for activation-time masked exits). Classify connectivity **before** secrets (clan's SSH errors embed the sops-nix path). - **Q3 secrets — confirmed.** Tiered sops/vars model; rotating one secret churns nothing else; crown jewels kept out of the runner by excluding its recipient key. - **Q4 self-management — confirmed (workaround).** A cluster node self-deploys (node1 activated its own config and stayed up) and drives the fleet; break-glass from an external host with repo clone + key works. Workaround: **seed the runner's cache** — eval precedes build, so `--build-host` alone is insufficient; the node needs flake-input + clan-helper closures offline. This is the concrete Q9 supply-chain requirement. - **Q5 mutations — confirmed** with timings + idempotence. Runner must refuse conflict markers; prefer exact-revision rollback over `git revert` of a non-tip commit. - **Q6 Garage — confirmed (decisive).** Ported as a `clanService` and run **live at RF=3 across 3 zones** with bucket + app key. `clanServices` is usable today; layout/keys/buckets need an **out-of-band reconciler** — the pattern for every future catalogue port. - **Q7** NixOS-generation rollback (instant) and **Q8** mesh (plain SSH over our IPs, ZeroTier unused) confirmed. **Q9** answered structurally (no perf numbers — nested-VM honesty limit): a binary cache / seeding step is *required* on the gateway floor. **Caveat:** Q2.2 — a full disk-overwrite takeover of a fresh non-NixOS host — is mechanism-confirmed (`clan machines install --phases/--update-hardware-config nixos-facter`) but **not executed** this run (all-NixOS lab + host load). A focused takeover follow-up is owed before the device-add slice ships. Does not trip the stop-early gate (Q2.1 founding-image proven; Q1/Q4 green). **Deliverables** (commit `984286a`): - `docs/spike-findings/S13-clan-orchestration.md` — verdicts per Q1–Q10, timings, recommendation, and 8 integration interfaces reconciled against the seam (3 amendments: layered outcome-detection, a supply/seeding interface, service-carried reconcilers). - `spikes/S13-clan-orchestration/` — `generate.sh` (JSON→clan flake), `runner.sh` (commit→apply→classify), `garage/` (clanService port + `reconcile-demo.sh`), `demo.sh`, README. - `STATUS.md` — clan validation debt resolved; clan seam now ready for the seam gate. Lab destroyed after evidence capture.
ben closed this issue 2026-07-09 18:48:35 +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#4
No description provided.