feat(channels): include event verb in ntfy title + smtp subject #10

Merged
steve merged 1 commits from alerts-channel-event-clarity into main 2026-05-04 23:25:39 +01:00
Owner

Raise/ack/resolve looked identical on ntfy and SMTP because neither rendered the event type in the visible header. Webhook was already fine (JSON envelope has event). Now: ntfy title gets a [raised|ack|resolved · severity] prefix and a corresponding tag; SMTP subject gets the same prefix; ntfy body prepends Resolved · or Acknowledged · so the body alone is unambiguous on a phone lockscreen.

Also: cmd/_fake_alert accepts the ref as a positional arg (go run ./cmd/_fake_alert steve-001) instead of silently ignoring it.

Raise/ack/resolve looked identical on ntfy and SMTP because neither rendered the event type in the visible header. Webhook was already fine (JSON envelope has `event`). Now: ntfy title gets a `[raised|ack|resolved · severity]` prefix and a corresponding tag; SMTP subject gets the same prefix; ntfy body prepends `Resolved · ` or `Acknowledged · ` so the body alone is unambiguous on a phone lockscreen. Also: cmd/_fake_alert accepts the ref as a positional arg (`go run ./cmd/_fake_alert steve-001`) instead of silently ignoring it.
steve added 1 commit 2026-05-04 23:17:45 +01:00
feat(channels): include event verb in ntfy title + smtp subject
CI / Build (windows/amd64) (pull_request) Successful in 30s
CI / Build (linux/amd64) (pull_request) Successful in 23s
CI / Build (linux/arm64) (pull_request) Successful in 22s
CI / Lint (pull_request) Successful in 1m19s
CI / Test (linux/amd64) (pull_request) Successful in 1m42s
43e72b0d5b
Raise / ack / resolve all rendered with the same title and body on
ntfy and SMTP, so a recovery looked identical to the original alert.
Webhook was already fine because the JSON envelope carries 'event'.

ntfy:
  Title  '[raised · warning] dev backup_failed' (was '[warning] …')
  Tags   'raised,warning,backup_failed' (was 'warning,backup_failed')
  Body   'Resolved · <message>' / 'Acknowledged · <message>' on those events
SMTP:
  Subject '[restic-manager] [raised · warning] dev: backup_failed'

Plus: cmd/_fake_alert now accepts the ref as a positional argument
(go run ./cmd/_fake_alert steve-001) instead of silently ignoring
unknown positional args. Refuses ambiguous '-ref X positional Y'.
steve merged commit 1618094a26 into main 2026-05-04 23:25:39 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: steve/restic-manager#10