notifier: per-community SMTP submission credential minting (retire the shared-while-alpha credential) #386
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#386
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?
Follow-up filed on closing #369 (ADR 0153, spec
docs/superpowers/specs/2026-08-10-own-vps-carrier-design.md§4).#369 landed the alpha shape: ONE Matou-held submission credential, shared while alpha, fed app-side into the gateway's
ourcloud-smtp-*clan vars (render ininternal/clan/vmguest.go, gated onGatewayFacts.SMTPSubmission). That amends ADR 0106's end-state (a per-community credential).Scope: a Matou provisioning endpoint that mints a per-community submission credential at founding, which the carrier's seed leg feeds into the same clan-var pipe (the
SMTP{Addr,From,Username,Password}Generatornames are the render↔feed contract). Amends this back to ADR 0106's per-community end-state.Not blocking the rehearsal (#183): the shared credential proves the path.
Triage
Category: enhancement · State: ready-for-human
Redundancy check: searched for any existing credential-minting / provisioning-endpoint pattern (
internal/notify,control-plane/cmd/*, and the alert-path renders ininternal/clan/vmguest.go) — nothing mints a submission credential anywhere in this repo today. The only existing SMTP credential path is the single shared-while-alpha credential landed by #369 (ADR 0153), which this issue explicitly amends. Not already implemented.Prior rejection check: no
.out-of-scope/entries exist yet; this is a follow-up explicitly filed (not rejected) alongside #369's close, so it's a live, wanted piece of work — just not a scoped one yet.Design contract: this isn't a UX-flow gap (no
docs/ux/flows/wireframesreference applies — it's backend infrastructure), so the design-to-agentneeds-designgate doesn't literally apply. But the same problem exists one layer down: ADR 0153 and the own-VPS carrier design spec both name the dependency as "needs a Matou provisioning endpoint" without specifying what that endpoint is — there is no ADR or design doc ruling: what system mints the credential (a new service? an admin API on the existingmail.matou.nzplatform? something else?), what protects it (this mints live SMTP-submission secrets for Matou's shared mail infrastructure — a credential-minting surface reachable by every community's founding flow), or how the carrier's seed leg authenticates to it. No precedent for a "Matou-operated provisioning endpoint" exists anywhere else in the codebase to follow.Why this can't go to an AFK agent: two judgement calls sit ahead of any code — (1) the shape/location of the provisioning endpoint itself (which platform or service actually issues Matou-mail submission credentials, and where that code/service lives — inside this repo's control plane, or Matou's separate mail-ops tooling), and (2) the security model for a secret-minting endpoint that, if scoped wrong, lets one community mint or read another's mail credentials. Both need a ruling (likely a new ADR) before there's a spec an agent could build against. This also plausibly requires real access to Matou's operated mail infrastructure to implement and test against, which an AFK agent doesn't have.
Brief (for the human who picks this up)
Category: enhancement
Summary: Design and build a Matou-operated provisioning endpoint that mints a per-community SMTP submission credential at founding, replacing the ADR 0153 shared-while-alpha credential and restoring ADR 0106's ruled per-community end-state.
Current behavior:
One Matou-held SMTP submission credential is shared across all alpha communities (ADR 0153), fed app-side into the founding carrier's seed leg and rendered into the gateway's
OURCLOUD_SMTP_ADDR/_FROM/_USERNAME/_PASSWORDclan vars (internal/clan/vmguest.go, gated onGatewayFacts.SMTPSubmission). Any alpha community can spoof another's alert-email sender since the credential is shared. This is an accepted, centrally-revocable interim state — not a bug, but a ruled deviation from ADR 0106 with a named follow-up (this issue).Desired behavior:
At founding, the carrier's seed leg obtains a credential scoped to the one community being founded, minted by a Matou-operated endpoint, and feeds it through the same
SMTP{Addr,From,Username,Password}Generatorrender↔feed contract that already exists — sovmguest.go's render side needs no change, only the seed leg's source of the credential. The shared credential's blast radius (cross-community spoofing) is closed.Key interfaces:
SMTP{Addr,From,Username,Password}Generatorname contract between the render (vmguest.go) and whatever feeds the seed leg — this must stay intact so the render side doesn't need to change.Acceptance criteria:
Out of scope:
SetAlertContactitself.Ruled by Ben 2026-08-10: yes — proceed to ADR 0106's per-community end-state, exactly as ADR 0153's amendment clause anticipated ("per-community when a Matou provisioning endpoint exists; shared until then") — no new ADR needed, 0153's interim clause self-retires when this lands. Scope split for the swarm: the code slice is
ready-for-agent— the minting endpoint (broker service, this repo) + the carrier's seed leg feeding the minted credential into the existingSMTP{Addr,From,Username,Password}Generatorclan-var pipe (render↔feed contract unchanged), plus revocation of a community's credential at offboard. The droplet deploy leg stays human (Ben deploys to the mail droplet, as with the broker itself); the shared-while-alpha credential keeps working until the swap, and its retirement is the last step, not the first.Blocked — needs a human ruling (asked Ben in Mattermost thread
wtjyoqfo3jb8jd5rm8a7apgdco; no reply within the wait window, so parking here — a late reply resumes that same thread).The 2026-08-10 ruling scopes the code slice as "the carrier's seed leg feeding the minted credential into the existing
SMTP{Addr,From,Username,Password}clan-var pipe (render↔feed contract unchanged)". Building against the code, that pipe is only half-built and there is no working feed mechanism — so "feed into the existing pipe" needs a design decision the ruling's premise didn't cover.Findings (code as of this iteration):
internal/clan/vmguest.godereferences generatorsourcloud-smtp-*andourcloud-claim-secret($(cat ${gen.files.secret.path})), gated onGatewayFacts.SMTPSubmission/ClaimSecret.installOwnVPSdoesn't set them), and the generators are declared nowhere (no nix script, noSetVarSpec). So the shared-while-alpha credential was never actually fed into a founded community — there is no live feed to "keep working until the swap", and flippingSMTPSubmissionon today would eval-fail on undeclared generators.clan vars generate <node>with no answers (internal/clan/enrollment.go), which conflicts with a prompting-generator feed (an unsealed prompt hangs/fails headlessly).Decision needed — how should the app-held credential enter the gateway's clan vars?
brokerclientmethod — the piece named in the ruling — fully TDD'd; file a separate ticket for the carrier feed + the app-secret-into-clan-vars mechanism (its own design + lab proof against mail infra).Vars.Generate(answers)that seals them before the enrollment's node-wide generate runs (a render change — contra "render unchanged" — and a re-order of the carrier legs); no live proof this iteration.Re-arm by resolving the decision (a comment here suffices) and re-adding
ready-for-agent.Ben's ruling 2026-08-13: OPTION A — split. (Resolves the parked 2026-08-11 decision above.)
This ticket's scope shrinks to the minting side only, fully TDD'd:
brokerclientmethod that requests it at founding and holds it for the seed leg.SMTPSubmission, do not declare/feed theourcloud-smtp-*generators. The app holding the minted credential (with a test proving it survives to where the seed leg would consume it) is this ticket's finish line.The feed half is #507 — blocked by #505, which is landing the first app-held-secret→clan-var feed (claim secret, "box holds the key") and becomes the pattern to copy.
Record correction (2026-08-13, cross-session verification): the premise "feed into the existing pipe" from the 2026-08-10 ruling — and a later "the seed-leg feed already exists" reading — both traced to
internal/clan/clan.go:378's doc comment, which is #369's design INTENT, not landed code. Verified at HEAD: the render half exists, fact-gated off everywhere; no feed exists anywhere. The parked worker's findings were accurate.Re-arming ready-for-agent per the parking comment's re-arm instruction.