fix(siteeventlog): suppress snapshot-resync alarm re-emit + coverage + hardening (review)

This commit is contained in:
Joseph Doherty
2026-06-15 12:45:00 -04:00
parent e74c3aef23
commit e5534fddca
6 changed files with 166 additions and 23 deletions
@@ -212,7 +212,14 @@ public class NativeAlarmActor : ReceiveActor
{
_alarms[sourceRef] = t;
PersistUpsert(t);
Emit(t, t.Condition);
// M1.5: a snapshot replay is a re-sync of the source's current
// active set on (re)subscribe, NOT a live transition — surface it
// upward for the DebugView but do NOT re-log an `alarm` operational
// event. Otherwise every DCL reconnect would re-emit an `alarm`
// event for every already-active native condition (the
// synthesised return-to-normal above IS a real state change and
// keeps logSiteEvent: true).
Emit(t, t.Condition, logSiteEvent: false);
}
_snapshotBuffer.Clear();