From 24eed8adddc6225f6732a98fe69e1e5ee15ab13d Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 9 Oct 2026 07:15:26 -0400 Subject: [PATCH] =?UTF-8?q?docs(opcuaclient):=20#657=20review=20=E2=80=94?= =?UTF-8?q?=20correct=20stale=20rebuild=20comment,=20note=20cold-host=20re?= =?UTF-8?q?sidual?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe --- docs/AlarmTracking.md | 2 +- .../OpcUaClientDriver.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/AlarmTracking.md b/docs/AlarmTracking.md index 00c5e37d..ce2fcbf9 100644 --- a/docs/AlarmTracking.md +++ b/docs/AlarmTracking.md @@ -98,7 +98,7 @@ same condition is wired as an **event notifier of every referencing equipment fo flagged — so a host already showing that state writes nothing, and a host that retained the condition Active gets a real "Cleared". Pre-#657 a respawn wrote a duplicate "Activated" + "Cleared" pair per inactive+unacked condition, and an inactive+acked first sight went out as `Unspecified` (an "Activated" row for an inactive alarm; a retained-Active - condition was never cleared). E2E: `Runtime.Tests/NativeAlarmRestatementEndToEndTests`. + condition was never cleared). Residual (pre-existing, not a regression): a cold host treats an unseen condition as acked, so after a node restart each upstream inactive+unacked condition still writes "Activated" + "Cleared" once. E2E: `Runtime.Tests/NativeAlarmRestatementEndToEndTests`. ### Native condition state survives a full rebuild (Gitea #641) diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs index 4197e7eb..53144baf 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs @@ -1887,9 +1887,10 @@ public sealed class OpcUaClientDriver : IDriver, ITagDiscovery, IReadable, IWrit /// /// #619 re-review: open (or re-open) the host's alarm subscription over . - /// A CHANGED set means the host rebuilt its address space (an alarm-bearing delta always does), recreating - /// every condition node inactive+acked — so every last-told state is forgotten and the post-subscribe - /// ConditionRefresh re-reports from that default. The SAME set (a reinit / reconnect re-subscribe) keeps + /// A CHANGED set means the host applied an alarm-bearing delta, so every last-told state is forgotten and the + /// post-subscribe ConditionRefresh re-reports as first sight. Since #641 a rebuild KEEPS native condition state, + /// so the host may hold ANY state here — which is why first sight is flagged (#656/#657) rather than assuming + /// an inactive+acked default. The SAME set (a reinit / reconnect re-subscribe) keeps /// them, so the refresh copy of an already-reported state emits nothing. Ack targets of refs no longer /// subscribed are pruned either way. ///