mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 17:31:34 +00:00
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:
parent
de69a9fd57
commit
85d48ce3c9
2 changed files with 5 additions and 12 deletions
|
|
@ -379,14 +379,13 @@ class Dispatcher:
|
|||
return
|
||||
|
||||
# ---------- Section 3 — per-toggle cooldown (check only) ----------
|
||||
# Immediate-severity events bypass cooldown entirely — they are
|
||||
# already rate-controlled by source handler change detection.
|
||||
# All severities (including immediate) obey cooldown. Fire rate
|
||||
# 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
|
||||
# it is deferred to Section 6 and happens only after a delivery
|
||||
# actually succeeded.
|
||||
if getattr(event, "severity", None) == "immediate":
|
||||
cooldown_s = 0
|
||||
else:
|
||||
cooldown_s = int(getattr(tog, "cooldown_seconds", 300) or 0)
|
||||
ck = None
|
||||
if cooldown_s > 0:
|
||||
|
|
|
|||
|
|
@ -100,12 +100,6 @@ class Grouper:
|
|||
event with the same group_key. The held event is emitted
|
||||
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:
|
||||
self._next(event)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue