Correlator prompt: show incident age/size, stop unit overlap chaining new jobs (#189)
The tiebreaker forced ~all of the 09-27 rollover sink's bad links: idle resets on every link so a 2.5h, 40-call incident read as fresh, and the rules treated unit overlap as enough on a county channel where units work jobs back to back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3a1dca9533
commit
e009090418
@@ -65,3 +65,16 @@ def test_prompt_incidents_is_most_recently_active_first_and_capped():
|
||||
# falls back to started_at when updated_at is absent, and never raises
|
||||
assert _prompt_incidents([{"incident_id": "a", "started_at": NOW.isoformat()},
|
||||
{"incident_id": "b"}])[0]["incident_id"] == "a"
|
||||
|
||||
|
||||
def test_inc_summary_shows_age_and_size_not_just_idle():
|
||||
# server-26#189: every link resets idle, so a 2.5h catch-all read as fresh.
|
||||
s = _inc_summary({
|
||||
"incident_id": "sink",
|
||||
"started_at": "2026-09-07T05:26:00+00:00",
|
||||
"updated_at": "2026-09-07T07:58:00+00:00",
|
||||
"call_ids": [f"c{n}" for n in range(40)],
|
||||
}, NOW)
|
||||
assert "idle:2min ago" in s
|
||||
assert "open:2h34m" in s
|
||||
assert "calls:40" in s
|
||||
|
||||
Reference in New Issue
Block a user