bug(alarms): an active scripted alarm under-reports as normal after a full-rebuild deploy #487
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Confirmed pre-existing bug, deferred out of v3 Batch 4 because the fix carries real risk (see below). Recorded in
docs/plans/2026-07-16-v3-batch4-PR.mdunder "Documented follow-ups"; filed now so it is tracked rather than living in a plan doc.What happens
The scripted-alarm Part 9 condition node has the same redeploy-reset race the VirtualTag
ReassertValuefix closed:RebuildAddressSpaceclears_alarmConditions, andMaterialiseScriptedAlarmsrecreates each condition fresh/normal.ScriptedAlarmEngine.LoadAsyncreloads from persisted state and yieldsEmissionKind.Nonefor a still-active condition, whichOnEngineEmissiondrops.So an active scripted alarm with static dependencies under-reports as normal after a full-rebuild deploy, until its next real transition. This is the known "snapshot-is-one-shot / restart-to-re-deliver" behaviour, not a Batch 4 regression.
Why it was deferred
The fix is a Core-engine emission-contract change carrying double-alarm-history risk — a naive re-emit would append a duplicate historian/AVEVA row per deploy. That is the alarm analogue of the VirtualTag M1 historian issue.
Proposed shape
A host-driven, node-only
AlarmStateUpdatere-assert inOnAlarmsLoaded, using the same safe post-materialise ordering as the VirtualTag fix, reusing_engine.GetState(alarmId)+LoadedAlarmIds, and never touching thealertstopic (that is what would duplicate history).Verified still unfixed as of
master7808faa7:ReassertValueexists only inVirtualTagActor/VirtualTagHostActor; there is noOnAlarmsLoadedequivalent.Live-verify this one — the VirtualTag analogue was only caught on the rig, and the failure mode (an alarm silently reading normal) is invisible to unit tests that drive a transition.