Skip to content

Fix AI summary fire-status gap and NIFC perimeter sync#104

Merged
d3mocide merged 1 commit into
mainfrom
claude/agent-gap-analysis-info-6tajap
Jun 10, 2026
Merged

Fix AI summary fire-status gap and NIFC perimeter sync#104
d3mocide merged 1 commit into
mainfrom
claude/agent-gap-analysis-info-6tajap

Conversation

@d3mocide

@d3mocide d3mocide commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Problem

The AI situational summary reported a fire STATUS GAP ("Current fire status data is unavailable") while the dashboard's Fire/Smoke Status card was simultaneously showing an active local fire alert (Haystack Butte) and a regional smoke watch.

Root cause: the UI card and the AI summary read from two completely separate pipelines. The card is fed by EONET fire_incident entities (entity:fire:*), but the summary only read feed:fire:perimeters from the NIFC poller — a key that is never written unless NIFC has successfully returned at least one perimeter since Redis last started.

Changes

poller/pollers/summary.py

  • Adds a Wildfire Incident Tracker section to the LLM context built from entity:fire:* entities — the same data the UI card shows (name, local-alert vs regional-watch relevance, distance, last update), sorted local-first.
  • Adds Smoke / Air Quality (AirNow AQI from feed:weather:current).
  • Splits the NIFC perimeter section into three explicit states: perimeters listed, confirmed zero perimeters, or feed never synced (with instruction to rely on the incident tracker).

poller/pollers/nifc.py

  • Writes an empty FeatureCollection on a successful zero-result query, so consumers can distinguish "no perimeters" from a dead feed.
  • Fixes the targeted name query: entity names are now uppercased before stripping WILDFIRE/ FIRE suffixes. Previously the case-sensitive replace did nothing on EONET title-case names, so the query searched for 'HAYSTACK BUTTE WILDFIRE' and never matched NIFC's IncidentName of Haystack Butte.
  • Treats ArcGIS soft errors (HTTP 200 with an error body) as fetch failures instead of silently empty results.
  • Escapes single quotes in incident names in the where clause; narrows a bare except.

Validation

  • python3 -m py_compile passes on both modified files.
  • NIFC ArcGIS endpoint could not be hit live from this sandbox (network allowlist); name-matching fix verified against the query construction logic.

https://claude.ai/code/session_01Tjq6r9HYsYY4g4BbUTQefG


Generated by Claude Code

The AI summary only read feed:fire:perimeters (NIFC), never the EONET
fire entities that drive the UI fire card, so it reported a fire status
gap while the dashboard showed active incidents.

- summary: include entity:fire:* incidents (relevance, distance, last
  update) and AirNow AQI in the LLM context; label the NIFC perimeter
  feed as confirmed-empty vs never-synced
- nifc: write an empty FeatureCollection on a successful zero-result
  query so consumers can distinguish no perimeters from a dead feed
- nifc: uppercase entity names before stripping Wildfire/Fire suffixes
  so the targeted IncidentName query actually matches NIFC records
- nifc: surface ArcGIS soft errors (HTTP 200 + error body) as fetch
  failures, escape quotes in the name query, narrow bare except

https://claude.ai/code/session_01Tjq6r9HYsYY4g4BbUTQefG
@d3mocide d3mocide marked this pull request as ready for review June 10, 2026 00:40
@d3mocide d3mocide merged commit e86af03 into main Jun 10, 2026
6 checks passed
@d3mocide d3mocide deleted the claude/agent-gap-analysis-info-6tajap branch June 13, 2026 17:30
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.

2 participants