newsletters-healthy: Listmonk binds nixpkgs' default localhost:9000, never the mesh serve port — the render sets a flat "app.address" TOML key instead of settings.app.address #1308
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#1308
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
20260907T221610Z(targetbrands, commit8910b1bf) went red at legnewsletters-healthyafter 360s of warm-up re-probe:16 of 17 legs green;
deploy-newslettersitself was green (863907ms). The failure is not the deploy — it is that nothing is listening where the front door points.The evidence
The probe never reaches Listmonk. Every one of the 74 probe attempts is a Caddy 502, and Caddy names the cause exactly (
logs/guest-caddy.log:23through:96, 22:52:09 → 23:07:11):The control plane reports it as
listmonk: the API is not answering — HTTP 502(logs/guest-control-plane.log:130-201), raised atcontrol-plane/cmd/control-plane/newslettershealth.go:203.Listmonk is alive the whole time.
logs/guest-resources.log(captured 23:07) shows the daemon running since 22:47:and it logs from its own update checker at 23:02:43 (
logs/guest-system-journal.log:293).logs/guest-failed-units.loglists 0 failed units. So the daemon is serving — just not on 9010.The defect
internal/clan/newsletters.go:240renders the bind address as a flat, dot-containing attribute name insideservices.listmonk.settings:The nixpkgs listmonk module (
nixos/modules/services/mail/listmonk.nix) renderscfg.settingsstraight throughpkgs.formats.tomland declares its own default on the nested path:Because IDSS never assigns
settings.app.address, thatmkDefaultis never overridden. I verified the emitted TOML by runningpkgs.formats.tomlagainst the community flake's pinned nixpkgs (26.11pre1015397.173d0ad7a974, fromstate/clan-config/flake.lock) with exactly the attrset the render produces plus the module's default:A quoted TOML key
"app.address"is a single literal key, not the[app]/addresspath. Listmonk (koanf,.delimiter) flattens both into the same lookup keyapp.address, so which one wins is Go map-iteration order — nondeterministic even in the best case. On this drivelocalhost:9000won, so nothing ever bound 9010.Meanwhile the front door is pointed at 9010 by
internal/clan/portroute.go:113:with
newslettersServePort = 9010(internal/clan/newsletters.go:101). Hence the mismatch.Knock-on (same root cause, and why the journal is silent): the SMTP reconciler (
internal/clan/newsletters.go:356) and the brand oneshot (internal/clan/newsletters.go:429) both drivehttp://[::1]:9010, so both are also talking to a closed port. The reconciler swallows it —curl -sf … || exit 0atinternal/clan/newsletters.go:363— so it exits 0 and leaves no journal trace. That masking is worth a look alongside the fix.The same slip covers three more keys — and their correct home is a design call
internal/clan/newsletters.go:241-243renders"app.root_url","upload.path"and"upload.provider"the same flat way. Nesting them would not fix them: in Listmonk these are rows in thesettingstable, notconfig.tomlkeys, and the DB settings are loaded over the file config at boot — so the TOML values are inert either way. ("upload.path"is not even a Listmonk key; the DB row isupload.filesystem.upload_path.) Their honest homes are either:services.listmonk.database.settings— but that submodule'ssmtpoption has no default, so making it non-null forces the module to declare the SMTP servers that ADR 0062 part 2 deliberately reconciles imperatively; anddatabase.mutableSettings = falsewould re-run the SQL every start, fighting both thenewsletters-smtpreconciler and thenewsletters-brandoneshot (which setsapp.logo_urlthrough the API); orThat choice is the ADR 0062 part-1 (declarative) / part-2 (out-of-band reconciled) seam, which is why this needs a ruling rather than a mechanical patch.
Suspected layer
The newsletters port render seam —
internal/clan/newsletters.go,renderListmonkDaemon(lines 229-247). Product code, not harness: the drive caught a real deploy defect.Why I refused to heal it — refusal rule 1
The minimal correct fix is to emit
app.address = "[::]:9010";as a nested attribute so it overrides the module'smkDefault. The render seam test hard-codes the current, wrong form:There is no rendering of the corrected attribute path that still contains that literal, so any honest fix must edit that expectation line — refusal rule 1 (never edit an assertion/expectation line).
internal/clan/newsletters_test.go:37and:98carry the same coupling for"app.root_url"and"upload.path".Filed
confident: falsebecause (a) rule 1 fired, and (b) the root_url/upload half needs the ADR 0062 part-1/part-2 ruling described above before a worker can act.Suggested shape once ruled
internal/clan/newsletters.go:240→ renderapp.address = "[::]:9010";nested undersettings(overrides the modulemkDefault); updateinternal/clan/newsletters_test.go:41to prove the nested path, ideally asserting it is the path nixpkgs reads rather than a bare substring.app.root_url/upload.*per the ruling; updateinternal/clan/newsletters_test.go:37,98to match.|| exit 0mask atinternal/clan/newsletters.go:363so a closed serve port reds the reconciler instead of exiting 0 silently.docs/GOTCHAS.mdentry: a dotted attribute name inside apkgs.formats.tomlsettings attrset is a literal key, never a table path — it silently loses to the module's ownmkDefault.drive
20260907T221610Zred 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/20260907T221610Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled + landed
322e0834— closing. Your TOML proof was exact. Ruling on the ADR 0062 seam: only real config.toml keys live inservices.listmonk.settings, on their NESTED paths (app.address = "[::]:9010"overrides the module's mkDefault; the quoted flat form is now forbidden by the render pin).app.root_url/upload.provider/upload.filesystem.upload_pathare DB rows → they ride the imperativenewsletters-smtpsettings reconciler's GET→jq-merge→PUT (the part-2 lane the brand oneshot already shares) — notdatabase.settings, for exactly the reasons you gave. GOTCHAS #186. Pins re-ruled (newsletters_test + newsletters_attach_test); clan + control-plane suites green.Rule-1 refusal was right. Two-way under ADR 0174 — Ben: veto anytime.
.idss.internalapex — can never make green #1310.idss.internalapex — can never make green #1310