#2237·Pulse

Duplicate provider-incident notifications on every sync cycle while a resource is under operator suppression

Author: AndyProsserCreated Sep 24, 2026Updated Sep 24, 2026
Labelsneeds-decomposition

Describe the bug

A provider-incident notification (the TrueNAS/PBS-style "native incident" alert path) re-dispatches a duplicate notification on every alert-sync cycle instead of once, for as long as the underlying resource is under operator suppression (lifecycleState: retired, monitoringMode: muted, or an active maintenance window) and the incident stays unresolved.

Root cause: Manager.setActiveAlertNoLock (internal/alerts/alert_store.go) intentionally drops an alert instead of storing it in activeAlerts when the resource is suppressed — this is deliberate, so a previously-resolved alert can't reappear while a suppression policy holds (see ReconcileResourceOperatorState's doc comment). SyncUnifiedResourceIncidents (internal/alerts/unified_incidents.go) doesn't account for that: its dispatch loop looks the alert up in activeAlerts to decide whether it's "already firing," finds nothing (because it was never actually stored), and treats the still-unresolved condition as newly firing again — recording a fired event and dispatching a notification unconditionally, every single sync cycle.

SyncUnifiedResourceIncidents runs at every accepted agent report, not on a slow poll interval, so this compounds fast on an active fleet.

Live impact on a home fleet (~20 hosts/agents): a single genuine provider-native incident (TrueNAS UPS communication lost, in our case) on a resource set to lifecycleState: retired produced 9,413 duplicate "fired" events and 1,213 duplicate notification emails for the same unresolved incident over 6.5 hours — roughly once a minute. Nothing about this is TrueNAS-specific: any provider-incident source (TrueNAS, PBS, VMware host, etc.) on any resource under operator suppression would hit the same loop.

To reproduce

  1. Set a resource's operator state to lifecycleState: retired (or monitoringMode: muted, or an active maintenance window) — PUT /api/resources/{id}/operator-state, or via the UI's per-resource monitoring-policy menu.
  2. Have that resource report a still-unresolved provider-incident condition (e.g. a TrueNAS native alert) on every subsequent agent report.
  3. Watch SyncUnifiedResourceIncidents run each sync cycle: it never recognizes the incident as already active, so it logs a fired event and calls dispatchAlert every cycle instead of once.

Minimal repro without a live fleet: call Manager.SyncUnifiedResourceIncidents twenty times in a row against the same unresolved incident on a suppressed resource — each call dispatches again.

Expected behavior

A provider-incident notification dispatches once when first detected, and again only on a real state change (e.g. escalation to critical) — matching ordinary, non-suppressed incident behavior. Operator suppression should govern whether a notification is delivered, not cause the "already active" check to fail and re-fire the incident every cycle.

Additional actionable topics

None for the bug itself. One minor, non-technical observation worth a passing mention rather than its own topic: the per-resource monitoring-policy menu (ResourceMonitoringPolicyAction.tsx) lists Mute all attention and Retire from monitoring as adjacent choices in one small dropdown, and it's easy to land on the more permanent one by mistake — operator-beware, not a defect. It's what put our TrueNAS resource under suppression in the first place and is how we found this bug, but the notification-storm behavior itself is the actual problem: it fires for any resource an operator has deliberately and correctly suppressed too (retired, muted, or in a maintenance window), not just an accidental one.

Pulse version

Confirmed against main (f44c47f9d) by direct source inspection. Live-measured on a modified build derived from main around the v6.4.5 timeframe.

Agent version

none (server-side alert evaluation; not agent-version-specific)

Installation type

ProxmoxVE LXC

Relevant logs or diagnostics

alert_events on the affected instance, same alert ID repeating indefinitely with zero resolution:

fired                 | 9,413
notification_deferred | 9,413   reason: quiet_hours:operator_retired
notification_dispatched | 9,413

Sample event (id and content identical across all 9,413 occurrences):

json
{"level":"debug","alertID":"unified-incident-...","type":"...","level":"warning",
 "quietHoursRule":"operator_retired","replayAt":"...",
 "message":"Alert notification deferred during quiet hours"}

I have a fix and regression tests ready on a branch derived from clean main (f44c47f9d): it confirms the alert actually landed in activeAlerts after setActiveAlertNoLock before recording it as fired or dispatching, so a suppressed alert now dispatches 0 notifications across repeated cycles (previously 1 per cycle), and an unsuppressed alert is unaffected (dispatches exactly once, as before). Happy to open a PR once this is triaged, following the same process as #1966 / #2199.

Confirmations

  • I verified the exact Pulse version and image reference from the running instance.
  • I searched existing issues for duplicates.