whakatohea-demo: email certificate has expired #177

Open
opened 2026-10-29 14:12:39 +00:00 by ben · 2 comments
Owner

What

communities/whakatohea-demo/status.json reports emailError: "certificate has expired" on the live Whakatōhea community.

Done when

  • Certificate renewed and the email check green
  • Renewal automated so it does not lapse again
## What `communities/whakatohea-demo/status.json` reports `emailError: "certificate has expired"` on the live Whakatōhea community. ## Done when - [ ] Certificate renewed and the email check green - [ ] Renewal automated so it does not lapse again

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime

Ruling

Category bug (kept). State → ready-for-session.

Claim verified

communities/whakatohea-demo/status.json on main reads "emailError": "certificate has expired" (build 20, updatedAt 2026-10-21T07:08:55Z). Code path: server/src/mailer.ts smtpMailer opens a nodemailer transport to SMTP_HOST and sendMails the installers-ready email; when the SMTP server's TLS certificate fails to verify, server/src/routes/build-complete.ts:63 patches the status with the error string. So this is a genuine expiry of the live mail server's TLS certificate (the notify@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)

  • Not ready-for-agent. There is nothing in the coa repo to change. mailer.ts only connects to SMTP_HOST; the certificate and its renewal live on the matou mail infrastructure (matou-infrastructure / mds), outside this checkout. Redundancy check: searched stalwart|certbot|acme|letsencrypt|fullchain|SMTP_HOST across 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.
  • Not ready-for-human. No Ben-only residue: no form-contract change, no scope/copy call, no credential minting, no security-posture widening, no data destruction. It is an operational engineering task that an interactive agent session with host standing can carry out; Ben's veto is asynchronous.
  • Not needs-info. The claim is fully specified and reproduced from the committed status.json; nothing is missing from the reporter.

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:

make resend SLUG=whakatohea-demo KIND=installers-ready

server/src/cli/resend.ts re-sends the installers-ready email and, on success, clears status.emailError (back to undefined) 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

  1. On the mail host (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 smtp or :465) that the served chain is current.
  2. Repair the renewal automation so it does not lapse again (the expiry implies an ACME/certbot renewal or reload step stopped firing) — this lives in the matou mail infra repo, not here.
  3. Prove green: make resend SLUG=whakatohea-demo KIND=installers-ready on the COA host → status.json emailError clears. (Alternatively a rebuild's callback clears it on its own send.)

Done when: cert renewed + email check green (status.json emailError gone); renewal automated. Both as filed.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime** ## Ruling Category **bug** (kept). State → **ready-for-session**. ## Claim verified `communities/whakatohea-demo/status.json` on `main` reads `"emailError": "certificate has expired"` (build 20, `updatedAt 2026-10-21T07:08:55Z`). Code path: `server/src/mailer.ts` `smtpMailer` opens a nodemailer transport to `SMTP_HOST` and `sendMail`s the installers-ready email; when the SMTP server's TLS certificate fails to verify, `server/src/routes/build-complete.ts:63` patches the status with the error string. So this is a genuine expiry of the **live mail server's** TLS certificate (the `notify@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) - **Not ready-for-agent.** There is nothing in the `coa` repo to change. `mailer.ts` only connects to `SMTP_HOST`; the certificate and its renewal live on the matou mail infrastructure (matou-infrastructure / mds), outside this checkout. Redundancy check: searched `stalwart|certbot|acme|letsencrypt|fullchain|SMTP_HOST` across 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. - **Not ready-for-human.** No Ben-only residue: no form-contract change, no scope/copy call, no credential minting, no security-posture widening, no data destruction. It is an operational engineering task that an interactive agent session with host standing can carry out; Ben's veto is asynchronous. - **Not needs-info.** The claim is fully specified and reproduced from the committed status.json; nothing is missing from the reporter. ## 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: ``` make resend SLUG=whakatohea-demo KIND=installers-ready ``` `server/src/cli/resend.ts` re-sends the installers-ready email and, on success, clears `status.emailError` (back to `undefined`) 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 1. On the mail host (`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 smtp` or `:465`) that the served chain is current. 2. Repair the renewal automation so it does not lapse again (the expiry implies an ACME/certbot renewal or reload step stopped firing) — this lives in the matou mail infra repo, not here. 3. Prove green: `make resend SLUG=whakatohea-demo KIND=installers-ready` on the COA host → `status.json` `emailError` clears. (Alternatively a rebuild's callback clears it on its own send.) **Done when:** cert renewed + email check green (status.json `emailError` gone); 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 the coa repo this session owns, and behind a door this standing session does not hold.

What I verified

  • The surface is the mail server's TLS cert, as triaged. server/src/mailer.ts smtpMailer opens a nodemailer transport to SMTP_HOST (the stalwart_mesh_ip, TLS servername mail.matou.nz) and sendMails; routes/build-complete.ts:63 recorded emailError: "certificate has expired" on build 20's success callback (status.json, updatedAt 2026-10-21T07:08:55Z). Nothing in this repo connects to anything but SMTP_HOST; the cert and its renewal are not in this checkout.
  • The fix lives in mds, not coa. The Stalwart role and its cert/ACME layout are managed by 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 is matou-infrastructure (KERI/config-server/any-sync), which carries no mail-server cert config.
  • This session has no door to the mail host. The mail droplet is a separate box (mail.matou.nz → 143.198.134.168); its SMTP ports are not reachable from here (openssl/TLS probe to :587/:465 times 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), and ssh dev@100.98.48.68 (the COA host) returns Permission denied (publickey). So I can neither renew the cert, repair the ACME/renewal automation on the mail host, nor run make resend on the COA host.

Why human (the one-way residue)

  1. Renew the expired TLS certificate on the live Stalwart mail droplet (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).
  2. Repair the renewal automation in mds so it does not lapse again (the expiry implies an ACME/certbot renew or Stalwart/Caddy reload step stopped firing) — an mds-repo change + a deploy to the live mail host, outside this repo and this session's standing. A member-facing mail-trust surface, not a coa two-way door.

Prove-green step for whoever lands it

After the cert is renewed on the mail host, on the COA host:

docker exec -w /opt/coa/src coa pnpm --filter @coa/server run resend whakatohea-demo installers-ready

server/src/cli/resend.ts re-sends and, on success, clears status.emailError and 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-session on 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 the coa standing session (coa checkout + FORGEJO_TOKEN, no mail-host door, no mds checkout), so the residue is genuinely human here. No code change in coa would move this ticket.

I did not hand-edit communities/whakatohea-demo/status.json to clear the error — that would dirty the live checkout (GOTCHAS 14) and fabricate a green that isn't real.

**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 the `coa` repo this session owns, and behind a door this standing session does not hold. ## What I verified - **The surface is the mail server's TLS cert, as triaged.** `server/src/mailer.ts` `smtpMailer` opens a nodemailer transport to `SMTP_HOST` (the `stalwart_mesh_ip`, TLS servername `mail.matou.nz`) and `sendMail`s; `routes/build-complete.ts:63` recorded `emailError: "certificate has expired"` on build 20's success callback (`status.json`, `updatedAt 2026-10-21T07:08:55Z`). Nothing in this repo connects to anything but `SMTP_HOST`; the cert and its renewal are not in this checkout. - **The fix lives in mds, not coa.** The Stalwart role and its cert/ACME layout are managed by `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 is `matou-infrastructure` (KERI/config-server/any-sync), which carries no mail-server cert config. - **This session has no door to the mail host.** The mail droplet is a separate box (`mail.matou.nz` → 143.198.134.168); its SMTP ports are not reachable from here (openssl/TLS probe to `:587`/`:465` times 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`), and `ssh dev@100.98.48.68` (the COA host) returns `Permission denied (publickey)`. So I can neither renew the cert, repair the ACME/renewal automation on the mail host, nor run `make resend` on the COA host. ## Why human (the one-way residue) 1. **Renew the expired TLS certificate on the live Stalwart mail droplet** (`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). 2. **Repair the renewal automation in mds** so it does not lapse again (the expiry implies an ACME/certbot renew or Stalwart/Caddy reload step stopped firing) — an mds-repo change + a deploy to the live mail host, outside this repo and this session's standing. A member-facing mail-trust surface, not a coa two-way door. ## Prove-green step for whoever lands it After the cert is renewed on the mail host, on the COA host: ``` docker exec -w /opt/coa/src coa pnpm --filter @coa/server run resend whakatohea-demo installers-ready ``` `server/src/cli/resend.ts` re-sends and, on success, clears `status.emailError` and 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-session` on 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 the `coa` standing session (coa checkout + `FORGEJO_TOKEN`, no mail-host door, no mds checkout), so the residue is genuinely human here. No code change in `coa` would move this ticket. I did not hand-edit `communities/whakatohea-demo/status.json` to clear the error — that would dirty the live checkout (GOTCHAS 14) and fabricate a green that isn't real.
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/coa#177
No description provided.