Skip to content

feat: Watch Duty evacuation alerts (Group B) - #168

Closed
zvx-echo6 wants to merge 1 commit into
feat/watchduty-enrichmentfrom
feat/watchduty-evac
Closed

zvx-echo6 wants to merge 1 commit into
feat/watchduty-enrichmentfrom
feat/watchduty-evac

Conversation

@zvx-echo6

Copy link
Copy Markdown
Owner

Summary

Group B of 3, stacked on #167. Adds wildfire_evac alerts from Watch Duty evacuation data for matched fires.

  • Level model: order (Level 3 or shelter in place) > warning (Level 2) > none. Level 1 advisories are ignored.
  • Broadcasts only on transitions (escalation, downgrade, lifted). A same-level zone-text edit alerts at most once an hour.
  • The first reading after a match announces an existing order; warnings seed silently.
  • Deferred commit after delivery, tombstone respected, priority severity, FirePacer, same routing as fire alerts (toggle fire).
  • Messages have a plain-text header, the zone text, and the Watch Duty link on the last line (never truncated).

Example (132 of 140 chars):

EVACUATION ORDER: Buckhorn Fire
Level 3 (Go Now) for the area in red on the county evacuation map
https://app.watchduty.org/i/119989

Notes

  • At first deploy, any matched fire already under an order is announced once (intended).
  • The Reference.tsx docs table has no row for the new category yet. The API category list picks it up automatically.

Tests

2197 passed, 0 failed (was 2151). New: test_watchduty_evac.py (45) plus one pacer test. test_dispatcher_persistence expected map now includes watchduty.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CfJYSn4wcmPKhVb6MfSQnr

New wildfire_evac alert for fires matched to a Watch Duty incident.

- Levels: order (Level 3, or shelter in place), warning (Level 2), none.
  Level 1 advisories are ignored.
- Alerts only on change: none->warning, ->order, order->warning
  (downgraded), ->none (lifted). Same-level zone text edits alert at most
  once per evac_text_update_cooldown_seconds (default 3600).
- The first reading after a match announces an existing order
  immediately; a warning or none seeds silently.
- State is committed after delivery (deferred commit), so a failed send
  retries on the next poll. Respects the tombstone mute. Priority severity,
  paced by FirePacer, routed like fire alerts (toggle "fire", lat/lon on
  the event).
- A new match from the post-alert lookup triggers an immediate poll so
  its evac state is evaluated on the next refresh.
- Messages: "EVACUATION ORDER: <name>" / "EVACUATION WARNING: <name>" /
  "Evacuation order downgraded to warning: <name>" / "Evacuations lifted:
  <name>" / "EVACUATION <LEVEL> UPDATED: <name>", then the zone text,
  then the Watch Duty link (never truncated).
- Settings: watchduty.evac_alerts_enabled (default on),
  watchduty.evac_text_update_cooldown_seconds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfJYSn4wcmPKhVb6MfSQnr
@zvx-echo6

Copy link
Copy Markdown
Owner Author

Superseded by #170. GitHub closed this PR when its base branch was deleted during the #167 merge; same commit, rebased onto main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant