Route mail's AttachMail render on the deploy seam so PortRoutable("mail") lifts the P4-S2 gate (sibling frontier of #1418) #1420

Closed
opened 2026-09-12 05:28:03 +00:00 by matou-build-agent · 2 comments

The feature

Route mail's existing AttachMail render on provisioning's deploy seam so the P4-S2 (and founding S11) gate lifts for mail on its own — clan.PortRoutable("mail") flips to true and mail becomes a real, deployable service instead of a gated one.

Filed as the follow-up to #1418, which fixed the defect (provisioning committing a phantom clan-core mail inventory instance that broke the whole gateway node's eval preflight). #1418 added two guards so mail is now honestly refused/skipped rather than phantom-written — but it deliberately left mail gated, because routing the real render is a whole feature, not a one-liner.

Why this is not a one-line portAttachers entry

portAttachers (internal/clan/portroute.go:50) is typed for forward-auth ports whose placement is just {Node, Apex}. Mail needs more:

  1. MailLiveSet assembly (internal/clan/mail_attach.go:41-70) additionally needs IDPHost, LDAPURL, LDAPBindDN, and four clan-var secret paths (LDAPBindPassFile, DKIMKeyFile, AdminSecretFile, OIDCClientSecretFile, DBPassFile) that provisioning does not assemble today. Expect var-spec generators plus a MailLiveSet assembler in internal/provision.
  2. Mesh-only transport ports 25/465/587/993 that the gateway TCP-proxies (ADR 0115), not a front-door-only HTTP port — so it needs the co-host compose + proxy-loop wiring, not just the forward-auth route.
  3. Registration on the deploy seam so PortRoutable("mail") flips and the P4-S2 gate lifts on its own.

What "done" looks like

  • clan.PortRoutable("mail") returns true, backed by a real AttachMail render driven from a provisioning-assembled MailLiveSet (never the phantom #1418 outlawed).
  • Move mail from the gated set to the offered set in internal/provision/assess_test.go (~:523) in the same commit.
  • A mail-cohost drive leg deploys mail end to end (Stalwart + Roundcube units up), the sibling frontier named in #1418.

Provenance

Split out of #1418 ("What plugging it needs", item 2 — "The real plug"). Found while fixing the phantom-write defect on drive 20260912T045221Z.

## The feature Route mail's existing `AttachMail` render on provisioning's deploy seam so the P4-S2 (and founding S11) gate lifts for mail on its own — `clan.PortRoutable("mail")` flips to true and mail becomes a real, deployable service instead of a gated one. Filed as the follow-up to **#1418**, which fixed the *defect* (provisioning committing a phantom clan-core `mail` inventory instance that broke the whole gateway node's eval preflight). #1418 added two guards so mail is now honestly **refused/skipped** rather than phantom-written — but it deliberately left mail **gated**, because routing the real render is a whole feature, not a one-liner. ## Why this is not a one-line `portAttachers` entry `portAttachers` (`internal/clan/portroute.go:50`) is typed for **forward-auth ports** whose placement is just `{Node, Apex}`. Mail needs more: 1. **`MailLiveSet` assembly** (`internal/clan/mail_attach.go:41-70`) additionally needs `IDPHost`, `LDAPURL`, `LDAPBindDN`, and four clan-var secret paths (`LDAPBindPassFile`, `DKIMKeyFile`, `AdminSecretFile`, `OIDCClientSecretFile`, `DBPassFile`) that provisioning does not assemble today. Expect **var-spec generators** plus a **`MailLiveSet` assembler** in `internal/provision`. 2. **Mesh-only transport ports** 25/465/587/993 that the gateway TCP-proxies (ADR 0115), not a front-door-only HTTP port — so it needs the **co-host compose + proxy-loop wiring**, not just the forward-auth route. 3. **Registration on the deploy seam** so `PortRoutable("mail")` flips and the P4-S2 gate lifts on its own. ## What "done" looks like - `clan.PortRoutable("mail")` returns true, backed by a real `AttachMail` render driven from a provisioning-assembled `MailLiveSet` (never the phantom #1418 outlawed). - Move mail from the gated set to the offered set in `internal/provision/assess_test.go` (~:523) in the same commit. - A `mail-cohost` drive leg deploys mail end to end (Stalwart + Roundcube units up), the sibling frontier named in #1418. ## Provenance Split out of #1418 ("What plugging it needs", item 2 — "The real plug"). Found while fixing the phantom-write defect on drive `20260912T045221Z`.
Author
Member

This was generated by AI during triage.

Triage hygiene: adding the missing category label enhancement (routing mail's AttachMail render on the deploy seam so PortRoutable("mail") lifts the P4-S2 gate is a new deployable capability, not a bug fix). The state role needs-design is left as-is — the mail routing approach (var-spec generators + MailLiveSet assembler + the mesh-only transport co-host/proxy-loop wiring, ADR 0115) is a whole feature the ticket itself flags as needing design before an agent builds against it.

> *This was generated by AI during triage.* Triage hygiene: adding the missing **category** label `enhancement` (routing mail's `AttachMail` render on the deploy seam so `PortRoutable("mail")` lifts the P4-S2 gate is a new deployable capability, not a bug fix). The state role `needs-design` is left as-is — the mail routing approach (var-spec generators + `MailLiveSet` assembler + the mesh-only transport co-host/proxy-loop wiring, ADR 0115) is a whole feature the ticket itself flags as needing design before an agent builds against it.
Owner

Closed 2026-10-21 (Ben's ruling in the stale sweep): mail is withheld on every community for the foreseeable future (840b5d1d, 2026-09-27), so routing AttachMail on the deploy seam has no consumer. Reopen when mail's Withheld is cleared.

Closed 2026-10-21 (Ben's ruling in the stale sweep): mail is withheld on every community for the foreseeable future (840b5d1d, 2026-09-27), so routing AttachMail on the deploy seam has no consumer. Reopen when mail's Withheld is cleared.
ben 2026-10-21 20:48:30 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#1420
No description provided.