_call_fits_incident still uses signed idle, so the sweep path skips both over-merge vetoes on back-dated calls #74
Closed
opened 2026-08-25 21:30:50 -04:00 by logan
·
2 comments
No Branch/Tag Specified
Labels
Clear labels
area/ai-pipeline
area/auth
area/billing
area/correlation
area/discord
area/frontend
area/governance
area/growth
area/infra-deploy
area/legal
area/map
area/mqtt
area/node-ota
area/osint
area/recording-audio
area/sdr-radio
area/transcription
board
board:agenda
minutes:draft
minutes:final
role:ceo
role:cfo
role:cio
role:ciso
role:cmo
role:coo
role:cto
Scene/entity extraction, summarizer, AI providers, embeddings
AuthN/Z, roles, tenancy/org scoping, API keys, credentials
Plans, entitlements, AI spend accounting and caps
Incident correlation, linking, lifecycle, severity, corr_debug
Discord bot, radio bots, voice streams, bot tokens, webhooks
Web UI: Next.js app and the edge-node local dashboard
Board process, minutes, unattended runner, agent tooling
Go-to-market, outreach, cold email, discovery conversations
CI/CD, VM, registry, Firestore rules/indexes deploy, Terraform/Caddy
ToS, retention, licences/DAAs, CAN-SPAM, E&O, name suppression
Live map: pins, paths, tiles, legend, geocoding
Node-C2 MQTT, checkins, commands, node sweeper, dynsec
Node install, enrollment, OTA updater, image skew
External feeds: cameras, 511, ADS-B, AIS, outages, and their licences
Call capture, boundaries, PulseAudio, ring buffer, trimming, attribution
OP25 decode, SDR hardware/tuning, conventional, second SDR, mesh radio
STT, transcript correction, place verification, name accuracy
Board process: minutes and board-filed items
Needs board scoping at the next sitting; CEO removes the label once scoped
One exec pre-read, closed by CEO
CEO ruling; open until enacted
Filed by the CEO
Filed by the CFO
Filed by the CIO
Filed by the CISO
Filed by the CMO
Filed by the COO
Filed by the CTO
kind
behavior-bug
Wrong product behavior; the instrument reads it correctly
kind
measurement-bug
Corrupts the recording/instrument (debug data, evals, health checks), not behavior
priority
p0
Drop everything: prod broken, live exposure, or owner-ruled P0
priority
p1
Next up: blocks a gate, a customer, or core incident quality
priority
p2
Normal: real defect or planned work, schedule in turn
priority
p3
Low: minor, cosmetic, or someday
status
blocked
Waiting on an external party, spend, or another issue
status
in-progress
Branch or PR open against it
status
needs-decision
Waiting on an owner or board ruling before work
status
needs-info
Root cause or repro unknown; needs a reading first
type
bug
Something built is wrong: code, data, or a measurement
type
chore
Maintenance, refactor, tests, pinning, cleanup: no user-visible change
type
decision
A ruling to make or record: board minutes, owner calls, legal reviews
type
docs
Docs, runbooks, CLAUDE.md, skills, SOPs
type
feature
New capability or an extension of an existing one
type
security
Security, privacy, credential or tenant-isolation exposure
type
tracking
Tracker, checklist, initiative or punch-list spanning several changes
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: logan/server-26#74
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the standing correlation pass on the 2026-08-25 evening unattended run. Static review only — not yet observed in production data.
The defect
_call_fits_incident(app/internal/incident_correlator.py:1601) still computes idle with the signed_incident_idle_minutes. Commit33a247dmoved every correlation gate onto_idle_gate_minutes(:478), which is distance-based and cannot go negative._call_fits_incidentwas missed.Why the sign matters
recorrelation_sweep.py:104anchorsnowto the call's ownstarted_at, not wall clock. A back-dated call therefore seesidle_min < 0, and every comparison of the formidle_min >= Nis silently false::1620— skipped:1632(idle_min >= 15) — skipped:1719(idle_min < 20.0) — always trueFailure scenario
An orphaned call from 02:46 is swept against an incident last updated 02:50. Unit overlap fires. With no location proxy and both divergence vetoes bypassed, the call links unconditionally — one incident absorbing unrelated traffic on the same talkgroup. This is the over-merge mechanism, reachable on precisely the one code path that can produce a negative idle.
Why this is not #22
Closed #22 added the fit check itself. This is a sign bug inside that check, introduced later by the
33a247dgate refactor, and it defeats the check on the sweep path only.Test gap
test_idle_gate_uses_distance_not_signcovers the gates._call_fits_incidenthas no equivalent coverage. A regression test should sweep a back-dated call against a newer incident and assert the divergence vetoes still fire.Note on shipping this
incident_correlator.pyis one of the four files board minutes #62 decision 9 froze for autonomous push tomainuntil the deploy rollback (#65) lands. Fix on a branch, or wait for #65.Refs #22, #27, #65, #62.
Still open — confirmed half-fixed by the standing correlation pass, unattended run 2026-08-27. Do not close.
_call_fits_incident(incident_correlator.py:1601) still reads the signed_incident_idle_minutesrather than the_idle_gate_minuteshelper written for exactly this case (:478-493).Every gate inside that function consumes the signed value:
idle_min >= 15content-divergence vetoes (:1622,:1633)idle_min < 20.0 -> tactical_default(:1720)On the re-correlation sweep,
nowis anchored to the call's ownstarted_at, soidle_mingoes negative. Both divergence vetoes are therefore skipped,unit_overlapreturns True unconditionally, and tactical channels link by default.Direction: this pushes over-merging, and it is unintended. It is the sweep path specifically — ingest is unaffected because
nowis real there.Not fixed this run; the run's engineering item was the AI-flag enforcement pair (#75/#76) and this is a separate change to the merge gates, which is not something to land untested alongside unrelated work.
Fixed, verified and live at
e30d594. Closing._call_fits_incidentnow measures incident idle with the unsigned gate helper, matching every other recency gate in the file. Commite30d594.Confirmed still-broken at HEAD by the standing correlation pass before the fix, and the failure mode was worse than the title suggests: on the sweep path
nowis the call's ownstarted_at, so the signed value went negative,idle_min >= 15was false, and the content-divergence veto never ran at all — unit overlap was accepted unconditionally. On a shared dispatch backbone that veto is the only thing bounding the feedback loop that lets one incident absorb a whole talkgroup. The same negative value madeidle_min < 20.0true at any back-dating, so a tactical channel returnedtactical_defaultfor every swept orphan out to the 90-minute bound.One variable feeds all four gates in the function, so the correction is a single line at the source rather than four separate comparisons.
Two tests added beside the existing idle-gate cases, both confirmed failing on the old line and passing on the new one: a back-dated call no longer bypasses the divergence veto, and a back-dated call on a tactical channel no longer gets the default. Suite: 266 pass, 0 fail.
Direction: toward more splitting, on the sweep path only. That is the intent — the bug was suppressing an over-merge veto — but it is worth naming, because it compounds the under-linking in #27: an orphan whose incident moved on 15-90 minutes after the call ended will now be back-linked less often. #27's retry budget (wall-clock rather than 3 attempts) is the natural follow-on to this, not a separate concern.
Post-deploy watch: 12 minutes of
c2-corelogs after the deploy, zero exceptions, zero errors. No revert.Refs #5, #27, #80.