mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 17:31:34 +00:00
refactor(phase3c): migrate FIRMS fusion broadcasts to formatter+decider (#34)
Migrate the three FIRMS fire-tracker BROADCAST paths (wildfire_growth, wildfire_spotting, wildfire_halted) behind the registry, NO cutover. Attribution/pass/centroid/perimeter plumbing stays inline; legacy live path is byte-identical. - gating/firms.py decide() discriminates on handler-stamped _kind (firms_growth/firms_spotting/firms_halt) - wildfire_growth reuses formatters/fire.py (verified byte-identical: growth SELECT uses current_* columns _render doesn't read, so the wire is the movement+anchor line with "size/containment unknown" — a latent legacy quirk, reproduced exactly, NOT fixed) - formatters/firms.py renders spotting + halt wires - tier-b (flagged): the eager latch writes (fires.last_spotting_broadcast_at, fires.halt_broadcast_at) move into deferred commit closures — a dropped broadcast no longer burns the latch. Validated by gate-sequence, not golden bytes. Not-cutover live path keeps eager latches verbatim. - FIRMS broadcasts never touch event_log (eager handled=1 at pixel storage) → no event_log flip to wrap - _maybe_emit_cluster stays dead (unconditional return None) + test Deferred follow-ups (unchanged): env/firms.py native hotspot broadcast neutralization; native canonical emission. 27 new tests; fire-tracker + firms handler suites preserved; full suite at 34-failure baseline (1597 passed). 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:
parent
8bc9b14dba
commit
531bd20378
7 changed files with 896 additions and 58 deletions
|
|
@ -310,10 +310,14 @@ class TestRegistration:
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"cat", ["wildfire_hotspot", "new_ignition",
|
||||
"unattributed_hotspot_cluster", "wildfire_growth"])
|
||||
"unattributed_hotspot_cluster"])
|
||||
def test_firms_categories_not_captured(self, cat):
|
||||
# FIRMS is deferred; its categories must NOT resolve to the fire
|
||||
# formatter/decider via the "fire" toggle family fallback.
|
||||
# These native FIRMS categories remain deferred; they must NOT resolve
|
||||
# to the fire formatter/decider via the "fire" toggle family fallback.
|
||||
# (Phase-3c migrated the FIRMS FUSION categories wildfire_growth /
|
||||
# wildfire_spotting / wildfire_halted — covered in test_firms_refactor.py
|
||||
# — but growth reuses the fire FORMATTER while keeping its OWN firms
|
||||
# DECIDER, so it is intentionally not asserted here.)
|
||||
from meshai.notifications.formatters import get_formatter
|
||||
from meshai.notifications.gating import get_decider
|
||||
assert get_formatter(cat) is not fire_format
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue