mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-13 07:41:27 +00:00
cf2e61ea22
Third slice on the per-resource operator-state feature delivers the behavioral payoff: when an operator has set a maintenance window on a resource (via the API surface from slice 30), new findings against that resource get auto-dismissed as expected_behavior at creation time rather than firing notifications. The finding still lands in durable history with a UserNote naming the window and a "dismissed" lifecycle event tagged operator_state_cause=maintenance_window so the operator can audit what tripped during the window. Adds a narrow ResourceOperatorStateProvider interface to internal/ai so the findings runtime stays free of an internal/unifiedresources import. The API layer wires an adapter in router.go that projects unified.ResourceOperatorState through state.IsInMaintenanceAt into the ActiveMaintenanceWindow shape the findings runtime consumes. Suppression is opt-in: stores without a provider wired keep the original new-finding behavior bit-for-bit, so deployments that haven't adopted the operator-state feature see no behavioral change. IntentionallyOffline and NeverAutoRemediate land as compounding slices on the same provider interface.