Pulse/internal/alerts
rcourtman 3d3b1a9642 Stop re-notification spam when alert cooldown is disabled (Fixes #1444)
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.
2026-05-01 15:04:27 +01:00
..
alerts.go Stop re-notification spam when alert cooldown is disabled (Fixes #1444) 2026-05-01 15:04:27 +01:00
alerts_test.go Stop re-notification spam when alert cooldown is disabled (Fixes #1444) 2026-05-01 15:04:27 +01:00
cleanup_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
clone_test.go Add unit tests for Alert clone and metadata utility functions (alerts) 2025-11-30 05:19:38 +00:00
concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
filter_evaluation.go Stabilize guest threshold overrides across node moves (#1334) 2026-03-31 23:18:19 +01:00
filter_evaluation_test.go Stabilize guest threshold overrides across node moves (#1334) 2026-03-31 23:18:19 +01:00
guest_disk_cleanup_test.go Clear stale guest per-disk alerts 2026-04-13 14:20:54 +01:00
guest_tags_test.go test: Add unit tests for guest tag filtering 2025-12-22 10:24:39 +00:00
history.go Migrate guest alerts across node moves 2026-04-01 13:02:07 +01:00
history_concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
history_test.go Migrate guest alerts across node moves 2026-04-01 13:02:07 +01:00
host_dedup_test.go Add host alert deduplication with tests 2025-12-07 12:38:38 +00:00
offline_toggle_test.go feat: finalize swarm service monitoring (#598) 2025-10-26 09:35:49 +00:00
per_metric_delay_example_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
pmg_anomaly_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
quiet_hours_test.go Respect quiet hours for escalation alerts 2026-04-12 21:29:32 +01:00
synology_test.go Normalize vendor-managed NAS RAID arrays 2026-04-12 22:20:04 +01:00
threshold_update_test.go Fix linked host agent threshold overrides 2026-04-12 22:47:34 +01:00
time_threshold_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
update_alerts_test.go Fix repeated Docker update recovery alerts 2026-04-09 15:59:15 +01:00
utility_test.go Disambiguate linked host agent alert names 2026-04-07 10:50:52 +01:00