deploy-whakapapa: the Gramps Web owner is never bootstrapped — grampsweb-admin swallows its own failure with || true, so whakapapa-brand 403s on every token POST and reds the switch at exit 4 #1311
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#1311
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
20260908T003210Z(targetbrands, commita7292d8b) went red atdeploy-whakapapaafter 1141s — the whakapapa port's first contact (head commita7292d8bputs newsletters second-to-last so the four untested ports get driven). All 15 prior legs green (artifacts/legs.json,artifacts/verdict.json).whakapapa-brand.serviceis the only failed unit on the box:(
logs/guest-failed-units.log)It is what killed the switch — the masked-exit classifier correctly named the remote
switch-to-configurationexit 4 as the cause and the 502/ssh as the consequence.Evidence
The unit dies in its token-acquisition loop,
internal/clan/whakapapa.go:507-519:Twice — once per clean-retry switch (01:21:41-51, 01:22:46-56).
The app is up and answering.
curlexit 22 under-fsSmeans an HTTP response ≥400 was actually received; a dead container would give exit 7 (connection refused). So Gramps Web's gunicorn is serving on127.0.0.1:8085and is rejecting the owner credentials onPOST /api/token/.Password drift is impossible.
grampsweb-admin(whakapapa.go:435) andwhakapapa-brand(whakapapa.go:487) bothEnvironmentFilethe samewhakapapa-secretsgenerator path, whose singleGRAMPSWEB_OWNER_PASSWORDis minted once (internal/clan/portsecrets.go:84-95,openssl rand -base64 24→[A-Za-z0-9+/], no shell- or systemd-hostile characters). Both units read one value.Therefore the owner account was never created, and the unit that should have created it reported success anyway:
The
|| trueswallows every failure mode, and the unit isType=oneshot+RemainAfterExit=true, so it latches active-and-successful forever. There is no readiness gate betweenpodman-grampsweb.servicereporting started (whakapapa.go:429-430—after/requiresonly, which for an oci-container unit means "podman run has been spawned", not "gunicorn is serving") and thepodman exec.The render's own comments concede this path was never verified: "The exact non-interactive CLI invocation is confirmed by the deferred clan-lab drive" (
whakapapa.go:417-419). This drive is that first contact, and it says the invocation does not work.The established precedent this port skipped
The archive port solved exactly this class at
internal/clan/archive.go:565-590: wait for the container's own CLI to answer, to a 300s ceiling, treating podman rc-125 transients as keep-waiting, then fail loud rather than fabricate success (ADR 0100, GOTCHAS #177).grampsweb-adminhas neither the wait nor the loud failure.Candidate causes the run cannot distinguish between
All are consistent with a 403 from a serving app, and the evidence does not separate them:
podman execfires before the container's entrypoint has initialised the user DB / created the tree on first start; the exec fails,|| trueeats it.gramps-web user addargument/option shape (notably whether--roletakes a name or an integer, whether--treetakes the tree nameWhakapapaor a tree id, and whether the password is read from stdin at all rather than as a positional argument or a repeated prompt) againstghcr.io/gramps-project/grampsweb@sha256:d37a3e5af…(whakapapa.go:97). The 2026-09-04 theming research (docs/research/2026-09-04-catalogue-service-theming-capability.md:179-213) documents the PUT wire from primary sources but never the user-add CLI — that half was assumed.Second defect, proven outright: the celery worker crash-loops
Independent of the 403 and definitively shown by the journal — the celery container's
environmentblock omitsGRAMPSWEB_TREE, which the app container sets atwhakapapa.go:299:(
logs/guest-system-journal.log:9-14, 61-81)The search-index and media worker has never run on this port. It never reaches
failedstate (it restarts forever), so it is invisible tosystemctl --failedand no leg catches it.Third defect: the whakapapa port harvests no evidence
The reason cause (1) cannot be told from cause (2) is that
guestCollectors(app/tests/e2e/fixtures/evidence.ts:392-497) collects per-unit journals for the files port (guest-nextcloud-setup,guest-nextcloud-brand,guest-files-oidc,guest-phpfpm) and the archive port (guest-omeka-reconcile,guest-omeka-container,guest-archive-keystore) but nothing for whakapapa — nogrampsweb-admin, nowhakapapa-brand, nopodman-grampsweb*. This is precisely the #1255 class (which addedguest-omeka-containerfor the same reason) and the #1285 class, unrepeated for a port the drive now exercises. The unscopedguest-system-journaltail only reaches back to 01:23:12 — 90 seconds after the failure — so it caught the celery loop and missed the 403 entirely.Suspected layer
internal/clan/whakapapa.go— the port's out-of-band reconciler (ADR 0062 part 2) and its celery container declaration; plusapp/tests/e2e/fixtures/evidence.tsfor the harvest gap.Proposed work
gramps-web user addinvocation against the pinned digest on a clan-lab drive (/clan-lab), the way #1255 confirmedomeka-s-cli's actual output shape against its pinned digest. Record the finding in the research doc beside the PUT wire.grampsweb-adminon readiness and make it fail loud — adopt thearchive.go:565-590shape: poll until Gramps Web's own CLI/API answers, to a ceiling, treating podman rc-125 as keep-waiting; then run the user-add and let a genuine failure red the deploy rather than latch a phantom success. Deleting the|| trueatwhakapapa.go:444is the crux: today a broken bootstrap is indistinguishable from a working one until the brand oneshot 403s 60 seconds later.GRAMPSWEB_TREEto the celery container (whakapapa.go:326-329), matching:299, and add a render/golden assertion that both containers carry it.grampsweb-admin,whakapapa-brand,podman-grampsweb/-celery/-redis— inevidence.ts:392-497, extending the frozen contract list atapp/tests/e2e/fixtures/evidence.test.ts:242-262. Without this the next drive is blind again.Why the healer refused
Rule 1 (would weaken a check). The red is a real product defect, not a harness slip: Gramps Web genuinely rejects the sign-in because the owner identity is genuinely absent. The only in-lane way to green it would be to soften the brand oneshot's token check at
whakapapa.go:516-519— the forbidden cheap green. Separately, closing the harvest gap (item 4) requires editing the frozenexpect(...).toEqual([...])collector list atevidence.test.ts:242-262, which rule 1 names explicitly.Rule 3 / not fast-lane-able. The correct fix lives in
internal/clan/whakapapa.go(product surface), and it is not a confident two-way repair: the true cause is unpinned between a readiness race and a wrong CLI invocation, and neither can be proven on this workstation — there is no container runtime, no Gramps Web image and no reachable network for the pinned digest here (artifacts/host.jsonshows local qemu VM mode,qemu-system-x86_64 ENOENTon the host path). A render test would only assert the emitted text, never that the fix repairs the red. Per the fast-lane rule, a fix I cannot test here is not a fast-lane fix.Evidence absent from the run directory
droplet-journal.txtand a top-levelerror-context.mddo not exist — expected, this drive is VM-mode (artifacts/host.jsonpayloadMode: /home/swarm/swarm/rehearsal-payload), not a droplet. Theerror-context.mdunderartifacts/provision-brands.live-bran-08f5b-…/is Playwright's spec-source listing and unrelated to this red.logs/state-logs.logrecordsENOENTforstate/logs. Noguest-grampsweb*log exists — that is defect 3 above, not a collection accident.drive
20260908T003210Zred atdeploy-whakapapa: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/20260908T003210Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled + landed
3a2645a2— closing. Cause (2) is proven fromgramps_webapi/__main__.py:user add NAME PASSWORDare positional (stdin ignored),--roleis an integer (ROLE_OWNER = 4 —owneris a click type error),--treewants a tree ID single-tree mode doesn't need, and there is nogramps-webscript (the CLI ispython3 -m gramps_webapi). Every part of the old invocation was wrong;|| truehid it.All four proposed items landed: (1) CLI contract recorded in the research doc beside the PUT wire; (2)
grampsweb-admingated onPOST /api/token/(000 wait / 200 present / else create), real invocation, re-probe, exit 1 on anything but 200 — no|| true; (3)GRAMPSWEB_TREEon the celery worker (pin counts it on both containers); (4)guest-grampswebcollector (all five units), frozen list re-pinned. GOTCHAS #187.Rules 1+3 refusal was right. Two-way under ADR 0174 — Ben: veto anytime. Next fire is the proof (and
whakapapa-healthy/whakapapa-wears-kitare first contact behind it).Ruled by agent under ADR 0174 — veto anytime.
The decision: item 1 proposed verifying the
gramps-web user addinvocation on a paid clan-lab drive. I ruled that source-verification against the pinned image's contemporary gramps-web-api substitutes for the--helpdrive here, because the drive would only confirm a fact the upstream source states precisely.The finding (decisive — this was NOT an unpinned readiness-vs-CLI question; it was a wrong CLI, four ways): verified against gramps-web-api v3.13.1 (the release nearest the deployed
grampsweb:26.5.2image's 2026-05-17 build), the render'secho "$pass" | podman exec -i grampsweb gramps-web user add "$user" --role owner --tree "$tree" || truewas wrong on every axis:gramps-webconsole script.pyproject.tomldeclares no[project.scripts]; the image's Dockerfile installs the package with no wrapper. Documented invocation ispython3 -m gramps_webapi(gramps-web-docs/install_setup/users.md).@click.argument("password", required=True)(gramps_webapi/__main__.py). Theecho | -ipipe fed a value the CLI never reads.--roleistype=int;ROLE_OWNER = 4(auth/const.py).--role owneris a click parse error.--treetakes a tree ID, not the name, and is omitted in single-tree mode.Any one fails the exec;
|| trueswallowed all four, so no owner was ever created — the 403 the drive saw was the genuine, correct rejection of a sign-in for a non-existent account.Why this is a two-way door: the fix is a revertible render change plus an evidence-harvest addition. It is proven now by the render/evidence seam tests, and the LIVE green is the next
brandsdrive's whakapapa first contact (the head-commit reorder already front-loads the four untested ports). No credential, security-posture widening, member-facing trust accept, data destruction, or non-routine spend — running the clan-lab drive would have been the spend; source-verification avoids it.What proves it:
internal/clan/whakapapa_test.go(TestRenderWhakapapa_OwnerBootstrapUsesTheRealCLI,_FailsLoud,_CeleryCarriesTheTree),app/tests/e2e/fixtures/evidence.test.ts(frozen collector contract), and the next drive'sdeploy-whakapapaleg + the three new whakapapa journals.Also fixed here: the celery worker's missing
GRAMPSWEB_TREEcrash-loop (defect 2) and the harvest blindness (defect 3). Finding recorded indocs/research/2026-09-04-catalogue-service-theming-capability.md§ 4 and GOTCHAS #187.This ticket was already fixed and closed on
mainby commit3a2645a2(fix(clan,e2e): Gramps Web owner bootstrap uses the real CLI shape …) while this run was in flight — same root cause and same fix set (realpython3 -m gramps_webapi user addCLI with positional password +--role 4, celeryGRAMPSWEB_TREE, whakapapa harvest collectors, GOTCHAS #187). No further code change is needed; releasing the swarm claim. The ADR-0174 ruling comment above stands as an independent source-verification of the CLI shape against gramps-web-api v3.13.1, corroborating the landed fix.whakapapa-wears-kitred on first contact: the brand PUT answered 200 with the applied keys, but the Gramps Web door serves the DEFAULT title *and* default palette — the frontend's read offrontend.*was never verified (the "deferred clan-lab driv… #1317