feat: Watch Duty enrichment: WD names, app links, drop cause line (Group A) - #167
Merged
Merged
Conversation
…oup A) Adds Watch Duty (watchduty.org) as an enrichment source for WFIGS fires meshai already tracks. It never creates a fire. - env/watchduty.py: client for WD's app API, location-only one-to-one matching (default 3 km, prescribed burns skipped), match stored on the fires row. Polls only while matched fires are active or recently broadcast fires are unmatched; zero requests otherwise. Backoff on errors. An immediate lookup runs after each WFIGS New/Update emit. - Fire alerts about a matched fire use Watch Duty's name and end with the WD app link on its own line; the link is never truncated (fit_to_budget_with_suffix). Applies to incident, growth, halted and spotting alerts. - Removes the Cause/Discovered line from all fire alerts (rendering only; DB columns kept). - Migration v31: watchduty_* columns on fires (including evacuation columns for the next group) and the watchduty_reports_sent table. - Settings: environmental.watchduty (enabled, default off; tick_seconds 900) and hot adapter_config keys match_radius_km, recency_window_seconds, app_version. Evacuation alerts (Group B) and report messages (Group C) follow in separate PRs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CfJYSn4wcmPKhVb6MfSQnr
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Watch Duty enrichment for WFIGS fire alerts (Group A of 3). Watch Duty never creates a fire; its incidents are matched to fires meshai already tracks, by location only. The WFIGS name can be a placeholder like "IA 2" while Watch Duty calls the same fire "Buckhorn Fire", so name matching does not work.
environmental.watchduty.enableddefaults to false. Enabling it is a config change after deploy.Notes
app_versionis a hot setting in case they start requiring a newer client version.fires.statusis never written, and the native path never emits the all-clear, so the all-clear changes here are currently inert.Tests
2151 passed, 0 failed (baseline 2090). New: test_watchduty_helpers, test_watchduty_match, test_watchduty_adapter, test_watchduty_render. Updated: the Cause/Discovered assertions now assert absence; the ADAPTER_META count went from 23 to 24.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CfJYSn4wcmPKhVb6MfSQnr