server: installers-ready and build-failed emails (phase-3 plan Task 6) #73

Closed
opened 2026-08-31 05:20:24 +00:00 by ben · 3 comments
Owner

Plan

docs/superpowers/plans/2026-08-31-coa-phase-3.md Task 6.

Deliverable

Mailer gains sendInstallersReady({to, communityName, pageUrl, releaseUrl}) and sendBuildFailed({to, communityName, pageUrl, runUrl, error}); renderInstallersReadyEmail/renderBuildFailedEmail (subjects Your <name> app installers are ready / <name> app build failed, plan copy); SMTP + outbox implementations; outbox JSON gains kind: 'page-ready'|'installers-ready'|'build-failed'. Existing fake mailers in tests gain the two methods.

Acceptance

  • Plan tests pass verbatim; pnpm -r typecheck && pnpm -r test green.

depends_on

  • schema (Task 1)

Phase gate

Feature toggles / nav order in builds are phase 4. Never delete or rewrite anything under communities/ (ADR 0002/0003); phase 3 rewrites only kit.json, status.json, index.html. No test reaches the real network, sends real mail, dispatches a real build or provisions a real tenant.

## Plan `docs/superpowers/plans/2026-08-31-coa-phase-3.md` **Task 6**. ## Deliverable `Mailer` gains `sendInstallersReady({to, communityName, pageUrl, releaseUrl})` and `sendBuildFailed({to, communityName, pageUrl, runUrl, error})`; `renderInstallersReadyEmail`/`renderBuildFailedEmail` (subjects `Your <name> app installers are ready` / `<name> app build failed`, plan copy); SMTP + outbox implementations; outbox JSON gains `kind: 'page-ready'|'installers-ready'|'build-failed'`. Existing fake mailers in tests gain the two methods. ## Acceptance - Plan tests pass verbatim; `pnpm -r typecheck && pnpm -r test` green. ## depends_on - schema (Task 1) ## Phase gate Feature toggles / nav order in builds are phase 4. Never delete or rewrite anything under `communities/` (ADR 0002/0003); phase 3 rewrites only `kit.json`, `status.json`, `index.html`. No test reaches the real network, sends real mail, dispatches a real build or provisions a real tenant.

This was generated by AI during triage.

Ruled by agent under ADR 0174 (two-way-door doctrine) — veto anytime

Ruling: ready-for-agent. Mailer sendInstallersReady / sendBuildFailed + outbox kind field.

Why this is a two-way door: it is revertible by a later commit or label change, and provable by the tests the plan specifies — which never reach the real network, send real mail, dispatch a real build or provision a real tenant. It is not on the one-way-door list: the credential bytes, real GitHub dispatch/release and live coa-shared tenant are already carved out into the human ticket #79 and the session tickets #80/#81; env-gated defaults keep the wired code inert (noop/static, 503/unconfigured) until those land.

What proves it: appended server/test/mailer.test.ts cases writing to an outbox temp dir — no real mail; pnpm -r test green.

The ticket body is a complete agent brief (Deliverable / Acceptance / depends_on). The native Forgejo dependency links already mirror the plan's graph, so the swarm ready-list filter holds this ticket until its blockers close.

> *This was generated by AI during triage.* ## Ruled by agent under ADR 0174 (two-way-door doctrine) — veto anytime **Ruling:** `ready-for-agent`. Mailer sendInstallersReady / sendBuildFailed + outbox kind field. **Why this is a two-way door:** it is revertible by a later commit or label change, and provable by the tests the plan specifies — which never reach the real network, send real mail, dispatch a real build or provision a real tenant. It is not on the one-way-door list: the credential bytes, real GitHub dispatch/release and live coa-shared tenant are already carved out into the human ticket #79 and the session tickets #80/#81; env-gated defaults keep the wired code inert (noop/static, 503/unconfigured) until those land. **What proves it:** appended `server/test/mailer.test.ts` cases writing to an outbox temp dir — no real mail; `pnpm -r test` green. The ticket body is a complete agent brief (Deliverable / Acceptance / depends_on). The native Forgejo dependency links already mirror the plan's graph, so the swarm ready-list filter holds this ticket until its blockers close.

swarm-claim host=matou-dev-server-01 run=1256
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=1256 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #73 — status success

✅ close-report gates passed — every claim verified against main; PR #96 (#96) was already merged (a reconcile pass landed it before this close-report ran) and the merge closed this issue via closes #73.

envelope
{
  "issue": 73,
  "status": "success",
  "commits": [
    "b47df28"
  ],
  "changed_files": [
    "server/src/mailer.ts",
    "server/test/mailer.test.ts",
    "server/test/submit.test.ts",
    "server/test/resend.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "pnpm install --frozen-lockfile",
      "exit_code": 0
    },
    {
      "command": "pnpm -r typecheck",
      "exit_code": 0
    },
    {
      "command": "pnpm -r test",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Mailer gains sendInstallersReady + sendBuildFailed; SMTP + outbox implement them": "server/src/mailer.ts — Mailer interface + smtpMailer + outboxMailer all three methods (commit b47df28)",
    "renderInstallersReadyEmail / renderBuildFailedEmail with plan subjects and copy": "server/src/mailer.ts renderInstallersReadyEmail ('Your <name> app installers are ready') / renderBuildFailedEmail ('<name> app build failed')",
    "Outbox JSON gains kind: 'page-ready'|'installers-ready'|'build-failed'": "server/src/mailer.ts outboxMailer write(kind, mail) writes { kind, ...mail }; MailKind type",
    "Existing fake mailers in tests gain the two methods": "server/test/submit.test.ts + server/test/resend.test.ts fake mailers gain sendInstallersReady/sendBuildFailed no-ops",
    "Plan tests pass verbatim": "server/test/mailer.test.ts 'phase-3 emails' describe block appended verbatim; server test 43 passed",
    "pnpm -r typecheck && pnpm -r test green": "both exit_code 0"
  },
  "summary": "Mailer gained installers-ready and build-failed emails (SMTP + outbox with a kind field) per phase-3 plan Task 6.",
  "reason": "All acceptance clauses met; full workspace typecheck and test green; merged to main via PR #96.",
  "blockers": []
}
**close-report** for #73 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; PR #96 (https://git.matou.nz/Matou/coa/pulls/96) was already merged (a reconcile pass landed it before this close-report ran) and the merge closed this issue via `closes #73`. <details><summary>envelope</summary> ```json { "issue": 73, "status": "success", "commits": [ "b47df28" ], "changed_files": [ "server/src/mailer.ts", "server/test/mailer.test.ts", "server/test/submit.test.ts", "server/test/resend.test.ts", "STATUS.md" ], "tests": [ { "command": "pnpm install --frozen-lockfile", "exit_code": 0 }, { "command": "pnpm -r typecheck", "exit_code": 0 }, { "command": "pnpm -r test", "exit_code": 0 } ], "criteria": { "Mailer gains sendInstallersReady + sendBuildFailed; SMTP + outbox implement them": "server/src/mailer.ts — Mailer interface + smtpMailer + outboxMailer all three methods (commit b47df28)", "renderInstallersReadyEmail / renderBuildFailedEmail with plan subjects and copy": "server/src/mailer.ts renderInstallersReadyEmail ('Your <name> app installers are ready') / renderBuildFailedEmail ('<name> app build failed')", "Outbox JSON gains kind: 'page-ready'|'installers-ready'|'build-failed'": "server/src/mailer.ts outboxMailer write(kind, mail) writes { kind, ...mail }; MailKind type", "Existing fake mailers in tests gain the two methods": "server/test/submit.test.ts + server/test/resend.test.ts fake mailers gain sendInstallersReady/sendBuildFailed no-ops", "Plan tests pass verbatim": "server/test/mailer.test.ts 'phase-3 emails' describe block appended verbatim; server test 43 passed", "pnpm -r typecheck && pnpm -r test green": "both exit_code 0" }, "summary": "Mailer gained installers-ready and build-failed emails (SMTP + outbox with a kind field) per phase-3 plan Task 6.", "reason": "All acceptance clauses met; full workspace typecheck and test green; merged to main via PR #96.", "blockers": [] } ``` </details>
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.

Reference
Matou/coa#73
No description provided.