The eval smoke records and compares a per-machine drvPath baseline #421

Closed
opened 2026-08-10 21:14:55 +00:00 by ben · 1 comment
Owner

OurCloud's Nix is Go string concatenation that no compiler checks. A refactor of a render claiming to "only move where values live" has no proof today: readinessAt computes every machine's system.build.toplevel.drvPath (internal/clan/adapter.go) but nothing is ever compared to a baseline, and scripts/build-gateway-warm.sh records a toplevel with no comparison. The mauke library's scripts/drvpath-check.sh is the model: bit-identical closures proved its whole extraction safe.

Acceptance criteria

  • The opt-in eval smoke (OURCLOUD_EVAL_SMOKE=1, internal/clan/seedcommunity_eval_test.go) records a per-rendered-machine drvPath baseline file (committed) and compares subsequent runs against it.
  • The machine list is derived from the rendered fixture, not hand-listed — a new node must not silently escape the baseline.
  • A diff fails the test printing machine + old/new drvPath; updating the baseline is a deliberate, reviewed act, and the baseline file's header states the social rule: do not re-baseline to make a diff go away.
  • (OurCloud is already immune to the untracked-file eval trap — ConfigRepo.Mutate commits always, ADR 0102 — note this in the test comment rather than re-guarding it.)

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

OurCloud's Nix is Go string concatenation that no compiler checks. A refactor of a render claiming to "only move where values live" has no proof today: `readinessAt` computes every machine's `system.build.toplevel.drvPath` (`internal/clan/adapter.go`) but nothing is ever compared to a baseline, and `scripts/build-gateway-warm.sh` records a toplevel with no comparison. The mauke library's `scripts/drvpath-check.sh` is the model: bit-identical closures proved its whole extraction safe. **Acceptance criteria** - The opt-in eval smoke (`OURCLOUD_EVAL_SMOKE=1`, `internal/clan/seedcommunity_eval_test.go`) records a per-rendered-machine drvPath baseline file (committed) and compares subsequent runs against it. - The machine list is derived from the rendered fixture, not hand-listed — a new node must not silently escape the baseline. - A diff fails the test printing machine + old/new drvPath; updating the baseline is a deliberate, reviewed act, and the baseline file's header states the social rule: **do not re-baseline to make a diff go away**. - (OurCloud is already immune to the untracked-file eval trap — `ConfigRepo.Mutate` commits always, ADR 0102 — note this in the test comment rather than re-guarding it.) _Source: the clan-community (mauke reference fleet) lessons review, `docs/research/2026-08-10-clan-community-lessons.md` (lands on main this sitting), lesson 13._
Author
Owner

Landed on origin/main as 7cde0c1.

The opt-in eval smoke (OURCLOUD_EVAL_SMOKE=1, internal/clan/seedcommunity_eval_test.go) now records a committed per-machine system.build.toplevel.drvPath baseline (internal/clan/testdata/drvpath-baseline.txt) and compares subsequent runs against it — mauke scripts/drvpath-check.sh turned into a standing Go guard.

  • Machine list derived, not hand-listed: the baseline helper evals builtins.attrNames on nixosConfigurations and evaluates every rendered node; the smoke reuses its own toplevel evals as a seed so nothing is forced twice, but a node added to the fixture is evaluated and baselined automatically — it cannot silently escape.
  • Two scopes recorded with real drvPaths against the pinned clan-core/nixpkgs by running both smokes: seed-community (fleetgw+gateway) and own-vps-gateway (gateway).
  • Drift fails loud printing machine + old/new drvPath (verified: a corrupted baseline row reddens the smoke). A new unbaselined node and a dropped node also fail. Re-baselining is a deliberate OURCLOUD_EVAL_SMOKE_UPDATE=1 act; the file header carries the social rule (do not re-baseline to make a diff go away). Rows sorted for review-legible git diffs.
  • Comparison core unit-tested with no Nix (drvpath_baseline_unit_test.go, CI-runnable): moved drvPath, new-node-cannot-escape, dropped node, clean, round-trip, missing-file bootstrap.
  • ADR 0102 commit-always immunity to the untracked-file eval trap noted in the test comment, not re-guarded.

Verified: both eval smokes pass and record real baselines; a clean re-run compares green; the corrupted-baseline case fails with the drvPath diff; full go test ./... green through the pre-push gate.

Landed on `origin/main` as `7cde0c1`. The opt-in eval smoke (`OURCLOUD_EVAL_SMOKE=1`, `internal/clan/seedcommunity_eval_test.go`) now records a committed per-machine `system.build.toplevel.drvPath` baseline (`internal/clan/testdata/drvpath-baseline.txt`) and compares subsequent runs against it — mauke `scripts/drvpath-check.sh` turned into a standing Go guard. - **Machine list derived, not hand-listed:** the baseline helper evals `builtins.attrNames` on `nixosConfigurations` and evaluates every rendered node; the smoke reuses its own toplevel evals as a seed so nothing is forced twice, but a node added to the fixture is evaluated and baselined automatically — it cannot silently escape. - **Two scopes recorded with real drvPaths** against the pinned clan-core/nixpkgs by running both smokes: `seed-community` (fleetgw+gateway) and `own-vps-gateway` (gateway). - **Drift fails loud** printing machine + old/new drvPath (verified: a corrupted baseline row reddens the smoke). A new unbaselined node and a dropped node also fail. Re-baselining is a deliberate `OURCLOUD_EVAL_SMOKE_UPDATE=1` act; the file header carries the social rule (**do not re-baseline to make a diff go away**). Rows sorted for review-legible git diffs. - **Comparison core unit-tested with no Nix** (`drvpath_baseline_unit_test.go`, CI-runnable): moved drvPath, new-node-cannot-escape, dropped node, clean, round-trip, missing-file bootstrap. - ADR 0102 commit-always immunity to the untracked-file eval trap noted in the test comment, not re-guarded. Verified: both eval smokes pass and record real baselines; a clean re-run compares green; the corrupted-baseline case fails with the drvPath diff; full `go test ./...` green through the pre-push gate.
ben closed this issue 2026-08-10 21:56: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#421
No description provided.