Snapshot radar image at alert time #85

Closed
opened 2026-07-18 05:31:45 +00:00 by claude-bot · 1 comment
Contributor

Capture the radar image when an alert fires and attach it to the alert record, so both the public page and the future Historical Explorer can show conditions at the moment, not just live radar. Missed because radar was framed as a live/on-demand view. Effort M, value Medium — but it's an enabler for #22 (you can't reconstruct history you didn't snapshot), so its value is front-loaded: the sooner it lands, the more history the explorer will have.


Filed from the 2026-07-17 codebase audit (docs/.internal/report-2026-07-17.md), finding I-15.

Capture the radar image when an alert fires and attach it to the alert record, so both the public page and the future Historical Explorer can show conditions *at the moment*, not just live radar. Missed because radar was framed as a live/on-demand view. Effort M, value Medium — but it's an enabler for #22 (you can't reconstruct history you didn't snapshot), so its value is front-loaded: the sooner it lands, the more history the explorer will have. --- _Filed from the 2026-07-17 codebase audit (`docs/.internal/report-2026-07-17.md`), finding I-15._
Author
Contributor

Done in #114 (merged). Opt-in via ALERT_RADAR_SNAPSHOT_ENABLED (default off). When on, the first time an alert fires for a location, the current radar PNG is captured (best-effort, in a tracked background task fully decoupled from dispatch — a failure just logs and leaves the columns null) and attached to the dashboard SentAlert record (radar_snapshot_path + radar_snapshot_at, migration 0027). Served via GET /media/alert-radar/{id}.png (immutable TTL, traversal-guarded) and shown as a "Radar at alert time" panel on the public alert page. Orphan snapshot files are reclaimed by the daily retention job. This front-loads history capture for the v2.0.0 Explorer (#22) — the sooner it's enabled, the more it accumulates. Assumes radar_cache_dir is a persistent volume (as the SPC cache already is).

Done in #114 (merged). Opt-in via `ALERT_RADAR_SNAPSHOT_ENABLED` (default off). When on, the first time an alert fires for a location, the current radar PNG is captured (best-effort, in a tracked background task fully decoupled from dispatch — a failure just logs and leaves the columns null) and attached to the dashboard `SentAlert` record (`radar_snapshot_path` + `radar_snapshot_at`, migration 0027). Served via `GET /media/alert-radar/{id}.png` (immutable TTL, traversal-guarded) and shown as a "Radar at alert time" panel on the public alert page. Orphan snapshot files are reclaimed by the daily retention job. This front-loads history capture for the v2.0.0 Explorer (#22) — the sooner it's enabled, the more it accumulates. Assumes `radar_cache_dir` is a persistent volume (as the SPC cache already is).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/WeatherBot#85
No description provided.