mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-13 15:51:39 +00:00
871f2348bd
The step before the event log can retire the JSON snapshot history file (docs/ALERT_ENGINE_EVOLUTION.md): lifecycle events — fired, refired, resolved, acknowledged, unacknowledged, escalated — now carry a full alert snapshot in the log (new nullable snapshot column, upgraded in place on pre-snapshot databases), and AlertHistoryFromEvents projects the history list from those snapshots alone: one row per occurrence, refires folded in by their restored start time, live active alerts overlaid so open rows show current state. The JSON-backed history manager stays authoritative and characterizes the projection: history_projection_parity_test.go holds the two equal across active, resolved, acknowledged, multi-resource, and second-occurrence runs. Cutover follows once an import path carries existing JSON history into the log. Parity surfaced one real defect, fixed at the root: the JSON history never propagated acknowledgement onto its rows, so the History view showed an acknowledged alert as unacknowledged for its entire active life. The live alert is authoritative; the row now follows it.