Galaxy reconnect snapshot: ActiveAcked entry for an unknown condition lands inactive; re-statements write duplicate Activated rows #656
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?
Residuals noted in the #647 reviews (batch b647), pre-existing, out of that lane:
Acknowledgeonly. On a condition the host has no prior record of, that leaves it inactive+acked instead of Active+acked.Fix direction: map ActiveAcked-on-unknown to Raise+Acknowledge (or a combined transition the projector understands), and let the projector treat a Retrigger with an unchanged message on an Active+unacked condition as a re-statement for history purposes.
Fixed on master — merge
82750ccc(lane commite138e397+ predecessor), pushed 2026-10-09.AlarmTransitionKind.ActiveAcknowledged(one projector update, one client event,/alertsrows only for what changed) — Galaxy snapshotActiveAckedand OpcUaClient inactive→acked-active. A cold host's ActiveAcked entry now lands Active.AlarmEventArgs.IsRestatement(Galaxy snapshot entries, OpcUaClient first sight): a flagged Retrigger on an Active+unacked condition with the same message and severity, or a flagged Clear on an inactive condition, writes no row.NativeAlarmProjectorreturns the rows to write; FOCAS/MTConnect/AbCip unaffected. E2E:Runtime.Tests/NativeAlarmRestatementEndToEndTests.Live check (docker-dev + opc-plc), reusable for #657:
ssh dohertj2@10.100.0.35 'cd /opt/otopcua-opcuaclient && docker compose up -d'(bring it down again after).MAIN-opcua-alarm1on the MAIN OpcUaClient driver with TagConfig{"nodeId":"ns=6;s=1:Colours/NorthMotor?Red","alarm":{"alarmType":"AlarmCondition","severity":500}}, deploy (docker-dev/deploy.sh < /dev/null). That condition is permanently Active+unacked and alternates its message every few seconds.UPDATE dbo.DriverInstance SET DriverConfig = JSON_MODIFY(DriverConfig,'$.hw3RespawnToggle',N)+ deploy, every ~15 s (logs:stopped driver child MAIN-opcua→spawned→connected)./alerts: a duplicate re-statement is a row identical in timestamp/severity/message to the one before it.Result: pre-fix image 4/4 respawns wrote a duplicate "Activated" row; post-fix 0/6. Revert the tag/toggle afterwards.
Follow-up found in review: #657 (respawn replays inactive+unacked as Raise+Clear).