Fix early reminder notifications and lost recovery notifications
- AlertState.update() now resets last_notification when the alert level changes, so a WARNING→CRITICAL escalation restarts the reminder interval rather than inheriting a nearly-expired timer. - _dispatch_to_channel() bypasses min_level for RECOVER, so recovery notifications are delivered even after a server restart when _alerted_channels is empty and the fallback dispatch path is used. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,7 @@ class AlertState:
|
||||
self.level = level
|
||||
self.since = now
|
||||
self.notification_count = 0
|
||||
self.last_notification = None # restart reminder interval on level change
|
||||
# Reset acknowledgment on state change
|
||||
if level != AlertLevel.OK:
|
||||
# Only reset if changing to a different alert level
|
||||
|
||||
Reference in New Issue
Block a user