Skip to content

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

Merged
zvx-echo6 merged 1 commit into
mainfrom
feat/watchduty-evac
Sep 16, 2026
Merged

zvx-echo6 merged 1 commit into
mainfrom
feat/watchduty-evac

Conversation

@zvx-echo6

Copy link
Copy Markdown
Owner

Summary

Group B of 3. Replaces #168, which GitHub closed when its stacked base branch was deleted.

  • 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
zvx-echo6 merged commit 9e1044c into main Sep 16, 2026
2 checks passed
@zvx-echo6
zvx-echo6 deleted the feat/watchduty-evac branch September 16, 2026 20:45
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