mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 18:45:53 +00:00
6185cf3f88
Projection replay walked the entire alert event log on every boot, twice (monitor start and the resource-store boundary), synchronously on the serving path, and every replayed event queued a full incident-store JSON rewrite. A 64k-event log made startup exceed the dev supervisor's health-kill window, so the backend restarted forever and never served. The event log now owns per-consumer projection watermarks in alert_store_meta, WalkOldest takes an AfterID cursor, and the single catch-up pass runs in the background at the canonical resource-store boundary with periodic watermark checkpoints. The watermark only advances when both the incident store and the canonical change recorder are attached, so partial-surface passes repair without marking events applied, and lowering the watermark forces a full repair replay. Incident-store saves now coalesce: a burst of mutations queues one whole-store serialization instead of one per event, live paths included. Registers the alert-lifecycle-replay-startup-scalability coverage gap and amends the alerts and monitoring subsystem contracts accordingly.