deploy-archive: omeka environmentFiles entry not an absolute path — gateway eval-excluded #1247
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.
Reference
Matou/idss#1247
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
20260906T003416Z(private-path, targetarchive) is 6 green / 1 red, no skips —artifacts/verdict.json:The drive got past
founding-prefix,operator-session,gateway-change,browse-catalogue,tick-archiveandplain-deploy, then died ondeploy-archiveafter 30.7s (artifacts/legs.json):This is not the KNOWN frontier. The brief names the own-VPS pairing carrier as this drive's known red, but
legs.jsonrecords"skip": 0and carries no skip reasons at all — nothing in this drive's own records defers this. Pairing is not what failed; a Nix type error at the eval preflight is.The evidence
The same string appears at three independent capture points — the leg record, the droplet-side control plane, and the Playwright artifact:
artifacts/legs.json:40, andartifacts/journey.json:41+:44(as the top-levelfault)logs/guest-control-plane.log:145—level=WARN msg="provision deploy failed" component=control-plane device=gateway error="…"artifacts/provision-archive.live-…/error-context.md:17, testtests/e2e/provision-archive.live.spec.ts:126virtualisation.oci-containers.containers.<n>.environmentFilesistypes.listOf types.path, so the first entry of the archive module's list is a string that is not an absolute path — empty or relative. The gateway was excluded before anything was applied ("nothing was deployed"), which the box corroborates:logs/guest-failed-units.logreports0 loaded units listed— no unit ever changed state.Two further harvested lines point at an unwired archive secret. In
logs/guest-control-plane.log:124-125the files/calendar port logs a real clan-vars secret path while the archive port logs only its API-key store — no secret path at all:and
logs/guest-archive-keystore.logreads, in full:Suspected layer: product
The clan render/attach seam, not the harness and not the fixtures. The archive port's secrets-env-file input looks like a carried string with no producer: no clan-vars generator mints it, so the render emits a non-path into
environmentFiles. Commit3e8cb171(#1246) is why it surfaced now — it completed the co-host path, soarchive.nixis imported and evaluated for the first time instead of sitting as dead text, and eval immediately found the hole. The drive behaved correctly: it caught a real product gap the moment the module went live.Provenance caveat, stated plainly.
logs/healer-claude.outholds a prior healer's diagnosis naming exact sites (archive.go:293,320renderingenvironmentFiles = [ %q ]fromcfg.SecretsEnvFile;archive_attach.go:90;portroute.go:49buildingArchiveLiveSet{Node, Apex}only;gateway_attach.go:108-122deriving the module list fromportAttachers) and reports a local repro ofenvironmentFiles = [ "" ]. I could not verify any of it. This session's sandbox confines reads to the run directory and refused every attempt on/home/swarm/swarm/Matou/idss/internal/clan/(both directly and via a sub-agent). Those line numbers are the healer's, unconfirmed — verify them against the tree before acting. What the run directory independently supports is the shape (the archive has no minted secret; files does), not the specific sites.The healer further claims the same zero-value pattern leaves seven ports' secret fields empty (whakapapa, data-collections, paperless, newsletters, video, surveys alongside archive), each redding identically once co-hosted. Also unverified — but worth checking first, since it would change the fix from one wire into one derived seam.
A second, separate defect: the error is truncated where it matters
Every capture ends at
Definition values:with the value list cut off — the one line that would name the offending string. Confirmed bygrep -A3acrosslogs/andartifacts/: nothing follows it anywhere in the harvest. That is precisely why "empty vs. relative path" cannot be settled from the records alone. Worth fixing in the clan error propagation independently of the archive fix — it is cheap, and it would have made this diagnosis exact.What plugging it needs
RULED 2026-09-06 (agent, two-way under ADR 0174 — see the ruling comment below): SWARM-READY. The three questions, answered there in full (files precedent #360: per-module generator declaration, one env file per port, Nix-expression path, no Go-carried secret, all env-file ports in this ticket):
nextcloud-adminshape?portSecretstable besideportAttachers, so registering a port stays one entry), or is it declared per-render?Both cheap fixes are wrong and should be ruled out explicitly: an invented literal path converts an honest eval red into a runtime
EnvironmentFile not foundonpodman-omeka.service, and droppingenvironmentFileswhen the path is empty boots Omeka and MariaDB with no passwords at all.The actionable work (per the ruling): a red-first test that the archive render with no secret path carried never emits an empty
environmentFilesentry; the generator wiring itself; and aTestPortSecretsCoversEveryAttacherpin so a future port cannot land render-without-secret.Run-directory notes — what is absent
logs/droplet-journal.txt. This drive ran against the local payload rather than a droplet —artifacts/host.jsongives"payloadMode": "/home/swarm/swarm/rehearsal-payload"and"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT". The droplet-side records are thelogs/guest-*.logset, harvested over ssh from127.0.0.1:46353.legs.json,verdict.json,journey.json,host.json,.last-run.json, the leg and ceremony screenshots, the Playwright report witherror-context.mdandtrace.zip, and the fulllogs/set.logs/clan-config-snapshot.logrecordsHEAD: cf921ab32d0091357e6a372d61b6179aa9e6411e— that is the generatedstate/clan-configrepo's own commit, not the idss source commit (3e8cb171, perverdict.json). Not a discrepancy.state/clan-config/machines/gateway/holds noarchive.nix, consistent with the clean-retry rolling back after nothing was deployed.drive
20260906T003416Zred atdeploy-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/20260906T003416Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRULED (agent, two-way under ADR 0174 — Ben vetoes async): the files precedent (#360) — each port module DECLARES its own clan-vars generator beside its consumer and references the rendered path as a Nix expression; the Go live set carries NO secret path at all.
Verified line by line on main
3e8cb171(the healer's sites hold):internal/clan/archive.go:293and:320renderenvironmentFiles = [ %q ]fromcfg.SecretsEnvFile;archive_attach.go:90copieslive.SecretsEnvFile; the attacher inportroute.gobuildsArchiveLiveSet{Node, Apex}only, so the value is""and the module emitsenvironmentFiles = [ "" ]—types.listOf types.pathrejects it at eval, the gateway is eval-excluded, nothing deploys. It surfaced now because #1246 made the module evaluate for the first time. The same carried-string-with-no-producer shape is inwhakapapa.go:250/271(SecretKeyFile),datacollections.go:222(SecretKeyFile),newsletters.go:251(EnvFile),video.go:195/247(EnvFile);docsediting.go:178(AdminSecretFile) rides its own attach path — audit it the same way. paperless/surveys render no env file (their own pattern; leave them).The precedent to copy:
files.go:483/488referenceconfig.clan.core.vars.generators.nextcloud-admin.files.adminpass.path/…nextcloud-db.files.dbpass.pathIN NIX, andfiles.go:547-551declare the generator (files.dbpass = { owner; group; mode },runtimeInputs = [ pkgs.openssl ],script) in the same module — "single home, ADR 0062, so the deployed secret and the path the daemon reads can never drift from a hand-set literal" (files.go:222-226). Clan vars already deploy on the private VM guest (Nextcloud does), so no new plumbing.The healer's three questions:
DB_PASSWORD==MARIADB_PASSWORD; plusMARIADB_ROOT_PASSWORD,OMEKA_ADMIN_PASSWORD). Name it<slug>-secrets, fileenv,mode = "0400", owner root (podman reads it as root). Both archive containers reference the SAMEconfig.clan.core.vars.generators.archive-secrets.files.env.path. Per-secret files in the nextcloud-admin shape are for daemons that take apasswordFile; these ports take env files, so one file it is.portSecretstable besideportAttachers(a Go-side path string is the #360 drift the precedent exists to prevent). What IS pinned centrally: a render test over everyportAttachersslug (and docs-editing) asserting noenvironmentFiles/EnvironmentFileentry is a quoted literal — every one is aconfig.clan.core.vars.generators.<…>.pathexpression, and none is empty.TestGuestImage_EvalSmokestyle), by evaluating a co-host module set that includes them.Rejected, explicitly: an invented literal path (turns an honest eval red into a runtime
EnvironmentFile not found); droppingenvironmentFileswhen empty (boots Omeka + MariaDB with NO passwords); carrying the generator path as a Go string on the live set (#360's drift).What to build
archive.go: declareclan.core.vars.generators.archive-secretsin the render (openssl-random values, oneenvfile, the pair rule above); both containers'environmentFiles = [ config.clan.core.vars.generators.archive-secrets.files.env.path ]as a Nix expression (drop the%q). DeleteSecretsEnvFilefromArchiveLiveSet/archiveConfig(a field nobody fills is the bug). Checkomeka-reconcile(archive.go:389-430) still works: it runsomeka-s-cliviapodman execand needs no password — confirm the erseco image consumesOMEKA_ADMIN_PASSWORDon first run soadminuserexists when the oneshot mints the key.GRAMPSWEB_SECRET_KEY), data-collections (GRIST_SESSION_SECRET), newsletters (LISTMONK_ADMIN_PASSWORD+LISTMONK_SMTP_PASSWORD— SMTP is the community mail credential, so that generator may need to read the mail generator's file rather than mint; follow whatevermail.goalready does), video (PT_INITIAL_ROOT_PASSWORD); audit docs-editing.go test ./internal/clan/ ./internal/provision/green; STATUS.md lead; GOTCHAS entry ("a render field only a test fills is""in production — every secret path is a generator expression in Nix, never a carried string").Acceptance
Next #1235 fire:
deploy-archivepasses eval and deploys;logs/guest-omeka-reconcile.loghas entries;guest-archive-keystore.log= MINTED;archive-healthyruns the real keep→serve→refuse loop (green, or red with a REAL Omeka reason — then #1213's residuals);archive-doorreaches Omeka. The truncated eval error ("Definition values:" with nothing after it) is a separate harness/adapter ticket, filed alongside.swarm-claim host=matou-dev-server-01 run=18661
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=18661
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=18661
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=18661
(automated multi-host claim — lowest live claim id works this ticket)
Built
ddc96c9b— following Ben's ruling, with two two-way scope calls (ADR 0174, veto anytime)All five ruled ports converted to per-module
clan.core.vars.generators.<slug>-secrets: archive, data-collections, whakapapa, newsletters, video. Carried*Filefields deleted from config + live set. Central pinTestPortSecretsNeverRendersAnEmptyOrLiteralEnvFileover everyportAttachersslug.go test ./internal/clan/ ./internal/provision/+go build ./...+ gofmt + golangci-lint green. GOTCHAS #174.Scope call 1 — docs-editing deferred to #1250 (not converted). The ruling asked for docs-editing "if its audit finds no producer". The audit found no producer AND no defined consumer: (a) docs-editing renders
systemd.services.coolwsd.serviceConfig.EnvironmentFile = "", but that is a systemd freeform string, nottypes.path— it evals fine when empty, so it does NOT exhibit the #1247 eval-exclusion; (b) it is not aportAttachersport (own coupled path), so the central pin does not reach it; (c) the nixpkgs collabora module exposes no admin/username/password/env option, so which env var coolwsd reads for its admin console is undefined in the repo — a needs-design decision, not a mechanical carried-string→generator conversion. Filed #1250 (needs-design) with the full contract question. Two-way: revertible, and #1250 can fold it into the pin once the contract is decided.Scope call 2 — paperless/surveys left, per your ruling. Confirmed they carry the same empty-render pattern but via
services.paperless.passwordFile/environmentFileand surveyspasswordFile/LoadCredential— health-check-coupled admin passwords, "their own pattern". Left untouched; the pin does not check those option names, so they pass trivially, and the parity guard still forces every attacher into the pin.The truncated eval-error diagnosis was #1248 (already built
5855aecf). #1235 re-armed — the next fire provesdeploy-archivepasses eval and deploys.close-report for #1247 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
after/requireson podman-omeka.service carries no readiness, so the switch dies at exit 4 #1254services.limesurvey.uploadsDir— an option nixpkgs has never had — and three more nixpkgs faults wait behind it #1318