Ruling: should the invariant Nix ship as a pinned ourcloud-modules flake rather than rendered text? #423

Open
opened 2026-08-10 21:15:01 +00:00 by ben · 1 comment
Owner

Architecture fork, partially reopening ADR 0102 §4 — needs Ben, not the swarm.

Today every line of a community's Nix is generated from Go (~3,000 lines of Nix-in-Go across internal/clan/), by ADR 0102's deliberate ruling. The generation is the product — composing services per node without the operator writing Nix — and nobody proposes replacing it with a template. The narrower observation (from the mauke library's flake-input model, clan-community/flake.nix): most of the rendered text is invariant — the guest baseline, each service module's body, the front-door structure — with only community values varying. That invariant portion could live in a versioned ourcloud-modules flake that renderCommunityFlake pins alongside clan-core, leaving generated text carrying values only.

What it buys: (1) a fleet gets a service fix by moving one pin — which is what ADR 0017's update policy already wants — instead of requiring a newer operator app to re-render; (2) the module bodies become checkable by ordinary nix flake check instead of only the opt-in OURCLOUD_EVAL_SMOKE=1 laptop gate; (3) the renderVMGuestBaseline ↔ nix/guest/configuration.nix mirror-or-break-boot hazard (guarded today by a panic()) dissolves — one copy.

What it costs: a second published flake and release surface; a second pin to move in lockstep with the app; the operator-app-offline story must still work (the pin must resolve from the repo replica, ADR 0045); migration of standing communities.

Asks of Ben: rule (a) adopt (then a design pass scopes the split), (b) defer with criteria (e.g. revisit when the second fleet-facing service fix ships), or (c) reject and record why in an ADR amending 0102's rationale.

Source: the clan-community (mauke reference fleet) lessons review, docs/research/2026-08-10-clan-community-lessons.md (lands on main this sitting), lesson 10.


Ruled: DEFERRED (Ben, 2026-08-10)

Not adopted now, not rejected — ADR 0102 §4 (all community Nix rendered by the adapter's templating layer) stands unamended. The pain fix-by-pin solves is not being felt yet (one standing dev community, a rehearsal loop that re-founds constantly), the module interfaces are still churning weekly, and adoption would mint a second release surface + a pin-skew defect class + an offline pin-resolution design problem (ADR 0045) during the fastest-moving phase.

Revisit when the FIRST of these fires:

  1. A service fix has to ship to standing communities without an operator-app release — the moment fix-by-pin stops being theoretical.
  2. ≥5 real communities sit on stable app versions.
  3. A second mirror-drift defect class appears in the Nix-in-Go (the first is the renderVMGuestBaseline ↔ nix/guest/configuration.nix baseline guarded by panic()).

Prerequisite for the eventual split (whoever picks this up): the migration must prove itself with bit-identical per-machine closures via the drvPath baseline landed in #421 — the mauke library's own extraction proof.

Labelled deferred per docs/agents/triage-labels.md: triage automation skips this issue; a human re-labels it when a criterion fires.

Architecture fork, partially reopening ADR 0102 §4 — needs Ben, not the swarm. Today every line of a community's Nix is generated from Go (~3,000 lines of Nix-in-Go across `internal/clan/`), by ADR 0102's deliberate ruling. The generation *is* the product — composing services per node without the operator writing Nix — and nobody proposes replacing it with a template. The narrower observation (from the mauke library's flake-input model, `clan-community/flake.nix`): most of the rendered text is **invariant** — the guest baseline, each service module's body, the front-door structure — with only community values varying. That invariant portion could live in a versioned `ourcloud-modules` flake that `renderCommunityFlake` pins alongside `clan-core`, leaving generated text carrying values only. **What it buys:** (1) a fleet gets a service fix by moving one pin — which is what ADR 0017's update policy already wants — instead of requiring a newer operator app to re-render; (2) the module bodies become checkable by ordinary `nix flake check` instead of only the opt-in `OURCLOUD_EVAL_SMOKE=1` laptop gate; (3) the `renderVMGuestBaseline` ↔ `nix/guest/configuration.nix` mirror-or-break-boot hazard (guarded today by a `panic()`) dissolves — one copy. **What it costs:** a second published flake and release surface; a second pin to move in lockstep with the app; the operator-app-offline story must still work (the pin must resolve from the repo replica, ADR 0045); migration of standing communities. **Asks of Ben:** rule (a) adopt (then a design pass scopes the split), (b) defer with criteria (e.g. revisit when the second fleet-facing service fix ships), or (c) reject and record why in an ADR amending 0102's rationale. _Source: the clan-community (mauke reference fleet) lessons review, `docs/research/2026-08-10-clan-community-lessons.md` (lands on main this sitting), lesson 10._ --- ## Ruled: DEFERRED (Ben, 2026-08-10) Not adopted now, not rejected — ADR 0102 §4 (all community Nix rendered by the adapter's templating layer) **stands unamended**. The pain fix-by-pin solves is not being felt yet (one standing dev community, a rehearsal loop that re-founds constantly), the module interfaces are still churning weekly, and adoption would mint a second release surface + a pin-skew defect class + an offline pin-resolution design problem (ADR 0045) during the fastest-moving phase. **Revisit when the FIRST of these fires:** 1. A service fix has to ship to standing communities **without** an operator-app release — the moment fix-by-pin stops being theoretical. 2. **≥5 real communities** sit on stable app versions. 3. A **second mirror-drift defect class** appears in the Nix-in-Go (the first is the `renderVMGuestBaseline` ↔ `nix/guest/configuration.nix` baseline guarded by `panic()`). **Prerequisite for the eventual split** (whoever picks this up): the migration must prove itself with **bit-identical per-machine closures** via the drvPath baseline landed in #421 — the mauke library's own extraction proof. Labelled `deferred` per `docs/agents/triage-labels.md`: triage automation skips this issue; a human re-labels it when a criterion fires.
Author
Owner

Defer re-checked (Ben, 2026-08-12 backlog walk): the GOTCHAS #12 divergence class (DIV-2/3/4, the #450 audit) was weighed against criterion 3 and ruled NOT a second mirror-drift class — it is drift between duplicated render paths, already being closed by the audit's tickets, not a Go↔.nix file mirror. All three criteria remain unfired; the defer stands.

Defer re-checked (Ben, 2026-08-12 backlog walk): the GOTCHAS #12 divergence class (DIV-2/3/4, the #450 audit) was weighed against criterion 3 and ruled NOT a second mirror-drift class — it is drift between duplicated render paths, already being closed by the audit's tickets, not a Go↔`.nix` file mirror. All three criteria remain unfired; the defer stands.
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#423
No description provided.