deploy-archive: the new archive-brand oneshot reds the deploy — it curls Omeka's serve port before nginx is listening, and then exits 1 because a fresh Omeka carries no site to PATCH (DDR 0225, spec #1253) #1278
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#1278
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
Run
test-results/private-path/20260906T195212Z, legdeploy-archivered at 337s (artifacts/legs.json:35,artifacts/verdict.json→firstRedLeg: deploy-archive, commitd28c6b5c). Legs 1–5 all green; the drive died on the gateway switch:One failed unit on the box (
logs/guest-failed-units.log:2):archive-brandis the oneshot landed byrenderArchiveBrand(internal/clan/archive.go:637-711), shipped for the first time ind28c6b5c/ec2bf044and never yet driven live — its own comment (internal/clan/archive.go:698-700) records that "the exact wire is confirmed on the deferred clan-lab drive". This drive is that first contact, and it found two distinct faults.Fault 1 — no HTTP-readiness gate: the first attempt hits a closed port
The unit orders on
after = [ "omeka-reconcile.service" "podman-omeka.service" ]/requires = podman-omeka.service(internal/clan/archive.go:652-654) and then curlshttp://127.0.0.1:8086/api(internal/clan/archive.go:664,archiveServePort= 8086,internal/clan/archive.go:223, matching the publishports = [ "8086:8080" ]atinternal/clan/archive.go:379— the port constant is correct, this is not a wrong-constant slip).podman-omeka.servicebeing started is not Omeka serving. Fromlogs/guest-omeka-container.log:Started podman-omeka.service; entrypoint begins (Waiting for omeka-db:3306)Installation completed.Starting runit…→fpm is running, pid 74→ready to handle connections— nginx first listens hereThe reconciler finished at 20:16:08 (
logs/guest-omeka-reconcile.log) because it drivespodman exec omeka-s-cli, which needs no web server.archive-brandthen ran at 20:16:09, two seconds before nginx bound 8080 — hencecurl: (7) … after 0 ms, a hard connection refusal.renderOmekaReconcilealready documents and defends against exactly this asynchronous-first-boot hazard with a 100×3s readiness poll (internal/clan/archive.go:557-590).renderArchiveBrandcarries no equivalent gate for the HTTP path it depends on.Fault 2 — the site discovery finds nothing, and that is fatal
The unit was retried and its second attempt reached a live Omeka.
logs/guest-omeka-container.logrecords the request succeeding:Auth worked (200, not 403) — the minted key from
omeka-reconcileis fine (logs/guest-archive-keystore.log:MINTED size=66 lines=2). But noPATCH /api/sites/:idever follows in the nginx log, and the unit failed again at 20:16:13. That is only reachable through one branch:siteidcame back empty from…falling into
internal/clan/archive.go:702-705, whichexit 1s. That non-zero exit is what propagates toswitch-to-configurationexit 4 and reds the whole deploy.The assumption in the comment at
internal/clan/archive.go:697— "the erseco image auto-creates one on install" — is what this drive falsified.OMEKA_SITE_TITLE = "Community archive"is passed to the container (internal/clan/archive.go:388), but the install log shows onlyInstalling Omeka S via CLI… Installation completed.with no site creation, and the API confirms it at runtime.Note the asymmetry the drive exposes: the sites PATCH itself is best-effort (
|| echo "… (continuing)",internal/clan/archive.go:706-709) and theconfig:set installation_titlehalf is best-effort too (internal/clan/archive.go:677-678) — but discovering the site is fatal. So the one step DDR 0225 treats as strictly-required is the step a fresh install cannot satisfy, and a missing optional site title takes down provisioning of the whole community.Suspected layer
The deployed NixOS module rendered by
internal/clan/archive.go— product/deploy behaviour on the community's gateway. Not the rehearsal harness, not a fixture, not a selector. The go render tests (internal/clan/archive_test.go:497-560) pass, because they assert the rendered text shape (-X PATCH,/api/sites/,"o:title", the loud-key string) and cannot see either the readiness race or the empty-collection response.Refusal
I refused this heal under rule 3 (product-behaviour surface), with rule 1 also implicated:
127.0.0.1:8086changes what a deploy does (its timing and its failure mode), and changing the empty-siteidbranch changes whether a community's archive deploy succeeds and whether its public site carries the community name. That is deploy behaviour, not harness wiring.siteidbranch to best-effort like the PATCH beside it, landing only the installation title and leaving the site title for the operator hand-step DDR 0225 already contemplates, or (c) keep it fatal and make site creation part of the archive port's install. Option (b) is the small one, but it deliberately weakens what the deploy proves — the ADR 0100 loudness atinternal/clan/archive.go:702-705is there on purpose — so it needs a ruling, not a healer.A swarm worker should take fault 1 (the readiness gate, mechanical — mirror the reconciler's poll at
internal/clan/archive.go:557-590against the HTTP port, fail loud at a ceiling) and carry fault 2 to Ben for a DDR 0225 ruling before touchinginternal/clan/archive.go:702-705. Both must land together: fixing only the race leaves the deploy red at fault 2, and another paid drive is spent rediscovering it.No edits were made in the checkout; working tree is clean at
d28c6b5c.drive
20260906T195212Zred atdeploy-archive:deploy failed (clean-retry): provision: deploy gateway: clan: deploy failed on 1 node(s): gateway: clan: masked_exit on gateway: clan reported success but the log shows a real failure: the remote switevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260906T195212Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedFault 1 — LANDED (ruled by agent under ADR 0174 — veto anytime)
Commit
e5114aaeonmainadds an HTTP-readiness gate torenderArchiveBrand(internal/clan/archive.go) before the sites REST calls, mirroringrenderOmekaReconcile's proven 100×3s=300s poll pattern (#1254):%{http_code}is000on connection refusal → keep waiting; ANY real code (200/4xx/5xx) → Nginx is answering → ready. Fail loud at the 300s ceiling (ADR 0100 — a genuinely dead listener still reds the deploy, never a fabricated success).siteidbranch (archive.go:702-705left exactly as-is).Why it's a two-way door: a revertible additive readiness poll, provable by a red-first render test (
TestRenderArchive_BrandOneshotGatesOnHTTPReadiness— poll present, loud ceiling, ordered before the discovery) plus the already-drive-proven reconciler-poll precedent. No credential / security-widening / trust-surface / data-destruction / spend.Proof:
go test ./internal/clan/+go vet+gofmtgreen; rendered shell eyeballed.Fault 2 — routed to you
Why human
Ben's ruling on a DDR 0225 contract hole, plus a paid drive to prove it — both on the ADR 0174 one-way-door list (member-facing trust surface + non-routine spend).
This drive falsified the assumption at
archive.go:697("the erseco image auto-creates one on install"): a fresh Omeka install carries no site. The drive's second attempt reached a live Omeka, authed 200, andGET /api/sitescame back empty — so the strictly-required empty-siteidbranch (archive.go:702-705)exit 1s and reds the deploy. Meanwhile the sites PATCH itself and the installation-title half beside it are both best-effort — so the one step DDR 0225 treats as strictly-required is the one a fresh install cannot satisfy.DDR 0225's written contract carries
svc:archivename at both levels ("installation title + site title"), which presumes a site exists. The contract never said who creates the site — that's the hole.The options are materially different product decisions:
omeka-reconcile—POST /api/sitesonly whenGET /api/sitesis empty), so the brand oneshot's discovery always finds one and the site-title floor stays strictly-required and ADR-0100-loud. This upholds the written DDR contract (and an archive with no site is arguably not a usable public archive at all). New provisioning behaviour; the exactPOST /api/sitespayload (slug, theme) must be confirmed on the next drive.siteidbranch to best-effort like the PATCH beside it — the small change, but it deliberately weakens what the deploy proves: a community's public archive could deploy green while silently not carrying its name. That contradicts the DDR's written "site title" floor and the deliberate ADR 0100 loudness atarchive.go:702-705.I did not ship a default for fault 2: whichever way it goes, it cannot be proven without a new paid clan-lab drive (a one-way spend under ADR 0174), and (a)'s
POST /api/sitespayload is unknown until that drive — shipping a guess would just red the next paid drive rediscovering it (the exact waste to avoid). So it stops on you.Both faults must land together before the next drive: fault 1 alone leaves
deploy-archivered at fault 2. Fault 1 is already onmainso the residue is now only your ruling + one drive.Advances #1278. Relabelled
ready-for-human.Fault 2 — LANDED (ruled by agent under ADR 0174 — veto anytime)
Commit
b9f8b44bonmain: option (a) — the site-title floor stays strictly-required; the archive port ensures the community site exists. One refinement to the proposed placement: the ensure sits at the discovery point inarchive-brand, notomeka-reconcile, because REST site creation needs the admin key AND HTTP readiness — both already established there (mirroring them into reconcile duplicates two gates and breaks its cheap store-presence early-exit) — and creating WITH the branded title avoids a create-then-PATCH double write.GET /api/sites→POST /api/sitesas the minted key:{"o:title": <siteTitle>, "o:slug": "archive", "o:theme": "default", "o:is_public": true}— a PUBLIC site, branded at birth, fixed ASCII slug (no shell slugification of te reo names; deterministic/s/archive).Why the one-way-door stop dissolves: the "new paid drive" is the already-armed drive-8 loop (#1277) — Ben armed it ("push and queue") and instructed babysitting; it is local KVM on elitebook-03 and re-fires free the moment this closes. So there is no NEW spend decision, and the residue is a revertible additive provisioning change with the drive as its confirming instrument: if the create payload is wrong, the next fire reds loudly WITH the response body — exactly the falsification loop, at zero marginal cost.
Proof: red-first
TestRenderArchive_BrandOneshotEnsuresCommunitySite(POST as the admin key; public+slug+title-at-birth payload; ordered discovery → create → PATCH; loud with $resp; old branch message gone) +go test ./internal/clan//vet/gofmtgreen.Named residue for Ben's veto: an archive deployed with NO brand kit still gets no site (the ensure lives in the mkIf-gated brand oneshot). Every real founding applies a kit, so this bites nothing today; if a site-less unbranded archive is wrong product-wise, the ensure moves into
omeka-reconcilebehind its own readiness gate — say the word.Both #1278 faults are now on main together (
e5114aae+b9f8b44b). Closing — #1277 unblocks and the drive re-fires.