Guard details-link generation in richer notifiers — a link failure currently drops the alert #54
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#54
Loading…
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?
sms.py:182-186 wraps
public_alert_details_url_for_alertin try/except anddegrades to no link; discord_bot.py:88/342, matrix_bot.py:65/353,
pushover.py:86/309, webhook.py:182/573, webex.py:131/275 await it unguarded —
an exception aborts the send before any message is built, and with no retry
semantics the notification is permanently dropped for that channel. Make the
link helpers guaranteed-non-raising (they mostly are — verify the session
creation path) and add the SMS-style guard via a shared helper at each call
site. Add one failure-injection test per channel type (fits the notifier test
gap in F-29).
Acceptance criteria:
Filed from the 2026-07-17 codebase audit (
docs/.internal/report-2026-07-17.md), finding F-15.Fixed in #92 (merged to
main). Note: on investigation the details-link helper (public_alert_links.py) is already internally guarded, so this landed as defense-in-depth — every notifier call site (all six channels, includingsignalfor full parity) now wraps the call like SMS does and sends without a link on failure. Added a failure-injection regression test per channel that patches the helper to raise and asserts the message still sends.