notifier: alert email cannot fire on a real gateway — no contact writer, no SMTP env #369
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#369
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?
Found by the #183 rehearsal ratchet's Stage-0 exploration (spec
docs/superpowers/specs/2026-08-09-183-vps-rehearsal-ratchet-design.md). Therehearsal's alert-email leg stays a named skip until this lands.
The notifier is external SMTP by design (ADR 0106, fixed sender
notify@mail.matou.nz—internal/notify/notify.go:30), but on a freshlyfounded community it can never deliver:
SetAlertContact(
internal/monitor/monitor.go:615): founding does not seed it (the doccomment claims it does), and the dashboard client returns
notYetServed('setAlertContact')(
dashboard/src/lib/api/monitoringClient.ts:117)OURCLOUD_SMTP_*(
internal/clan/vmguest.go:185), soproductionNotifieris nil anddelivery is a silent no-op (
control-plane/cmd/control-plane/main.go:92)Ruling needed: where does a founded community's gateway get its submission
credentials for the Matou relay, and which surface writes the alert contact
(founding seed from the operator email, the dashboard, or both)?
Acceptance: given a founded community with an alert contact set, when a
CRITICAL alert raises, then the email arrives at the contact address from
notify@mail.matou.nz— proven by the rehearsal drive's alert-email legpolling a test mailbox.
Ruled (Ben, 2026-08-10) — ADR 0153; flipping ready-for-agent. Spec:
docs/superpowers/specs/2026-08-10-own-vps-carrier-design.md§4.credential, app-side config (never the repo) → sops clan var at founding →
OURCLOUD_SMTP_ADDR/_FROM/_USERNAME/_PASSWORDrendered into thecontrol-plane unit (
vmguest.go, the mail.go DKIM pattern).OURCLOUD_CLAIM_SECRETrides the SAME render — one vars pipe closesADR 0135/0136's identical gap and unblocks the #330 heartbeat.
SetAlertContact's first production caller, on the seed leg.Follow-ups to file when closing this (not in scope): per-community credential
minting (needs a Matou provisioning endpoint; amends this back to 0106's
end-state), the dashboard contact editor
(
monitoringClient.tsnotYetServed('setAlertContact')).Acceptance stands as written in the body, plus: the notifier's "resting" log
line is unreachable on a freshly founded community.
Done (own-VPS T4, ADR 0153 §4) — landed in
57ac469, on origin/main.The alert path can now fire on a founded community. The two gaps the issue named are closed:
SetAlertContactnow has a production caller. The control-plane whole composition seeds the monitor at boot fromOURCLOUD_ALERT_CONTACT_EMAIL/_NAME(whole_composition.go,productionAlertContactinmain.go) — SetAlertContact's FIRST production caller. Founding seeds it from the S2 operator contact (internal/founding/privatepath.gosetsGatewayFacts.AlertContactEmail = draft.Details.Operator.Email); an unreachable contact stays the honest count-0 (ADR 0100).internal/clan/vmguest.gorendersOURCLOUD_SMTP_ADDR/_FROM/_USERNAME/_PASSWORD+OURCLOUD_CLAIM_SECRETfrom clan-var paths ($(cat ${gen.path}), the mail.go DKIM pattern), flag-gated onGatewayFacts.SMTPSubmission/ClaimSecret. The alert contact ridesenvironment.etc+$(cat)(the kanidm-path pattern), nixEscape'd once for its Nix string.Split from the carrier (T2, #368): the loopback/private path has no external relay, so it seeds only the contact — SMTP/claim stay dormant (
productionNotifierrests at its honest no-op). The own-VPS carrier sets the flags and FEEDS the alpha credential + claim secret into theourcloud-smtp-*/ourcloud-claim-secretgenerators on its seed leg (the exported generator-name constants are the render↔feed contract).Verified: render-seam tests both paths (
internal/clan/vmguest_test.go), boot-seed tests over the whole composition (control-plane/cmd/control-plane/compose_alertcontact_test.go), and thenix evalsmoke GREEN with the contact render (the gateway machine's toplevel evaluates). Full acceptance (email arrives at the contact) is proven by the rehearsal drive's alert-email leg (T5, #368), which this unblocks.Follow-ups filed (ADR 0153, out of scope): #386 per-community credential minting, #387 the dashboard
setAlertContacteditor.