fix(runtime,opcua): #979 refused overlapping writes revert to the last confirmed value; dependents of a removed input go BadWaitingForInitialData
U-4: EquipmentVariableState tracks an overlap window per node — the confirmed (value, status, source timestamp) snapshotted when the first optimistic commit lands on an unowned node, advanced by an older attempt the device confirms while a newer one owns it. A refused owner reverts to it (never to the previous attempt's unconfirmed value at Good); audit OldValue follows. Applies per NodeId, so raw and UNS mirrors each revert to the fanned value. Mapped completions use the same tuple. R-6: DriverHostActor diffs the value-ref index on apply and sends DependencyMuxActor.ValueRefsRemoved; the mux (and VirtualTagOutputsRemoved) hands every replay-opting dependent BadWaitingForInitialData (the recorder is not told), and late bursts for removed refs are withheld until the next apply. Tests: Sdk2EquipmentVariableTests (overlap both orders x both realms, confirmed older write, interleaved raw+UNS), GrpcDataMappedWriteCompletionTests, RemovedInputQualityTests, DriverHostActorSourceRemovedTests, VirtualTagToVirtualTagFlowTests (Roslyn, identical-value recovery).
This commit is contained in:
@@ -146,6 +146,16 @@ aliases resolve to the same device point. Primary-role admission is checked on t
|
||||
The SDK invokes the callback while holding the node-manager lock. Asynchronous work is dispatched
|
||||
without waiting under that lock. Local optimistic values are corrected through shared fan-out on
|
||||
a confirmed failure. A driver with fire-and-forget semantics cannot provide device confirmation.
|
||||
|
||||
A refused write reverts to the node's last **confirmed** (value, status, source timestamp), not to the
|
||||
value captured when its own handler ran (#979). Each node tracks an overlap window: the first optimistic
|
||||
write on a node no attempt owns snapshots the node's tuple as confirmed; an older attempt the device
|
||||
confirms while a newer one still owns the node advances it; a driver publication, a revert, or the
|
||||
owner's own success closes the window. So two overlapping writes A then B that the device refuses (in
|
||||
either completion order) leave the node on its pre-A value and status, never on A at Good, and the
|
||||
audit event's `OldValue` reports that confirmed value. Each NodeId — the raw node and every UNS mirror —
|
||||
keeps its own window; a write through one never touches the other, and both receive the next fan-out
|
||||
publish.
|
||||
`WriteTune` and `WriteConfigure` are not separate tag-classification gates on this Value-write path.
|
||||
|
||||
## Remote write outcomes
|
||||
|
||||
Reference in New Issue
Block a user