newsletters-healthy: Listmonk 6.1.0 refuses the port's bootstrapped admin identity — every admin API call answers 403, so the render-and-send check can never get in #1306
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#1306
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
20260907T210012Z(private path, brands target): 16/17 green, red atnewsletters-healthyafter 360s of warm-up re-probe (artifacts/legs.json,artifacts/verdict.json—firstRedLeg: newsletters-healthy, commit0fce2fe3).deploy-newslettersitself was green (873s).The fault text is the check's own summary: "Newsletters is not serving — Listmonk could not render a pānui and hand it to the community's mail service". The underlying error is the same on every single probe:
logs/guest-control-plane.log:130-165(36 warm-up attempts, 21:43:34 → 21:49:25) and:166-201(~35 further re-probes, 21:49:30 → 21:55:23). Not one probe got anything but 403.Where it fails, exactly
The check dies on its first call, before any fixture work:
newslettersServing→newslettersGet(root + "/api/health")→ non-200 → wrapped as"listmonk: the API is not answering — %w".control-plane/cmd/control-plane/newslettershealth.go:201-205— the/api/healthGET and the exact error string.control-plane/cmd/control-plane/newslettershealth.go:413-415— theHTTP %dthat carries the 403.control-plane/cmd/control-plane/newslettershealth.go:472— the auth it presents:Authorization: Basic base64(admin.User + ":" + admin.Secret()).What is NOT the cause (ruled out from the evidence)
logs/guest-resources.log:31(listmonk-6.1.0/bin/listmonk, RSS 38M, started 21:35),:35(a livepostgres: listmonk listmonk [local] idle), andlogs/guest-system-journal.log:328(listmonk[14087]: updates.go:73: new update v6.2.0 foundat 21:50:59 — it is executing its own background work while answering the check 403).logs/guest-failed-units.loglists zero failed units.NewslettersAdmin.Zero()true (newslettershealth.go:106) and the check returns thePendingFaultatnewslettershealth.go:158-163— "the Listmonk admin credential has not landed yet". That is the message the PREVIOUS drive (20260907T194850Z) carried and that0fce2fe3fixed. We are past that gate now: the resolver read a non-empty value off/run/secrets/vars/newsletters-secrets/envand Listmonk rejected it.renderPrivateRoute(internal/clan/frontdoor.go:783-793) proxies each service host withoutforward_auth— "ungated this arc (ADR 0150)".state/clan-config-snapshot→machines/gateway/front-door.nixconfirms only@idp/@admin/@portalcarry a gate, and the gate's session refusal is a 302 redirect anyway (front-door.nix, the@unauth status 401handle_response), never a bare 403. A missing route would also not produce this: an unmatched host under the wildcard vhost falls through to an empty 200, which would surface ascould not decode the reply, notHTTP 403.The suspected layer
The newsletters port's Listmonk admin-identity bootstrap / API auth mechanism. The port authenticates to Listmonk as a config-file admin over HTTP Basic, in three places that all share the one identity:
internal/clan/newsletters.go:242—"app.admin_username" = "idss-admin"as a Listmonk settings key.internal/clan/newsletters.go:238— the password ridesservices.listmonk.secretFileasLISTMONK_ADMIN_PASSWORD, minted byrenderPortSecretsEnvFile(internal/clan/portsecrets.go:74-86, key named atportsecrets.go:55).internal/clan/newsletters.go:324,331(thenewsletters-smtpreconciler) and:415,425,432(thenewsletters-brandoneshot) —curl -u "$user:$LISTMONK_ADMIN_PASSWORD".control-plane/cmd/control-plane/newslettershealth.go:472— the same Basic header from the check.Two candidate root causes, both upstream-contract questions about the pinned listmonk 6.1.0 (
guest-resources.log:31) that need a primary-source read before either is acted on (GOTCHAS #183: read the upstream's CURRENT source — the pinned nixpkgs module, the pinned app version — before ruling a carrier's mechanism; a research table's contract is a claim, the drive is the proof):(a) — most likely — password BasicAuth is no longer an API credential on this Listmonk. Modern Listmonk moved API access to API users +
Authorization: token <user>:<token>, with the interactive admin's password no longer valid on/api/*; an unauthenticated API request answers 403, which is precisely and uniformly what every probe saw, including on/api/health. Under this reading the port needs to mint and bootstrap an API token, and the health check plus both oneshots switch to token auth.(b) the
secretFileenv key never reaches Listmonk.services.listmonk.secretFileis a systemdEnvironmentFilewhose keys must be Listmonk's ownLISTMONK_<section>__<key>override convention (e.g.LISTMONK_app__admin_password).LISTMONK_ADMIN_PASSWORDmatches no section/key under that convention, so the minted password would never become the admin's password and Basic auth asidss-adminwould fail for every caller. Noteapp.addressclearly IS landing — Listmonk is reachable on the derived host at all — so the dotted-settings shape works; only the password's carrier is in question.Whichever holds, the same three call sites are wrong together, which is why this has never been proven: the
newsletters-smtpandnewsletters-brandoneshots both swallow their failures (|| exit 0atnewsletters.go:324,|| trueat:332,|| echo … (continuing)at:434), so the SMTP send path and the brand apply have been silently no-opping on every deploy. Expectnewsletters-wears-kitand the send half to be red behind this one.Which refusal rule fired
Rule 3 (product-behaviour surface as a design decision), and rule 2 as well.
newsletters-secretsgenerator, and changes how the port authenticates to its own service — the explicitly-named #1247 secrets class, not a mechanical repair. It is not a two-way door: the generator's file set is pinned byTestGeneratorFileSetsArePinnedand regenerating a generator rotates material a deployed fleet already holds.internal/clan/newsletters.go,internal/clan/portsecrets.go,control-plane/cmd/control-plane/newslettershealth.goandcontrol-plane/cmd/control-plane/main.go— four non-test files before the pins below.Pins that will need re-ruling with the fix
internal/clan/newsletters_test.go:74—LISTMONK_ADMIN_PASSWORD=/LISTMONK_SMTP_PASSWORD=in the generator.internal/clan/newsletters_test.go:127—"app.admin_username" = "idss-admin";.internal/clan/newsletters_test.go:188,192—$user:$LISTMONK_ADMIN_PASSWORDin the brand oneshot.control-plane/cmd/control-plane/adminsecret_test.go— the resolver's newsletters key.Evidence absent from this run
No
error-context.mdand no Playwright locator artifact (the red is a leg fault raised by the in-guest health probe, not a browser assertion). Nodroplet-journal.txt— this is the VM/private path (logs/qemu.log,logs/guest-unit.log), not a droplet drive.logs/state-logs.logrecordsENOENTforstate/logs.state/clan-config-snapshot(HEAD4433b3a4) predates the co-host deploys, so it carries no deployednewsletters.nixand no Caddy newsletters route — the front-door reasoning above is from the render source, not the snapshot.logs/guest-system-journal.logis a 503-line tail beginning 21:42, so it does not cover Listmonk's 21:35 startup or thenewsletters-smtp/newsletters-brandoneshot runs; capturingjournalctl -u listmonk -u newsletters-smtp -u newsletters-brandon the next newsletters drive would settle (a) vs (b) directly.drive
20260907T210012Zred atnewsletters-healthy:newsletters service is not healthy after 360s of warm-up re-probe (#556): Newsletters is not serving — Listmonk could not render a pānui and hand it to the community's mail service — this serviceevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T210012Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled + landed
8910b1bf— closing. Both candidates settled from listmonk v6.1.0 source, and BOTH were true: (a)internal/auth/auth.goMiddleware validates ANY Authorization header (Basic included) viaGetAPITokenagainst the API-user cache — a password user can never call/api/*; (b)cmd/install.gocreates the superadmin + Super Admin role only fromLISTMONK_ADMIN_USER+LISTMONK_ADMIN_PASSWORD— ourapp.admin_usernamesettings key was meaningless, so no admin existed either.LISTMONK_ADMIN_API_USERprints a random token to stderr (unusable); API tokens are stored as-is and cached at daemon start.Fix: generator mints
LISTMONK_API_TOKEN;systemd.services.listmonk.environment.LISTMONK_ADMIN_USER = idss-admin(the module's--installExecStartPre runs with the secret env loaded); an ExecStartPre appended withlib.mkAfterpsql-upserts theidss-apiAPI user (Super Admin, enabled) with the minted token — the module's ownupdate-database-config.shis the precedent — before the daemon caches API users; health check + SMTP reconciler + brand oneshot authenticatetoken idss-api:<token>. GOTCHAS #185. Pins re-ruled; clan + control-plane suites green.Two-way under ADR 0174 (drive worlds only carry this generator today) — Ben: veto anytime. Your refusal was right and the analysis was exactly the map I needed.
.idss.internalapex — can never make green #1310.idss.internalapex — can never make green #1310exit 0s into a refused connection and reports green #1357