An any-hour READY fix runs while ALARMS is muted too

The LTC write only puts a note in Planning Center; nothing in the room notices, so the mute (pressed
Sunday 12:24 at NA and never lifted) must not hold it back. The window's fixes still stop when muted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 14:13:17 -04:00
co-authored by Claude Fable 5.1
parent b7af31ea6f
commit 5d918d60af
4 changed files with 10 additions and 8 deletions
+4 -4
View File
@@ -1501,12 +1501,12 @@ class Engine:
# ALARMS muted (maintenance) stops auto-fix, except the harmless fixes in "while_muted"
# (playing the Spotify playlist): those keep running inside the window.
muted = not self.service.on(now)
keep = set(a.get("while_muted", [])) if muted else None
hours = in_windows(a.get("windows", []), now)
# A fix marked "anytime" (writing the timecode into Planning Center) runs by itself at any
# hour, not only in the auto-fix hours - still never while ALARMS is muted.
# A fix marked "anytime" (writing the timecode into Planning Center: nothing in the room
# notices) runs by itself at any hour, not only in the auto-fix hours, muted or not.
anytime = {f for f in a.get("fixes", []) if self.cfg["fixes"].get(f, {}).get("anytime")
and not self.cfg["fixes"].get(f, {}).get("never_auto") and not self.cfg["fixes"].get(f, {}).get("disabled")}
keep = (set(a.get("while_muted", [])) | anytime) if muted else None
if not hours or (muted and not keep):
if self.auto_on and self.autolog:
self.autolog.write(now, "PANEL", "auto-fix off (%s)" % ("ALARMS muted" if hours else "end of the window"))
@@ -1514,7 +1514,7 @@ class Engine:
for ident in [i for i in self.auto_tries if not (i[0] == "fix" and i[1] in anytime)]:
del self.auto_tries[ident] # the window's fixes start fresh next time
self.auto_seen.pop(ident, None)
if muted or not anytime:
if not anytime:
return []
else:
if (not self.auto_on or self.auto_muted != muted) and self.autolog: # opens today's file, so it can be watched from the start