services-row: the OIDC halves redefine an attribute path meshBound already owns, so the gateway stops evaluating and every placed service dies with it #1557
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1557
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The failure
drive-rented-services/20260917T000009Z— 19 legs green,services-rowred (artifacts/verdict.json,artifacts/legs.json). The founding itself stood up:deploy,activationandfoundedall green, the branded portal live athttps://roles-proof.idss.nz, both public front doors answering over TLS. But S11's own row reported 6 placed services did not stand up — files, archive, document-archive, whakapapa, surveys, data-collections, eachfailed: the deploy did not hold — add … from the control panel(artifacts/services-rows.json).The evidence
logs/founding-state.log→standup.deploy.log, theservicesstage, carries the real cause:The captured config in
state/clan-config/machines/gateway/paperless.nixshows the collision directly — line 80 and line 235 define the same attribute path at the module's own attrset level. Runningnix-instantiate --parseover that captured file reproduces the drive's error verbatim, pointing atpaperless.nix:235:3.Both lines come from the same renderer:
internal/clan/paperless.go:529—renderPaperlessOIDCemitssystemd.services.paperless-web.after = [ "document-archive-oidc.service" ];internal/clan/netbird.go:712—meshBound("paperless-web"), called frominternal/clan/paperless.go:273, emitssystemd.services.paperless-web.after = [ "netbird-mesh.service" ];The comment at
internal/clan/paperless.go:526states the false premise outright: "afterMERGES with meshBound's (NixOS list option)". That merge is real, but it happens across module definitions. The same attribute path twice in one attrset is a Nix parse/eval error that fires before the module system is ever consulted.internal/clan/netbird_test.go:555-557already names this exact hazard for the control plane ("a path-leaf meshBound would be a raw-attrset conflict") — the two OIDC ports just missed it.Because the gateway's
config_evalfailed, the vars seal failed, so every placed service reported "the deploy did not hold" — the six failures are one fault, not six.A second, unfired instance of the same defect
Scanning every generated module in
state/clan-config/machines/gateway/for duplicate top-level attribute paths turned up two more, both inwhakapapa.nix, both fromrenderWhakapapaOIDC:systemd.tmpfiles.rulesat lines 103 and 202 —internal/clan/whakapapa.go:695against the store's own atinternal/clan/whakapapa.go:440(same false comment at:694)systemd.services.podman-grampsweb.afterat lines 207 and 359 —internal/clan/whakapapa.go:700againstmeshBound("podman-grampsweb")atinternal/clan/whakapapa.go:295(same false comment at:697-698)The drive never reached these:
paperless.nixfails eval first. Fixing only paperless would have spent the next paid box rediscovering the twin, so both are repaired in this commit.Suspected layer
The Nix render layer (
internal/clan/), specifically the*-oidchalves added by #1538 (9f5524ef) and #1539 (b4d0b51e). Nothing in the deploy runner, the seal, or the app is at fault — they reported the eval failure accurately.The fix
Both OIDC halves now emit their definitions as an inline module inside
imports = [ … ], which is a separate module definition, so the list options merge exactly as the comments always intended:After=carries both units, and both tmpfiles rules land.internal/clan/netbird_test.gogainsTestRenderedModules_NoDuplicateTopLevelAttrPath, the rail behind the hazard ADR 0159 decision 5 already names.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Mechanical repair, not a design decision. Nothing about what the product means to do changes: paperless-web still orders after
document-archive-oidc, podman-grampsweb still orders afterwhakapapa-oidc, both still order afternetbird-mesh, and the whakapapa oidc env file still gets its tmpfiles rule. The only change is where in the module those definitions sit, so that Nix accepts them. No new default, no changed message at a trust moment, no route shape, no secrets shape, no security posture — the emitted units, secrets and ordering are byte-equivalent in meaning. The existing render assertions (internal/clan/paperless_test.go:294,298,internal/clan/whakapapa_test.go:264,316,377) all still pass unedited, which is itself evidence nothing the checks prove was weakened.Two-way door — revertible.
git revert 6a4c4884restores the previous emission exactly; the change is three files of render text with no migration, no state, no on-box artifact, and nothing persisted outside the generated module. A later commit is free to pick a different merge mechanism (a variadicmeshBound, say) without unwinding anything.Proven by tests written here.
TestRenderedModules_NoDuplicateTopLevelAttrPathininternal/clan/netbird_test.gowas written first and run red, and it reproduced the drive's own line numbers before the fix —paperless-web.after [80 235], matchingpaperless.nix:80:3infounding-state.logexactly — plus the two unfired whakapapa collisions. It passes after the fix, and the fullinternal/clanpackage is green. Independently confirmed outside Go:nix-instantiate --parseon the drive's capturedpaperless.nixreproducesattribute 'systemd.services.paperless-web.after' already defined, while both post-fix renders parse clean.gofmtclean,go vetclean.Rules 1 and 2 hold. No assertion, expectation, test or leg was edited, deleted or skipped — the diff on the test file is +50/-0. Three files, 36 changed non-test lines (paperless.go 15/3, whakapapa.go 21/7), one commit. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.
drive
20260917T000009Zred atservices-row(sig b0b6a45a7146) — self-fixed on the fast lane, commit1ba9448db578ae52a8a74a9512df2e5b24d2f0e7; checks: Targeted (red-first):GOWORK=/home/dev/rehearsal-heal/idss/go.work go test ./internal/clan -run TestRenderedModules_NoDuplicateTopLevelAttrPath— RED before the fix with 3 failures reproducing the drive's own line numbers (paperless (OIDC): "systemd.services.paperless-web.after" defined 2 times, lines [80 235];whakapapa (OIDC): "systemd.tmpfiles.rules" lines [103 202];whakapapa (OIDC): "systemd.services.podman-grampsweb.after" lines [207 359]), andok git.matou.nz/Matou/idss/internal/clan 0.005safter. Package tests:GOWORK=… go test ./internal/clan—ok git.matou.nz/Matou/idss/internal/clan 26.722s, all green. Independent Nix confirmation:nix-instantiate --parseon the drive's capturedstate/clan-config/machines/gateway/paperless.nixreproduceserror: attribute 'systemd.services.paperless-web.after' already defined at …paperless.nix:80:3 / at …:235:3, while the post-fixRenderPaperless(samplePaperlessOIDC())andRenderWhakapapa(sampleWhakapapaOIDC())outputs both PARSE-OK.gofmt -l internal/clan/clean;go vet ./internal/clanclean.. evidence:/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260917T000009Zon matou-workstation.close-report for #1557 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope