newsletters-healthy: the pānui send half rides the PUBLIC mail-sending preflight (port-25 egress / PTR / non-CGNAT), which the hermetic private-path drive — loopback gateway, .idss.internal apex — can never make green #1310

Closed
opened 2026-09-08 00:27:21 +00:00 by matou-build-agent · 3 comments

The failure

Drive 20260907T232822Z (drive 8, #1277, on 322e0834): 16/17 green, newsletters-healthy red after 363s.

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

artifacts/legs.json — deploy-newsletters green in 1065s; newsletters-healthy red in 363081ms. artifacts/verdict.json — firstRedLeg: newsletters-healthy, commit 322e083450fba989987a61c9d654d079c3f219b8.

The evidence: the render half is GREEN — the red is the SEND half

logs/guest-control-plane.log:130-201 — 76 probes (36 warm-up + ~40 re-probe), every single one byte-identical:

service=newsletters node=gateway attempt=1 attempts=36 verdict=failed
error="newsletters can render a pānui but the community's mail can't send yet —
       can receive, can't send reliably; nothing is silently queued to a spam
       folder (ADR 0115)"

That string is emitted at control-plane/cmd/control-plane/newslettershealth.go:324, inside newslettersSendPath. Reaching it proves the whole render loop passed: newslettershealth.go:163-189 runs Listmonk-serving → auth → ensure-list → ensure-subscriber → create-campaign → newslettersRenders in order, and newslettersSendPath is only called at newslettershealth.go:192 after all of them return nil. So #1306 (API-user token auth) and #1308 (settings.app.address mesh bind) both worked — this is a new, deeper wall, the fourth consecutive newsletters-healthy red (STATUS.md:3 records runs 13/14/15) and the first that is not mechanical.

The defect: a public-internet fact gating a hermetic drive

The send half is gated by mail.canSend() (newslettershealth.go:319, resolver at newslettershealth.go:137). Production wires that resolver at control-plane/cmd/control-plane/main.go:813-828:

adapter := newMailReadinessAdapter(apex)
Sending: func() bool { return adapter.Assess(ctx, "").SendingReady() }

SendingReady() (internal/mailreadiness/preflight.go:112) requires all three sending-preflight legs green (preflight.go:184-186): port25, ptr, cgnat. The adapter feeds them from the community apex (control-plane/cmd/control-plane/mailreadiness.go:52-60), with GatewayIP resolved from the apex's own A record (mailreadiness.go:66-80).

On this drive the apex is e2e-drive.idss.internal (state/clan-config/idss/apex). Inside the guest every *.e2e-drive.idss.internal name resolves to loopback — logs/guest-caddy.log:18 shows Caddy serving document-archive.e2e-drive.idss.internal with "remote_ip":"127.0.0.1","client_ip":"127.0.0.1". So:

  • cgnatLeg (preflight.go:237-248) calls isPublicRoutable (preflight.go:283-289), which returns false for loopback → red, unconditionally, forever.
  • ptrLeg (preflight.go:214-232) — no PTR answers to a .internal name → red.
  • the four expected records (mailreadiness.go:87-94: MX/SPF/DKIM/DMARC under the apex) do not and cannot exist in DNS for .idss.internal.

SendingReady() is false by construction on the private path. No fixture, no warm-up ceiling, no retry can flip it: making it green would need the drive's QEMU guest to hold a publicly-routable address with matching reverse DNS and open port-25 egress. newsletters-healthy is therefore unreachable as the product currently defines newsletters health — and so are the four brand services queued behind it (app/tests/e2e/provision-brands.live.spec.ts:212-293 walks the seven in order; the drive died on #3 of 7).

Note too that the drive deploys exactly one service at a time (provision-brands.live.spec.ts:281-292 removes each before the next), so the community's mail service is not deployed at all when newsletters is probed — the newsletters port's activation depends on a service that is absent by design in this drive.

Suspected layer

Not the harness. app/tests/e2e/provision-brands.live.spec.ts:238-245 asks the real health check the same question it asks the other six ports; the check answers honestly. The layer is the newsletters port's send-half contract (newslettershealth.go:311-325, wired at main.go:805-828, described at control-plane/cmd/control-plane/compose.go:637-641) — specifically, which mail fact the pānui send half should ride.

Why I refused to heal it — rules 1 and 3 both fire

Rule 1 (would weaken a check). The only in-lane way to green this leg is to drop or soften an assertion:

  • control-plane/cmd/control-plane/provision_newsletters_health_test.go:175-195 explicitly pins today's behaviour — t.Run("mail that can't send yet names the red leg…") asserts provision.StateServiceFailed (line 183) and asserts the detail NAMES the red leg (line 192). Re-classifying the mail red leg as a clan.PendingFault or a named-standing-state would require editing those t.Fatalf guards.
  • On the harness side, greening it would mean removing newsletters from BRAND_SERVICES (deleting a leg) or weakening expectBrandServiceHealthy (provision-brands.live.spec.ts:243).

Both are forbidden.

Rule 3 (product-behaviour surface, as a design decision). Changing what "newsletters is healthy" means changes what a deploy does and what a community sees at a trust moment: a service that stands active vs active-service-failed, and whether a pānui port can activate while the community's mail cannot yet deliver to the outside world. That is a one-way door with real trust content (ADR 0115's "never a silent spam-folder"), not a mechanical repair — so it is not fast-lane material either.

The ruling needed

Two coherent resolutions; a human should pick.

(a) Split the mail fact the send half rides. The pānui hand-off is Listmonk → the community's OWN Stalwart over SMTP submission. That is a local relay-accepts fact, and it is one a hermetic drive CAN provide. Public deliverability (port25 egress, ptr, cgnat — preflight.go:184-186) is about Stalwart reaching the outside world, which is the mail port's own standing state, already surfaced there under ADR 0115. Under this reading, wiring the newsletters send half to SendingReady() at main.go:821-825 is a mis-aimed dependency: newsletters would ride "the community's mail accepts the relay", and the public preflight would stay where it belongs. This keeps the AC's substance (a real send path, no silent spam-folder) and makes the leg drivable.

(b) Keep the coupling and change the drive's expectation. Accept that newsletters can only be active on a community with public mail, and give newsletters-healthy a private-path shape that asserts the render half plus the named standing state — with the honest cost that the drive then never proves the send half at all, and the deferred clan-lab smoke (with lab-dns, a real droplet, a real PTR) becomes the only place it is ever proven.

Whoever rules should also decide whether the drive's per-service isolation (provision-brands.live.spec.ts:281-292) makes any mail-dependent port drivable on the private path, since mail is never co-resident with newsletters there.

Blast radius if left

newsletters is service 3 of 7 in the brand-reach walk. Every re-drive burns a full founding + two service cycles (~28 min of the 49-min run) before rediscovering an unwinnable leg, and video, whakapapa, surveys and the remaining brand surfaces are never reached. The drive should stay blocked on this ruling rather than re-fire.

drive 20260907T232822Z red at newsletters-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 service
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260907T232822Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260907T232822Z` (drive 8, #1277, on `322e0834`): 16/17 green, `newsletters-healthy` red after 363s. ``` 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 ``` `artifacts/legs.json` — `deploy-newsletters` green in 1065s; `newsletters-healthy` red in 363081ms. `artifacts/verdict.json` — `firstRedLeg: newsletters-healthy`, `commit 322e083450fba989987a61c9d654d079c3f219b8`. ## The evidence: the render half is GREEN — the red is the SEND half `logs/guest-control-plane.log:130-201` — **76 probes** (36 warm-up + ~40 re-probe), every single one byte-identical: ``` service=newsletters node=gateway attempt=1 attempts=36 verdict=failed error="newsletters can render a pānui but the community's mail can't send yet — can receive, can't send reliably; nothing is silently queued to a spam folder (ADR 0115)" ``` That string is emitted at `control-plane/cmd/control-plane/newslettershealth.go:324`, inside `newslettersSendPath`. Reaching it **proves the whole render loop passed**: `newslettershealth.go:163-189` runs Listmonk-serving → auth → ensure-list → ensure-subscriber → create-campaign → `newslettersRenders` in order, and `newslettersSendPath` is only called at `newslettershealth.go:192` after all of them return nil. So #1306 (API-user token auth) and #1308 (`settings.app.address` mesh bind) both worked — this is a **new, deeper wall**, the fourth consecutive `newsletters-healthy` red (STATUS.md:3 records runs 13/14/15) and the first that is not mechanical. ## The defect: a public-internet fact gating a hermetic drive The send half is gated by `mail.canSend()` (`newslettershealth.go:319`, resolver at `newslettershealth.go:137`). Production wires that resolver at `control-plane/cmd/control-plane/main.go:813-828`: ```go adapter := newMailReadinessAdapter(apex) Sending: func() bool { return adapter.Assess(ctx, "").SendingReady() } ``` `SendingReady()` (`internal/mailreadiness/preflight.go:112`) requires **all three sending-preflight legs** green (`preflight.go:184-186`): `port25`, `ptr`, `cgnat`. The adapter feeds them from the community apex (`control-plane/cmd/control-plane/mailreadiness.go:52-60`), with `GatewayIP` resolved from the apex's own A record (`mailreadiness.go:66-80`). On this drive the apex is `e2e-drive.idss.internal` (`state/clan-config/idss/apex`). Inside the guest every `*.e2e-drive.idss.internal` name resolves to **loopback** — `logs/guest-caddy.log:18` shows Caddy serving `document-archive.e2e-drive.idss.internal` with `"remote_ip":"127.0.0.1","client_ip":"127.0.0.1"`. So: - `cgnatLeg` (`preflight.go:237-248`) calls `isPublicRoutable` (`preflight.go:283-289`), which returns **false for loopback** → red, unconditionally, forever. - `ptrLeg` (`preflight.go:214-232`) — no PTR answers to a `.internal` name → red. - the four expected records (`mailreadiness.go:87-94`: MX/SPF/DKIM/DMARC under the apex) do not and cannot exist in DNS for `.idss.internal`. **`SendingReady()` is false by construction on the private path.** No fixture, no warm-up ceiling, no retry can flip it: making it green would need the drive's QEMU guest to hold a publicly-routable address with matching reverse DNS and open port-25 egress. `newsletters-healthy` is therefore **unreachable as the product currently defines newsletters health** — and so are the four brand services queued behind it (`app/tests/e2e/provision-brands.live.spec.ts:212-293` walks the seven in order; the drive died on #3 of 7). Note too that the drive deploys exactly one service at a time (`provision-brands.live.spec.ts:281-292` removes each before the next), so the community's **mail service is not deployed at all** when newsletters is probed — the newsletters port's activation depends on a service that is absent by design in this drive. ## Suspected layer Not the harness. `app/tests/e2e/provision-brands.live.spec.ts:238-245` asks the real health check the same question it asks the other six ports; the check answers honestly. The layer is the **newsletters port's send-half contract** (`newslettershealth.go:311-325`, wired at `main.go:805-828`, described at `control-plane/cmd/control-plane/compose.go:637-641`) — specifically, which mail fact the pānui send half should ride. ## Why I refused to heal it — rules 1 and 3 both fire **Rule 1 (would weaken a check).** The only in-lane way to green this leg is to drop or soften an assertion: - `control-plane/cmd/control-plane/provision_newsletters_health_test.go:175-195` explicitly pins today's behaviour — `t.Run("mail that can't send yet names the red leg…")` asserts `provision.StateServiceFailed` (line 183) and asserts the detail NAMES the red leg (line 192). Re-classifying the mail red leg as a `clan.PendingFault` or a named-standing-state would require editing those `t.Fatalf` guards. - On the harness side, greening it would mean removing `newsletters` from `BRAND_SERVICES` (deleting a leg) or weakening `expectBrandServiceHealthy` (`provision-brands.live.spec.ts:243`). Both are forbidden. **Rule 3 (product-behaviour surface, as a design decision).** Changing what "newsletters is healthy" means changes what a deploy *does* and what a community *sees* at a trust moment: a service that stands `active` vs `active-service-failed`, and whether a pānui port can activate while the community's mail cannot yet deliver to the outside world. That is a one-way door with real trust content (ADR 0115's "never a silent spam-folder"), not a mechanical repair — so it is not fast-lane material either. ## The ruling needed Two coherent resolutions; a human should pick. **(a) Split the mail fact the send half rides.** The pānui hand-off is Listmonk → the community's OWN Stalwart over SMTP submission. That is a *local relay-accepts* fact, and it is one a hermetic drive CAN provide. Public deliverability (`port25` egress, `ptr`, `cgnat` — `preflight.go:184-186`) is about Stalwart reaching the outside world, which is the **mail port's own** standing state, already surfaced there under ADR 0115. Under this reading, wiring the newsletters send half to `SendingReady()` at `main.go:821-825` is a mis-aimed dependency: newsletters would ride "the community's mail accepts the relay", and the public preflight would stay where it belongs. This keeps the AC's substance (a real send path, no silent spam-folder) and makes the leg drivable. **(b) Keep the coupling and change the drive's expectation.** Accept that newsletters can only be `active` on a community with public mail, and give `newsletters-healthy` a private-path shape that asserts the render half plus the *named standing state* — with the honest cost that the drive then never proves the send half at all, and the deferred clan-lab smoke (with lab-dns, a real droplet, a real PTR) becomes the only place it is ever proven. Whoever rules should also decide whether the drive's per-service isolation (`provision-brands.live.spec.ts:281-292`) makes any mail-dependent port drivable on the private path, since mail is never co-resident with newsletters there. ## Blast radius if left `newsletters` is service 3 of 7 in the brand-reach walk. Every re-drive burns a full founding + two service cycles (~28 min of the 49-min run) before rediscovering an unwinnable leg, and `video`, `whakapapa`, `surveys` and the remaining brand surfaces are never reached. The drive should stay blocked on this ruling rather than re-fire. drive `20260907T232822Z` red at `newsletters-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 service` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T232822Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 40d79d47a9d2 -->
Owner

Design ruling needed (Ben) — flipped ready-for-human; the blocking edge on #1277 is lifted so the walk keeps firing (newsletters re-ordered second-to-last at a7292d8b; a red here re-attaches and I re-lift).

Agreed with the analysis end to end: runs 13→16 peeled three mechanical walls (#1305 credential, #1306 API-user auth, #1308 nested bind) and the render half is now proven; the send half rides mail.canSend() = the public sending preflight, which a private-path world (.idss.internal apex on loopback, mail service absent) can never satisfy. ADR 0115's refusal to call sending OK is right on the public path.

Recommendation: on the PRIVATE path (ADR 0149 apex — the S4 "Private — just testing" world, whose copy already says nothing is reachable from the internet), the newsletters check should report a NAMED standing state, not StateServiceFailed: render proven, "Pānui render proven. Sending opens when the community goes public and its mail service is deployed." — healthy for provisioning purposes (S5, not S5x), the caption carrying the honest limit. On the public path the current gate stands unchanged. Mechanically: newslettersSendPath consults whether the apex is publicly routable (the same isPublicRoutable the cgnat leg uses) before treating a red preflight as a failed health check; provision_newsletters_health_test.go:175-195 gains the private-path branch beside the public one it pins today.

Alternative if you'd rather keep health strict: the brand-reach drive asserts the render half explicitly for newsletters and accepts S5x for the send half — but that makes the DOOR leg depend on a service the product itself calls failed, which I think is the worse contract.

Veto/rule at your leisure — the walk is not waiting on this.

**Design ruling needed (Ben) — flipped `ready-for-human`; the blocking edge on #1277 is lifted so the walk keeps firing (newsletters re-ordered second-to-last at `a7292d8b`; a red here re-attaches and I re-lift).** Agreed with the analysis end to end: runs 13→16 peeled three mechanical walls (#1305 credential, #1306 API-user auth, #1308 nested bind) and the render half is now proven; the send half rides `mail.canSend()` = the public sending preflight, which a private-path world (`.idss.internal` apex on loopback, mail service absent) can never satisfy. ADR 0115's refusal to call sending OK is right on the public path. **Recommendation:** on the PRIVATE path (ADR 0149 apex — the S4 "Private — just testing" world, whose copy already says nothing is reachable from the internet), the newsletters check should report a NAMED standing state, not `StateServiceFailed`: render proven, *"Pānui render proven. Sending opens when the community goes public and its mail service is deployed."* — healthy for provisioning purposes (S5, not S5x), the caption carrying the honest limit. On the public path the current gate stands unchanged. Mechanically: `newslettersSendPath` consults whether the apex is publicly routable (the same `isPublicRoutable` the cgnat leg uses) before treating a red preflight as a failed health check; `provision_newsletters_health_test.go:175-195` gains the private-path branch beside the public one it pins today. Alternative if you'd rather keep health strict: the brand-reach drive asserts the render half explicitly for newsletters and accepts S5x for the send half — but that makes the DOOR leg depend on a service the product itself calls failed, which I think is the worse contract. Veto/rule at your leisure — the walk is not waiting on this.
Author
Member

drive 20260909T061808Z red at newsletters-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 service
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260909T061808Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

drive `20260909T061808Z` red at `newsletters-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 service` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260909T061808Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured
Owner

Ruled by Ben (in session, 2026-09-09): option (a). Landed f18d1122 + ADR 0229. The send half now reads the relay off Listmonk's own settings (smtp[0], the reconciler's write) and dials it live: no enabled relay → red (reconciler never landed); configured but nothing listens → the community has no mail service yet → render-only, ACTIVE (nothing silently queued — Listmonk retries loudly, the mail port carries its own readiness); listens → the test send must be accepted, red on refusal naming the relay. Public deliverability (port 25 / PTR / CGNAT) stays the mail port's standing state under ADR 0115 — on a rented gateway, opening port 25 remains the provider's one-time say-so. Tests re-ruled (the healer's rule-1 concern was exactly the pin Ben re-ruled). Owed: the card copy "Newsletters sends through your Mail service", and the first live proof of the relay-accepted branch on a mail-deployed drive (the minted SMTP credential must be an account Stalwart accepts).

**Ruled by Ben (in session, 2026-09-09): option (a).** Landed `f18d1122` + ADR 0229. The send half now reads the relay off Listmonk's own settings (`smtp[0]`, the reconciler's write) and dials it live: no enabled relay → red (reconciler never landed); configured but nothing listens → the community has no mail service yet → render-only, ACTIVE (nothing silently queued — Listmonk retries loudly, the mail port carries its own readiness); listens → the test send must be accepted, red on refusal naming the relay. Public deliverability (port 25 / PTR / CGNAT) stays the mail port's standing state under ADR 0115 — on a rented gateway, opening port 25 remains the provider's one-time say-so. Tests re-ruled (the healer's rule-1 concern was exactly the pin Ben re-ruled). Owed: the card copy "Newsletters sends through your Mail service", and the first live proof of the relay-accepted branch on a mail-deployed drive (the minted SMTP credential must be an account Stalwart accepts).
ben 2026-09-09 13:39:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1310
No description provided.