whakatohea-demo: email certificate has expired #177
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
product-decision
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/coa#177
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?
What
communities/whakatohea-demo/status.jsonreportsemailError: "certificate has expired"on the live Whakatōhea community.Done when
Ruled by agent under ADR 0174 — veto anytime
Ruling
Category bug (kept). State → ready-for-session.
Claim verified
communities/whakatohea-demo/status.jsononmainreads"emailError": "certificate has expired"(build 20,updatedAt 2026-10-21T07:08:55Z). Code path:server/src/mailer.tssmtpMaileropens a nodemailer transport toSMTP_HOSTandsendMails the installers-ready email; when the SMTP server's TLS certificate fails to verify,server/src/routes/build-complete.ts:63patches the status with the error string. So this is a genuine expiry of the live mail server's TLS certificate (thenotify@mail.matou.nz/ Stalwart host the COA server sends through), surfaced on build 20's success callback — not a code defect in this repo.Why ready-for-session (not ready-for-agent, ready-for-human, or needs-info)
coarepo to change.mailer.tsonly connects toSMTP_HOST; the certificate and its renewal live on the matou mail infrastructure (matou-infrastructure / mds), outside this checkout. Redundancy check: searchedstalwart|certbot|acme|letsencrypt|fullchain|SMTP_HOSTacross the repo — the only hits are the client-side send path and host deploy secrets (docs/SECRETS_CHECKLIST.md). The AFK swarm has no standing on the mail host.Why this is a two-way door
The routing is a label change, fully revertible, and the fix itself is retryable and probe-provable (below). No irreversible step, no one-way-door trigger.
What proves it
After the cert is renewed on the mail host, run on the COA host:
server/src/cli/resend.tsre-sends the installers-ready email and, on success, clearsstatus.emailError(back toundefined) and commits/publishes the status — i.e. the "email check green" criterion. If TLS still fails it re-records the error, so the probe is self-reporting.Brief for the session
mail.matou.nz/ Stalwart), renew the expired TLS certificate the SMTP listener presents to the COA server. Confirm with a TLS probe (e.g.openssl s_client -connect <host>:<port> -starttls smtpor:465) that the served chain is current.make resend SLUG=whakatohea-demo KIND=installers-readyon the COA host →status.jsonemailErrorclears. (Alternatively a rebuild's callback clears it on its own send.)Done when: cert renewed + email check green (status.json
emailErrorgone); renewal automated. Both as filed.Ruled by agent under ADR 0002 (two-way-door doctrine) — veto anytime
Relabelling
ready-for-session→ready-for-human. This ticket's work is entirely a host operation on the live Stalwart mail droplet, in the matou-distributed-servers (mds) repo — not thecoarepo this session owns, and behind a door this standing session does not hold.What I verified
server/src/mailer.tssmtpMaileropens a nodemailer transport toSMTP_HOST(thestalwart_mesh_ip, TLS servernamemail.matou.nz) andsendMails;routes/build-complete.ts:63recordedemailError: "certificate has expired"on build 20's success callback (status.json,updatedAt 2026-10-21T07:08:55Z). Nothing in this repo connects to anything butSMTP_HOST; the cert and its renewal are not in this checkout.matou-distributed-servers(stalwart_mail_domain,stalwart_notify_app_password, the Caddy ladder). There is no mds checkout on this host (find / -name matou-distributed-servers→ none); the only infra checkout present ismatou-infrastructure(KERI/config-server/any-sync), which carries no mail-server cert config.mail.matou.nz→ 143.198.134.168); its SMTP ports are not reachable from here (openssl/TLS probe to:587/:465times out — filtered, since the COA server reaches Stalwart over the mesh, not the public IP). This session carries no private SSH key (only~/.ssh/authorized_keys), andssh dev@100.98.48.68(the COA host) returnsPermission denied (publickey). So I can neither renew the cert, repair the ACME/renewal automation on the mail host, nor runmake resendon the COA host.Why human (the one-way residue)
mail.matou.nz, 143.198.134.168) — requires host credentials/SSH this AFK session does not hold (session ssh writes to production are classifier-blocked; every prod host write in this project's history was done by Ben from the laptop).Prove-green step for whoever lands it
After the cert is renewed on the mail host, on the COA host:
server/src/cli/resend.tsre-sends and, on success, clearsstatus.emailErrorand commits/publishes the status (the "email check green" criterion). If TLS still fails it re-records the error, so the probe is self-reporting. (A later rebuild's callback would also clear it on its own send.)Note on the triage premise
Triage routed this
ready-for-sessionon the belief that "an interactive agent session with host standing can carry it out." That holds only for a session standing on the mail/COA host with the mds checkout; this is thecoastanding session (coa checkout +FORGEJO_TOKEN, no mail-host door, no mds checkout), so the residue is genuinely human here. No code change incoawould move this ticket.I did not hand-edit
communities/whakatohea-demo/status.jsonto clear the error — that would dirty the live checkout (GOTCHAS 14) and fabricate a green that isn't real.