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
@@ -976,7 +976,11 @@ def _run_decision(ctx: dict) -> dict:
# directly on the Firestore call doc). Fall back to the call doc so that
# dispatch-channel strictness works regardless of how the call arrived.
effective_talkgroup_name = talkgroup_name or call_doc.get("talkgroup_name")
is_dispatch = _is_dispatch_channel(effective_talkgroup_name)
# server-26#134: always dispatch-strict now, not name-guessed — a
# channel labeled "tac"/"tactical" is rare and no less scrutinized in
# practice than any other. _call_fits_incident's tactical branch is
# kept, unreached, in case that's ever wrong.
is_dispatch = True
if effective_talkgroup_name != talkgroup_name:
logger.info(
f"Correlator: talkgroup_name missing from request for call {call_id}, "