mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-14 00:00:30 +00:00
bfc1a81867
Phase 1 capstone of docs/ALERT_ENGINE_EVOLUTION.md. The deterministic reducer now runs continuously inside the live manager against the same production observations: the canonical lifecycle path (connectivity, powered-state, discrete-state kinds) via a deferred hook that replays each evaluation — including the resolved intent context — through the reducer; the poll-driven recovery paths (PBS/PMG/storage, node, connection-degraded); and manual acknowledge/unacknowledge/clear. The feed seeds from active canonical alerts at enable so restarts do not read as mass divergence. Every state disagreement is counted (Manager.ShadowDivergences) and recorded in the alert event log as a shadow_divergence event with both engines' states, rate-limited to one report per key per ten minutes. After each divergence the reducer resyncs to the manager, so one divergence yields one event — including divergences caused by manager mutations the feed does not observe. Appends never block evaluation and a disabled feed is a nil-check no-op. This converts the parity harnesses' test-time guarantee into an always-on invariant; the production divergence rate becomes the go/no-go evidence for each Phase 2 family cutover. The full activation/ack/recovery/re-fire cycle runs divergence-free in tests.