seam test: a freshly-seeded own-VPS gateway flake must nix-eval — stop paying a droplet per stacked eval error #401

Closed
opened 2026-08-10 16:32:38 +00:00 by ben · 1 comment
Owner

Three consecutive drives (154053Z, 162053Z, and counting) each burned a full droplet cycle to surface ONE nix eval error in the seeded gateway config (missing hostPlatform → string api.port → whatever is next). Each error only appears after the previous one is fixed, so the cost is one paid drive per layer.

Wanted: a seam test that seeds an own-VPS gateway flake exactly as the carrier does (real seed leg, fake carrier facts: IP/slug/vars fixtures) and asserts nix eval .#nixosConfigurations.gateway.config.system.build.toplevel.drvPath succeeds. Run it wherever the existing clan seam tests run. That collapses the whole remaining stack of eval errors into one local red-green loop and permanently guards the seed's eval-ability.

Note the eval needs a nix-capable runner (the shared Go test gate may not have one) — if so, land it as a gated script alongside the drive preflight rather than a unit test; the drive's own eval preflight stays the last line of defence.

Companion to the acme-dns port issue (same arc, drive 20260810T162053Z).

Three consecutive drives (`154053Z`, `162053Z`, and counting) each burned a full droplet cycle to surface ONE nix eval error in the seeded gateway config (missing hostPlatform → string api.port → whatever is next). Each error only appears after the previous one is fixed, so the cost is one paid drive per layer. Wanted: a seam test that seeds an own-VPS gateway flake exactly as the carrier does (real seed leg, fake carrier facts: IP/slug/vars fixtures) and asserts `nix eval .#nixosConfigurations.gateway.config.system.build.toplevel.drvPath` succeeds. Run it wherever the existing clan seam tests run. That collapses the whole remaining stack of eval errors into one local red-green loop and permanently guards the seed's eval-ability. Note the eval needs a nix-capable runner (the shared Go test gate may not have one) — if so, land it as a gated script alongside the drive preflight rather than a unit test; the drive's own eval preflight stays the last line of defence. Companion to the acme-dns port issue (same arc, drive `20260810T162053Z`).
Author
Owner

Done in 80b25e6 (on origin/main).

Added the gated seam test TestOwnVPSGateway_EvalSmoke (internal/clan/seedcommunity_eval_test.go, guarded by OURCLOUD_EVAL_SMOKE=1 + a runnable nix, alongside the existing VM eval smoke). It seeds a PUBLIC own-VPS gateway flake EXACTLY as installOwnVPS does — real seed leg driven by a real CLI so clan flake lock actually commits (else clan vars generate refuses the unlocked clan-core input in pure mode, #313); fake carrier facts (IP/apex/network/platform); the real assembleGatewayLiveSet + AttachGateway composition of front-door + self-hosted acme-dns; then clan vars generates the node (the #398 ordering) and asserts nix eval .#nixosConfigurations.gateway.config.system.build.toplevel.drvPath succeeds.

Running it locally collapsed the remaining eval stack into one red-green loop: it surfaced and fixed the string api.port (#400, %q→%d) and then the database.engine "sqlite3"→"sqlite" enum (both against the pinned NixOS option types). The gateway now evaluates to a real toplevel drv (--- PASS: TestOwnVPSGateway_EvalSmoke, only non-fatal kanidm option-rename warnings remain). Cheap in-gate regression TestRenderAcmeDNS_TypedOptionsMatchNixModule guards the class without nix. The drive's own eval preflight stays the last line of defence.

Evidence: run OURCLOUD_EVAL_SMOKE=1 nix develop .#go-ci -c go test ./internal/clan/ -run TestOwnVPSGateway_EvalSmoke -v -timeout 28m.

Done in `80b25e6` (on origin/main). Added the gated seam test `TestOwnVPSGateway_EvalSmoke` (`internal/clan/seedcommunity_eval_test.go`, guarded by `OURCLOUD_EVAL_SMOKE=1` + a runnable nix, alongside the existing VM eval smoke). It seeds a PUBLIC own-VPS gateway flake EXACTLY as `installOwnVPS` does — real seed leg driven by a real CLI so `clan flake lock` actually commits (else `clan vars generate` refuses the unlocked clan-core input in pure mode, #313); fake carrier facts (IP/apex/network/platform); the real `assembleGatewayLiveSet` + `AttachGateway` composition of front-door + self-hosted acme-dns; then `clan vars generate`s the node (the #398 ordering) and asserts `nix eval .#nixosConfigurations.gateway.config.system.build.toplevel.drvPath` succeeds. Running it locally collapsed the remaining eval stack into one red-green loop: it surfaced and fixed the string `api.port` (#400, `%q`→`%d`) and then the `database.engine` `"sqlite3"`→`"sqlite"` enum (both against the pinned NixOS option types). The gateway now evaluates to a real toplevel drv (`--- PASS: TestOwnVPSGateway_EvalSmoke`, only non-fatal kanidm option-rename warnings remain). Cheap in-gate regression `TestRenderAcmeDNS_TypedOptionsMatchNixModule` guards the class without nix. The drive's own eval preflight stays the last line of defence. Evidence: run `OURCLOUD_EVAL_SMOKE=1 nix develop .#go-ci -c go test ./internal/clan/ -run TestOwnVPSGateway_EvalSmoke -v -timeout 28m`.
ben closed this issue 2026-08-10 16:54:46 +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.

Reference
Matou/idss#401
No description provided.