fix(fire): remove immediate-severity exemption from grouper + cooldown

Fire events carried _severity_override="immediate" which zeroed the
dispatcher cooldown and skipped the Grouper coalescer. This meant fire
had no rate control in normal live operation. Drain-mode pacer handles
reconnect bursts; this change closes the live-operation gap so fire
obeys the toggle cooldown_seconds like every other family.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ubuntu 2026-06-15 23:01:15 +00:00
commit 85d48ce3c9
2 changed files with 5 additions and 12 deletions

View file

@ -379,14 +379,13 @@ class Dispatcher:
return return
# ---------- Section 3 — per-toggle cooldown (check only) ---------- # ---------- Section 3 — per-toggle cooldown (check only) ----------
# Immediate-severity events bypass cooldown entirely — they are # All severities (including immediate) obey cooldown. Fire rate
# already rate-controlled by source handler change detection. # control was previously bypassed for immediate; the drain-mode
# pacer handles reconnect bursts, and this cooldown handles
# normal live operation (≤1 per cooldown window per toggle/key).
# v0.6-4 (B13 fix): this section only CHECKS the cooldown. Arming # v0.6-4 (B13 fix): this section only CHECKS the cooldown. Arming
# it is deferred to Section 6 and happens only after a delivery # it is deferred to Section 6 and happens only after a delivery
# actually succeeded. # actually succeeded.
if getattr(event, "severity", None) == "immediate":
cooldown_s = 0
else:
cooldown_s = int(getattr(tog, "cooldown_seconds", 300) or 0) cooldown_s = int(getattr(tog, "cooldown_seconds", 300) or 0)
ck = None ck = None
if cooldown_s > 0: if cooldown_s > 0:

View file

@ -100,12 +100,6 @@ class Grouper:
event with the same group_key. The held event is emitted event with the same group_key. The held event is emitted
later via tick(). later via tick().
""" """
# Immediate-severity events bypass the coalescing window entirely
# (Phase 2.16.1): they must be delivered without buffering latency.
if event.severity == "immediate":
self._next(event)
return
if not event.group_key: if not event.group_key:
self._next(event) self._next(event)
return return