deploy-document-archive: paperless.nix renders environmentFile = "", node eval-excluded #1284
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1284
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
20260907T015459Z(private path, targetbrands, commit9567f4b21e0ccd6e2ed921b450ae0ad2a3907d29) went red at leg 11 of 11,deploy-document-archive, after 10 green legs.artifacts/verdict.json:The drive is the seven-services-one-at-a-time brand-reach journey (
tests/e2e/provision-brands.live.spec.ts:114). Service 1 (archive, Omeka) deployed green in 246 s, went healthy, wore its kit and was removed cleanly. Service 2 (document-archive, Paperless) never deployed: the clan eval preflight rejected the gateway's own generated config and excluded the node, so the deploy died in 20 s with nothing applied.The evidence
artifacts/legs.json, leg 11 — the fault verbatim (identical text inartifacts/journey.json'sfaultfield):The empty string is the whole red.
services.paperless.environmentFileisnull or absolute pathin nixpkgs;""is neither, so the module system throws duringconfig_evaland the gateway is excluded before a single derivation is built.The control plane logged the same thing from inside the box —
logs/guest-control-plane.log:198:The harness saw it through the product's own fault frame, not a timeout —
artifacts/provision-brands.live-.../error-context.md, thrown atwaitForDeployActiveline 391 off[data-field="deploy-failure"]withdata-status="clean-retry". That is the deploy screen reporting a classified failure (ADR 0027) and the harness quoting it, both behaving correctly.Corroborating that nothing infra-side broke:
logs/guest-failed-units.log—0 loaded units listed.The guest is clean; no service crashed, because none was ever deployed.logs/guest-control-plane.log:198is the only error in the control plane's whole run; line 179 shows the document-archive health check wired normally at boot (url=https://document-archive.e2e-drive.idss.internal admin=admin).logs/guest-journal.log(225 lines) contains nopaperless/config_eval/preflightmatch at all — consistent with the eval preflight running host-side and the guest never being touched.deploy-archive(green, 246501 ms) andremove-archive(green, 20582 ms) prove the deploy/remove path itself works on this box for a different port.Suspected layer: product
Specifically the clan config renderer for the document-archive (Paperless) port. The renderer wrote a secret-path option as a carried Go string with no producer filling it, so the zero value rendered as
""instead ofnull(or the attribute being omitted). This is the#1247empty-secret-path eval-exclusion class, reappearing in the one port that ruling left unconverted.Not harness: the harness read the product's own fault frame verbatim and failed in 20 s rather than burning the deploy budget. Not infra:
host.jsonshows 62 G free, KVM guest active (logs/guest-unit.log:idss-guest.service … active (running) since 01:56:04), zero failed units, and the preflight refused before any machine work started.This is not the KNOWN frontier. The named frontier is the own-VPS carrier / pairing-never-flips skip.
legs.jsonrecordsskip: 0and carries no skip reasons at all; no pairing leg appears in the 11. This red is a distinct, new defect.What was absent / not asked
logs/guest-unit.logshowsidss-guest.serviceactive. Note also this drive is VM-mode (ADR 0056, qemu), not a droplet —logs/droplet-journal.txtdoes not exist; the journal harvested islogs/guest-journal.log.paperless.nixis not in the run directory.state/clan-config/machines/gateway/holds onlyconfiguration.nix,front-door.nix,gateway-guest.nix,gateway-render.json,ledger.nix(all mtime 01:47, the restored snapshot) — the clean-retry rolled the render back, so only the nix store path9hzllfiy38ywkn96pvz6xmbz1b38zg6k-sourcenames it. A harvest that copied the rendered machine dir before rollback would have handed the exact emitted lines over.logs/state-logs.logrecordsENOENT … state/logs, andlogs/clan-config-snapshot.loghas an emptybundle:line — both pre-existing harvest gaps, unrelated to this red.What plugging it needs
The visible one-line shape — render
null/omit when the carried secret path is empty instead of""— is not sufficient on its own, and this is why the run's own healer refused rather than patched (logs/healer-claude.out, its refusal rule 3):(That healer record also cites
internal/clan/portroute.go:52,internal/clan/paperless.go:257-258andinternal/clan/portsecrets_test.go:22-27as the render/attach sites and the vacuous test pin. I could not verify those citations — this diagnosis was sandboxed to the run directory — so treat the line numbers as its claim, not mine. The run-directory evidence above stands on its own.)So plugging it needs, in order:
#1247port-owned-generator shape (one generator minting the Paperless secret key and admin password, with the generator's rendered path landed into the control plane'sIDSS_PAPERLESS_ADMIN_PASSWORD_FILEso both ends of the handshake read one secret), or keeps its own pattern with some other producer. BothenvironmentFileandpasswordFilefall out of that answer; so does what identityPAPERLESS_ADMIN_USERcarries. This is a trust-moment decision, not a mechanical repair — dropping the options instead would deploy a document archive with no admin superuser, a security-posture change.environmentFiles(the oci-container form) but not the singularenvironmentFileorpasswordFilethat the nixpkgs Paperless module uses, so it passed vacuously over a render emitting two empty paths. Adding both names makes this class fail in unit tests instead of at leg 11 of a rehearsal drive.machines/<node>/tree at the moment of an eval-preflight failure, before the clean-retry rollback, so the next drive of this class ships the emitted nix text rather than a store hash.drive
20260907T015459Zred atdeploy-document-archive:deploy failed (clean-retry): provision: deploy gateway: clan: config_eval on gateway: the node was excluded at the eval preflight — nothing was deployed: error: … while evaluating the attribute 'vevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T015459Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRULED + FIXED (ruled by agent under ADR 0174 — veto anytime)
Commit
42c9e644onmain.The ruling: apply the standing #1247 shape — Ben's ruling, five ports already converted — to the two ports its scope note deferred. The deferral was because their secrets are health-check-coupled admin passwords; the missing piece was the handshake, and that shape exists too: #863 (Nextcloud) — the port's generator mints the credential, the control plane falls back to the boot-known materialised path and reads the secret per call. Composing two standing rulings introduces no new trust posture (the archive generator already mints admin passwords locally under sops-age), so this is a two-way door, provable by render tests + the already-armed #1277 loop.
What landed:
document-archive-secretsgenerator (adminpass raw + Django secret-key env) andsurveys-secrets(adminpass + dbpass); every consumer reads the generator's rendered.pathas a Nix EXPRESSION —passwordFile,environmentFile,database.passwordFile, and LimeSurvey'sLoadCredentialantiquotes it. The carriedAdminPassFile/SecretEnvFile/DBPassFilefields are DELETED — no producer ever existed for them.deploy-surveys(two cycles out on this drive) would have red identically at the eval preflight, plus aLoadCredential = [ "admin-pass:" ]that could never load.PAPERLESS_ADMIN_USER/LimeSurvey admin default toadminon BOTH ends (render + health check) — one identity, one minted secret at/run/secrets/vars/<gen>/adminpass, read per call (lazyAdminSecretgrew the boot-known default-file fallback; the other ports' behaviour is unchanged).environmentFile+passwordFilenames it missed — the exact vacuity that let two empty paths red a rehearsal drive at leg 11 instead of a unit test. Scope note rewritten; both ports'SecretsRideClanVarsrender tests re-ruled to the generator contract.machines/<node>/tree before the clean-retry rollback) is a good harness improvement — deferred, not lost: noted here for the next actor rather than bundled into a product commit.Credit: the healer's rule-3 refusal was exactly right —
passwordFile = ""reds identically one line after anyenvironmentFile-only conversion.Proof:
go build/vet/gofmtgreen;internal/clan+control-planesuites green (uncached). The exact wire (module bootstraps the superuser from the minted file; consume-and-find check authenticates) is confirmed by the armed drive — a red comes back loud with the journal. Closing — #1277 re-fires, adopting the snapshot (the heals since capture are product-dir commits, so the key honestly drifts and the next founded fire re-captures).deploy-servicesand never reachedhealth-checks(drive 20260907T023209Z, sig 8bcb93da00e3) #1285services.limesurvey.uploadsDir— an option nixpkgs has never had — and three more nixpkgs faults wait behind it #1318