Multi-source alert fallback (NWS CAP feed) #78
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#78
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?
Single-sourcing
api.weather.govis exactly what makes F-01 dangerous. NWS also publishes alerts via a separate CAP/ATOM feed on a different host; using it as a fallback when the primary API is unreachable turns "we go blind on an outage" into "we degrade to the backup." Missed because single-source was the natural MVP. Effort M, value High — structurally de-risks the top bug in this audit.Filed from the 2026-07-17 codebase audit (
docs/.internal/report-2026-07-17.md), finding I-08.Done in #101 (merged). When the primary
/alerts/activeJSON fetch exhausts its retries, the poller falls back to the CAP ATOM feed (api.weather.gov/alerts/active.atom, parsed with stdlib ElementTree) into the sameNWSAlertobjects, gated byNWS_CAP_FALLBACK_ENABLED(default on). Best-effort: any CAP error falls through toNone, preserving the skip-cycle-on-outage semantics.⚠️ Scope caveat: the independent
alerts.weather.govCAP host was retired and now redirects toapi.weather.gov, so the fallback shares a host with the primary. It therefore guards against JSON-path-specific failures (a bad page / 5xx on that route / a parse blowup) but not a fullapi.weather.govoutage. True host-independent multi-source fallback would need a third-party CAP mirror — left as a possible follow-up rather than assuming one.