feat(notifications): email REQUESTED recipients immediately (per-job opt-in), v2 #37

Merged
KofTwentyTwo merged 2 commits from feature/notify-email-requested-v2 into develop 2026-10-14 23:51:04 +00:00
KofTwentyTwo commented 2026-10-14 23:48:43 +00:00 (Migrated from github.com)

Supersedes #22 (feature/notify-email-requested), which was green but now conflicts with develop after #31-#36. This branch merges #22 into current develop (no rebase) and resolves the conflicts.

What it does

  • Recipient email status REQUESTED (per-notification, e.g. per-job opt-in): emailed immediately without a standing category preference.
  • Skipped when no address is known; never emailed for ALERT notifications; eligible for one day after delivery.

Reconciliation with develop

  • develop's emailer now pages recipients by id and applies user pause; the REQUESTED path is folded into that loop rather than the old single-query version.
  • REQUESTED email honours the user's notification preferences: the category email minimum severity (when a preference row exists), pause (SECURITY bypasses), and quiet hours (held as REQUESTED, CRITICAL bypasses, via AlertTiming.isQuiet). Digest/immediate modes no longer override severity for a request.
  • No schema change, so no new changeset and no H2/Postgres concern (alerts.changelog.sql untouched).
  • Tests updated/added: min severity, pause and quiet-hours holds, SECURITY pause bypass.

./mvnw verify is green locally (224+ tests including Testcontainers).

🤖 Generated with Claude Code

Supersedes #22 (`feature/notify-email-requested`), which was green but now conflicts with develop after #31-#36. This branch merges #22 into current develop (no rebase) and resolves the conflicts. ## What it does - Recipient email status `REQUESTED` (per-notification, e.g. per-job opt-in): emailed immediately without a standing category preference. - Skipped when no address is known; never emailed for ALERT notifications; eligible for one day after delivery. ## Reconciliation with develop - develop's emailer now pages recipients by id and applies user pause; the REQUESTED path is folded into that loop rather than the old single-query version. - REQUESTED email honours the user's notification preferences: the category email minimum severity (when a preference row exists), pause (SECURITY bypasses), and quiet hours (held as REQUESTED, CRITICAL bypasses, via `AlertTiming.isQuiet`). Digest/immediate modes no longer override severity for a request. - No schema change, so no new changeset and no H2/Postgres concern (`alerts.changelog.sql` untouched). - Tests updated/added: min severity, pause and quiet-hours holds, SECURITY pause bypass. `./mvnw verify` is green locally (224+ tests including Testcontainers). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.