feat(ipaws): add FEMA IPAWS-OPEN civil-alert adapter (disabled by default) (#138)

Adds a new native `ipaws` adapter for FEMA IPAWS-OPEN EAS civil alerts.

- Two-stage CAP fetch via base_url (direct FEMA or Conduit proxy): Atom
  index -> per-entry CAP 1.2 documents.
- Non-weather civil alerts only (evacuation, Civil Emergency Message,
  AMBER, 911 outage, law-enforcement, HazMat); NWS/NOAA CAP dropped so
  weather is never double-broadcast.
- Idaho + neighbour statefips scope gate applied before stage-2 fetch.
- Own `ipaws_alerts` dedup table (migration v29); reuses the NWS CAP
  severity + formatter pattern.
- Ships enabled=False (no transmit until explicitly enabled).

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
malice 2026-07-16 09:05:01 -06:00 committed by GitHub
commit bbe97398bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1367 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
<?xml version='1.0' encoding='UTF-8'?><alert xmlns="urn:oasis:names:tc:emergency:cap:1.2"><identifier>NWS-IDAHO-SYNTH-0001</identifier><sender>w-nws.webmaster@noaa.gov</sender><sent>2026-07-16T04:00:00-06:00</sent><status>Actual</status><msgType>Alert</msgType><scope>Public</scope><info><language>en-US</language><category>Met</category><event>Severe Thunderstorm Warning</event><urgency>Immediate</urgency><severity>Severe</severity><certainty>Observed</certainty><eventCode><valueName>SAME</valueName><value>SVR</value></eventCode><expires>2026-07-16T05:00:00-06:00</expires><headline>Severe Thunderstorm Warning for Ada County</headline><description>The National Weather Service has issued a severe thunderstorm warning.</description><area><areaDesc>Ada County</areaDesc><geocode><valueName>SAME</valueName><value>016001</value></geocode></area></info></alert>

1
work/tests/fixtures/ipaws/feed.xml vendored Normal file
View file

@ -0,0 +1 @@
<?xml version='1.0' encoding='UTF-8'?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">IPAWS EAS FEED</title><updated>2026-07-16T05:09:57.311Z</updated><id>https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/feed</id><entry><title type="text">CEM</title><link href="https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/eas/300130859542"/><id>https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/eas/300130859542</id><updated>2026-07-16T04:54:44.000Z</updated><category term="16" label="statefips"/><category term="CEM" label="event"/></entry><entry><title type="text">EVI</title><link href="https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/eas/300130856756"/><id>https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/eas/300130856756</id><updated>2026-07-16T03:00:00.000Z</updated><category term="41" label="statefips"/><category term="EVI" label="event"/></entry><entry><title type="text">CEM</title><link href="https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/eas/999999999999"/><id>https://apps.fema.gov/IPAWSOPEN_EAS_SERVICE/rest/eas/999999999999</id><updated>2026-07-16T02:00:00.000Z</updated><category term="06" label="statefips"/><category term="CEM" label="event"/></entry></feed>