Operator mode clears the flapping history of the links it takes out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 15:18:43 -04:00
co-authored by Claude Opus 5.5
parent 906f52e110
commit bf9afcbc84
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -1397,6 +1397,7 @@ class Engine:
service_on = self.service.on(now)
raw = self.evaluate(snap, now, service_on)
deb = self.debounce if debounce is None else debounce
bypassed = self.bypass_names()[0]
for key, (tile_id, res, chk) in raw.items():
tr = self.trackers.setdefault(key, Tracker())
was_acked = tr.acked
@@ -1404,6 +1405,8 @@ class Engine:
event = tr.update(res, now, 0 if chk["type"] == "network" else
chk.get("debounce_seconds", 1 if chk["type"] == "midi_peer" else deb),
self.flap_window)
if chk["type"] == "midi_peer" and (chk.get("peer") in bypassed or chk.get("session") in bypassed):
tr.starts.clear() # taken out by the operator key: its earlier drops are not flapping
if event == "fault":
self.events.append(("FAULT", "%s %s" % (self.tiles[tile_id]["label"], res.msg)))
ident = self.identity_key(key) if key in self.meta else None