mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-14 16:20:03 +00:00
9572a113ae
Adds internal/alerts/eventlog: a SQLite-backed, additive event log that records lifecycle transitions (resolved, acknowledged, unacknowledged, escalated, flapping detected) and notification decisions (dispatched, deferred by quiet hours, suppressed — with the mechanism that held them). Appends never block alert evaluation: a full buffer drops the event and counts the drop; a store that fails to open degrades to recording nothing. 90-day retention, hourly prune. The manager emits at the existing funnels only — dispatchAlert and the safe-call resolve/ack/escalate seams — so no lifecycle behavior changes. Lifecycle "fired" is deliberately not recorded yet: the active-alert store funnel also runs on persisted restore, so firing waits for the explicit activation seam in a later phase. The monitoring bootstrap enables the log per manager; ephemeral managers and tests record nothing unless they opt in. GET /api/alerts/events (monitoring:read) reads the log with alertIdentifier/type/since/limit filters, newest first. Phase 0 of docs/ALERT_ENGINE_EVOLUTION.md (coverage gap alert-engine-suppression-observability).