Historical Weather Event Explorer #22
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#22
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?
Target release: v2.0.0 — epic. Implementation is tracked in the child issues indexed below.
Add a historical event reconstruction system (calendar + event review) so users can pick a date and see weather activity across all locations they can access, reconstructing related products into understandable events (SPC outlook → MCDs → watches → warnings → all-clears → radar loops → delivered summaries).
Design pass (2026-07-27)
Key finding: the correlation spine already exists
SentAlert.nws_alert_idstores the VTEC-derived lifecycle id, not the raw NWS feature URN —alert_processor.py:910assignsnws_alert_id=lifecycle_id, built byalert_identity.alert_lifecycle_idasNWS_{office}_{phenomenon}_{significance}_{etn}. That same string is alreadynws_alert_snapshots.lifecycle_id,public_alert_pages.lifecycle_id, half the radar snapshot filename, and the AI summarysource_id. SPC lineage is already recorded explicitly inspc_outlook_risk_transitions.The Explorer therefore does not need an event-correlation layer built from nothing — it needs a grouping layer over keys that already line up. This removes most of the risk originally assumed in this issue.
The real problems are elsewhere
nws_alert_snapshots(full text, geometry, hazards), is only written whenPUBLIC_ALERT_PAGES_ENABLEDis on and the location ispublic_enabled. Both default off. Radar snapshots are likewise off by default. Lightning persists nothing at all. For a private location, all that survives an event today is event name, severity, headline, and times — not enough to reconstruct anything. History not captured is gone forever, so the capture issues must land first.Location.sent_alertscascadesall, delete-orphan— deleting a location destroys its entire history.Decisions taken
Child issues
Capture — land first, every day unshipped is history lost
Data integrity and retention
Correlation
weather_events)Views
Cross-cutting
Open questions — status
Originally sourced from the retired
docs/ROADMAP.md→ Under Investigation → Historical Weather Event Explorer.Engineering complete (2026-08-01)
Every child issue is closed. The full arc, as merged on
main:Foundation — capture ungated (#129–#132, earlier), unified 13-month horizon (#133), location soft-delete so deletion can't destroy history (#134, PR #169).
Correlation — rules decided and ratified (#136: cores-vs-context, 90-min gap, per-location events; manual merge/split deferred to #167), derived rebuildable
weather_eventslayer (#135, PR #168).Views — calendar (#137, PR #170), day detail with SPC risk band (#138, PR #171), event timeline with full official text, delivery record incl. failures, inline AI summaries (#139, PR #172; #23 closed as delivered), radar loop replay (#140, PR #173), JSON export (#142, PR #175).
Performance — bounded /stats, five benchmark-justified indexes, partitioning rejected with measurements on record, Postgres-tier tests (#141, PR #176; also resolved the #174 test flake at root cause).
All open questions in this epic's list are now answered on their respective issues. Remaining before this closes: cut the v2.0.0 release (changelog, tag → registry image, iac pin bump, play) and verify the Explorer against real production history. #158 (capture-table storage measurement after a convective season) stays open independently by design.
Production migration rehearsal: PASS (2026-08-21)
The 1.8.1 → 2.0.0 jump has now been exercised against real production data. Dev only ever migrated incrementally across rc1/rc2/rc3, so the combined
0033 → 0037path had been exercised nowhere — and v1.4.0 rolled back on exactly this class of gap (an empty throwaway hiding what real rows do).Method. Latest production dump (
weatherbot-20260821-033003.sql.gz, 4.6 MB) restored into a throwaway Postgres and migrated with the realweatherbot:2.0.0-rc3image. Run ondocker-hostitself, deliberately: production data includes channel credentials, so copying it to another host to test it would have created a worse problem than the one being tested. Everything created was namespacedwb-rehearsal-*and torn down on exit;weatherbot-db-1and its volume were never touched, and live production remains at0033.Result — all four migrations applied cleanly, exit code 0:
No data loss. Post-migration counts match live production exactly:
sent_alertslocationsnotification_channelsusersSchema objects verified present:
weather_events,weather_event_members,locations.deleted_at, and 22 indexes across the history tables.0037 backfill on real rows:
radar_enabled IS DISTINCT FROM radar_animatedreturns 0 rows. All 4 production channels landt/t.What this does NOT prove
Two honest limits worth recording rather than glossing:
weather_eventsfrom all retained history within 30 minutes of startup — on production that means deriving events across 1,721sent_alertsplus snapshots and lightning, on hardware also serving live alert polling. That job has only ever run against dev's much smaller history. It is the most likely source of a GA surprise now that the migrations are cleared.radar_animated=true, so no real row exercises thefalse → radar_enabled=falsecase that 0037 exists to protect. It passes only in the Postgres-tier test.Remaining before v2.0.0 final
1.8.1→2.0.0and deploy productionAlso worth noting for the record: production's history now has a 9.7-day hole (2026-08-11 to 08-20) from the outage in #186. The Explorer will render those days as "no activity", which is indistinguishable from genuinely quiet weather.