Files
mopac-pmo/inbox-work/TASK-20260829-1600-notify.md
T

31 lines
1.6 KiB
Markdown

# TASK: harness native SMS notifier — `[notify]` (alpha wiring, Redmine 522)
## Context
Charles (2026-08-29): "wire the sms ping into the go harness for alpha."
He watches Redmine/Gitea/SMS today. The bash bridge (loop-sms-watch.sh)
covers the interim; THIS replaces it natively. Runs AFTER the bootstrap
turn (gated) — build on the containerized loop.
## Scope
1. `[notify]` harness.toml section:
- smtp_host / smtp_user_ref / smtp_pass_ref / from (key refs: env:
or mpk: — keyproxy-ready per #497), rcpt = 8182807059@tmomail.net
(config, not hardcoded), min_severity (info|ok|warn).
- enabled=false default; absent section = zero behavior change.
2. Go notifier (stdlib net/smtp, STARTTLS; AUTH PLAIN/LOGIN):
- Events: turn complete (task id + title), turn failed (error class),
quota wall deferral, loop scan error, daemon start/stop.
- Message format mirrors ping-charles.sh: `[SEV MM-DD HH:MM MOPAC] ...`
- Rate limit: max N per window (config, default 20/hour) — never
SMS-flood; identical consecutive failures collapse with a counter.
- Send failures: log + queue in state (retry next event), never block
the loop; never include credential material (redaction rules).
3. Tests: fake SMTP server (table-driven): auth, STARTTLS skip option,
event mapping, rate-limit collapse, queue+retry.
4. Wire the alpha container config (notify enabled once Charles drops
SMTP creds in the env-file tonight); document in runbook.
## Deliverable
`REPORT-20260829-1600-notify.md` in `~/.coordinate/inbox-pmo/`: config
surface, event list, test results, exact env-file keys Charles fills in.