correlator: always run the dispatch-strict fit test, not name-guessed (#134)

is_dispatch was computed from _is_dispatch_channel(talkgroup_name) and picked between two _call_fits_incident evaluation orders: dispatch (requires a positive signal, runs location-conflict/content-divergence vetoes on unit overlap) vs tactical (skips both vetoes, defaults to True on no signal at all within 20 min). Per #133's reasoning, a name not literally containing dispatch/patched/primary got the unvetoed, default-True path solely because of its label. Hardcoded is_dispatch=True at its one real call site; the tactical branch and its own tests stay in place, unreached.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix
This commit is contained in:
Logan Cusano
2026-09-13 14:38:57 -04:00
co-authored by Claude Sonnet 5
parent 4df801c5e0
commit 0473e6a583
3 changed files with 23 additions and 7 deletions
@@ -153,12 +153,22 @@ def test_thin_call_with_no_overlap_does_not_attach_on_a_tactical_channel():
assert decision["action"] == "orphan"
def test_tactical_thin_call_still_attaches_inside_its_own_window():
"""Bounded, not removed — a "10-4" on a working channel is still context."""
def test_tactical_named_channel_uses_the_dispatch_window_now():
"""server-26#134: is_dispatch is hardcoded True — a channel's name no
longer changes the thin window. 14 min (the old tactical bound minus 1,
inside the old 15-min window) is now past the 5-min dispatch window."""
inc = _incident(idle_minutes=settings.tg_thin_idle_minutes - 1)
decision = _run_decision(_ctx(
all_active=[inc], recent=[inc], talkgroup_name=TACTICAL_TG,
))
assert decision["action"] == "orphan"
def test_tactical_named_channel_still_attaches_inside_the_dispatch_window():
inc = _incident(idle_minutes=settings.tg_dispatch_thin_idle_minutes - 1)
decision = _run_decision(_ctx(
all_active=[inc], recent=[inc], talkgroup_name=TACTICAL_TG,
))
assert decision["action"] == "link"
assert decision["corr_debug"]["corr_path"] == "fast/thin"