enroll-configure red: seed writes acme-dns api.port as a string — the gateway config still does not evaluate #400

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

Drive 20260810T162053Z (built with eabd46b): #399's hostPlatform fix landed (machines/gateway/platform.nix present in the seed) and eval moved one layer deeper to the next error, reproduced by hand against the run's captured flake (state/clan-config):

error: A definition for option `services.acme-dns.settings.api.port' is not of type
`16 bit unsigned integer; between 0 and 65535 (both inclusive)'. Definition values:
- In `…/machines/gateway/acme-dns.nix': "8081"

Defect: internal/clan/acmedns.go:142 renders the port with %q:

fmt.Fprintf(b, "        port = %q;\n", fmt.Sprintf("%d", apiPort))

so the seed emits port = "8081"; where NixOS's option type demands an integer. Fix: emit port = %d;. Sweep the same generator for other numeric options quoted with %q while there.

The local-guest path never catches acme-dns rendering because only the public own-VPS gateway imports the module (acmedns_attach.go) — see the companion seam-test issue for closing this class.

drive 20260810T162053Z red at wizard: drive red at wizard — the wizard died before any leg ran
evidence: test-results/…/20260810T162053Z/ on matou-workstation; captured flake in …/state/clan-config

Drive `20260810T162053Z` (built with `eabd46b`): #399's hostPlatform fix landed (`machines/gateway/platform.nix` present in the seed) and eval moved one layer deeper to the next error, reproduced by hand against the run's captured flake (`state/clan-config`): ``` error: A definition for option `services.acme-dns.settings.api.port' is not of type `16 bit unsigned integer; between 0 and 65535 (both inclusive)'. Definition values: - In `…/machines/gateway/acme-dns.nix': "8081" ``` Defect: `internal/clan/acmedns.go:142` renders the port with `%q`: ```go fmt.Fprintf(b, " port = %q;\n", fmt.Sprintf("%d", apiPort)) ``` so the seed emits `port = "8081";` where NixOS's option type demands an integer. Fix: emit `port = %d;`. Sweep the same generator for other numeric options quoted with `%q` while there. The local-guest path never catches acme-dns rendering because only the public own-VPS gateway imports the module (`acmedns_attach.go`) — see the companion seam-test issue for closing this class. drive `20260810T162053Z` red at `wizard`: `drive red at wizard — the wizard died before any leg ran` evidence: `test-results/…/20260810T162053Z/` on matou-workstation; captured flake in `…/state/clan-config` <!-- rehearsal-sig: dcf630511b50 -->
Author
Owner

Fixed in 80b25e6 (on origin/main), as part of the companion #401 seam-test arc.

internal/clan/acmedns.go:142 no longer renders the acme-dns API port with %q — it now emits a bare integer (port = %d;), so services.acme-dns.settings.api.port satisfies its NixOS 16-bit-unsigned-integer option type. Swept the same generator: the port was the only numeric option quoted with %q; the remaining %q uses (domain/nsname/records/StateDirectory/EnvironmentFile/api URL) are legitimately strings.

While fixing it, the new own-VPS gateway eval smoke surfaced the very next same-class error, database.engine = "sqlite3", which fails the pinned one of "sqlite", "postgres" type — also fixed to "sqlite".

Guards: TestRenderAcmeDNS_TypedOptionsMatchNixModule (cheap, in-gate, no nix) asserts both render with the correct Nix types; TestOwnVPSGateway_EvalSmoke (#401, gated) proves the whole seeded own-VPS gateway config evaluates — the systemic guard that closes this class.

Fixed in `80b25e6` (on origin/main), as part of the companion #401 seam-test arc. `internal/clan/acmedns.go:142` no longer renders the acme-dns API port with `%q` — it now emits a bare integer (`port = %d;`), so `services.acme-dns.settings.api.port` satisfies its NixOS 16-bit-unsigned-integer option type. Swept the same generator: the port was the only numeric option quoted with `%q`; the remaining `%q` uses (domain/nsname/records/StateDirectory/EnvironmentFile/api URL) are legitimately strings. While fixing it, the new own-VPS gateway eval smoke surfaced the very next same-class error, `database.engine = "sqlite3"`, which fails the pinned `one of "sqlite", "postgres"` type — also fixed to `"sqlite"`. Guards: `TestRenderAcmeDNS_TypedOptionsMatchNixModule` (cheap, in-gate, no nix) asserts both render with the correct Nix types; `TestOwnVPSGateway_EvalSmoke` (#401, gated) proves the whole seeded own-VPS gateway config evaluates — the systemic guard that closes this class.
ben closed this issue 2026-08-10 16:55:11 +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#400
No description provided.