You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: filter alerts/sequences/slack by daily fire risk score (#583)
* feat: add risk-api client and sequence confidence helper
* feat: schedule daily risk-api refresh in app lifespan
* feat: filter alerts and sequences by risk-driven confidence threshold
* feat: skip slack alert when sequence max conf below risk threshold
* feat: query risk-api per date for from_date endpoints
* test: cover risk-driven filtering of alerts and sequences
* chore: apply ruff fixes
* fix: clamp risk-refresh hour to 0..23 to avoid retry loop
* feat: scope from_date risk lookup to caller organization, normalize fwi class casing
* chore: rename risk-api env vars to RISK_API_URL/LOGIN/PWD
* feat: add max_conf column to sequences with backfill migration
* feat: maintain sequence max_conf at ingest with atomic update
* refactor: read max_conf from sequence row instead of parsing detections
* test: seed max_conf directly on test sequences
* fix: portable max_conf bump and validate fwi thresholds in [0,1]
* feat: add risk_score query param to override fwi class on alerts endpoints
* refactor: collapse risk filter helpers into one and use literal type for risk_score
* fix: restore refresh() cache-replace on empty list and harden payload parser
* feat: push risk filter into SQL WHERE for exact pagination
* refactor: replace fwi conf settings with FWI_MIN_CONF dict in risk module
* test: pagination on /sequences/all/fromdate keeps page full when filter applies
* fix: drop max_conf clause collapse and route pagination test through override
* fix: compute sequence max_conf from primary bbox only, ignore sibling detections
* chore: apply ruff format
* fix: silence mypy on case() and chained where() over join()
* fix: annotate case() result as Any to satisfy mypy and reformat with ruff
* test: cover _seconds_until_next_utc_hour and risk_score override on /sequences/*
* chore: address risk filter review comments
* fix: satisfy mypy for risk filter queries
* test: cover risk refresh lifecycle
* test: cover sequence risk filter endpoints
* test: cover risk service http paths
* test: cover alerts/fromdate risk filter and mixed-seq alert
* test: parametrize keep-all assertion across moderate/high/very_high/extreme
* test: pin fail-open on null max_conf and unknown cameras
* test: parametrize alerts no-filter override across moderate/high/very_high/extreme
0 commit comments