mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 17:31:34 +00:00
Section 1.5 (region_routes matrix branch) armed and checked the per-region cooldown key as (toggle, category, region) with no channel-type component. _chans always inserts mesh_broadcast before meshcore_broadcast (insertion order in the per-cell append loop), so for any matched cell with BOTH mt and mc populated, the mesh_broadcast send armed the cooldown key first; the very next iteration checked that SAME key for meshcore_broadcast and saw it as freshly cooled down, dropping it every time. Net effect: meshcore_broadcast never succeeded via the matrix branch whenever cooldown_seconds > 0 (true for weather/roads/fire, all 300s), so it never armed its own dedup/cooldown state either -- a silent, permanent MC blackout for every region-routed family. Confirmed live: dispatcher_dedup had 555 rows, zero meshcore_broadcast; mesh_broadcasts_out was 120:4 MT:MC for nws_alerts and 98:8 for traffic_events over 10 days (the few MC rows that got through came from a different, non-matrix code path). fires' 98:77 near-1:1 ratio is not evidence the matrix branch worked for fire -- those MC sends are dominated by the cooldown-exempt scheduled reminder path (dispatch_scheduled_fire_broadcast); fire's own live event-driven path has the identical latent bug, just masked. Fix folds ch_type into the region string (mirrors the existing _cd_suffix convention) so mesh_broadcast and meshcore_broadcast get independent cooldown windows. Kept the cooldown key a 3-tuple (instead of widening to 4) to avoid a dispatcher_cooldowns schema migration -- _persist_cooldown() and the boot-restore SELECT are both hard-coded to (toggle, category, region). Verified in isolation (no live/deployed behavior change, no transmit): a fresh Dispatcher built from the live production config now dispatches both mesh_broadcast and meshcore_broadcast for weather/roads/fire matched cells under a 300s cooldown. Added two regression tests covering the gap that let this ship untested: no existing test combined cooldown_seconds > 0 with a cell that has BOTH mt and mc populated (test_cell_match_routes_mt_and_mc uses the cooldown_s=0 default; test_per_region_cooldown_independence uses cooldown_s=300 but with mc=None on every cell). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| adapter_config | ||
| backends | ||
| central | ||
| cli | ||
| commands | ||
| dashboard | ||
| data | ||
| env | ||
| notifications | ||
| persistence | ||
| scripts | ||
| sources | ||
| transport | ||
| __init__.py | ||
| __main__.py | ||
| alert_engine.py | ||
| central_normalizer.py | ||
| chunker.py | ||
| config.py | ||
| config_loader.py | ||
| connector.py | ||
| context.py | ||
| coverage.py | ||
| coverage_area.py | ||
| geo.py | ||
| history.py | ||
| knowledge.py | ||
| main.py | ||
| memory.py | ||
| mesh_data_store.py | ||
| mesh_health.py | ||
| mesh_models.py | ||
| mesh_reporter.py | ||
| mesh_sources.py | ||
| meshmonitor.py | ||
| responder.py | ||
| router.py | ||
| secrets_store.py | ||
| serial_ports.py | ||