mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 14:00:29 +00:00
3d3b1a9642
shouldNotifyAfterCooldown previously returned true on every call when Schedule.Cooldown was 0 or negative, which the alert evaluation loop runs on every metric tick. With cooldown disabled, an active alert was re-notified on each tick. The UI labels cooldown=0 as "Disabled," so the intuitive contract is "do not re-notify," not "re-notify continuously." Treat <=0 as "first-time only": fire the initial notification, then suppress subsequent re-notifications until the alert clears or the cooldown is configured to a positive value. Level escalation re-notifications remain handled at the call site and are unaffected. Tests cover all three branches: first-time fire with cooldown=0, re-notification suppression with cooldown=0 (named regression guard for #1444), and the same behavior for negative values.