docs(history): OtOpcUa follow-up rounds 7–8 (deploy re-send, respawn Bad gap; ScadaBridge impact)

This commit is contained in:
Joseph Doherty
2026-12-05 01:10:46 -05:00
parent 2e52a02b85
commit b16d04d506
@@ -709,3 +709,15 @@ on `MonitoredItemNotification.Message` validated by `(ClientHandle, DataValue)`;
- **Issue batch 2026-11-28 (master `6b608459`, pushed; all undeployed — wonder-box hold).** Closed #916/#917/#920–#927/#929/#937. **v1 wire changes before any deploy:** #916 `DataMetadata.stable_source_id` (field 10) is no longer sent or kept in any realm (it leaked `driverId+RawPath` to UNS-only peers); #917 alarm-bearing raw tags are unsupported value nodes hidden from data-connection Browse (still forwarded as conditions); #922 an idle projected node past its 15 s metadata lease answers `BadWaitingForInitialData`/`BadResourceUnavailable` and renews on demand instead of `BadUserAccessDenied`. #923 **Gateway historian backend now verified** for remote history (live H01–H08 vs the real AVEVA Historian, read-only gateway). #926 OpcUaClient alarm initial-state signal only for a lossless refresh bracket; post-signal loss withdraws "known". #925 Galaxy re-reads active alarms (mxaccessgw `QueryActiveAlarms`, no gateway change) when a deploy adds alarms. **#937 (affects any client calling scripted-alarm methods):** Acknowledge/Confirm/Shelve/AddComment on a scripted condition now return the engine's verdict — `BadInvalidState` after a failed load (change reverted), `BadTimeout` = outcome unknown; new server quota `OpcUa:Quotas:MaxNodesPerMethodCall` default 1000 (was unlimited). **ScadaBridge impact:** treat `BadInvalidState` on a scripted ack as a real refusal and `BadTimeout` as unknown (re-read the condition); a single Call with >1000 method requests is now rejected; mapped (gRPC-data) nodes no longer return `BadUserAccessDenied` after an idle gap. New follow-ups lmxopcua#938 (p1: projected Read with maxAge=0 never Good — check DCL's maxAge) and #939–#953.
- **Issue batch 2026-12-01 (master `60e13282`, pushed; all undeployed — wonder-box hold).** Closed #938–#958, #960, #961 (23 issues; follow-ups #959 blocked live `/alerts` gate, #962 test flake, #963). **gRPC data (consumer projected nodes):** #938 projected Read with `maxAge=0` now does a bounded (≤5 s) origin read and returns Good — previously ScadaBridge's DCL (`RealOpcUaClient.ReadValuesAsync` always sends maxAge 0) got `BadWaitingForInitialData` forever on every mapped node; #939 an origin refusal now reads `BadUserAccessDenied` (cached 5 s), transport failures stay `BadResourceUnavailable`; #940 Write/CreateMonitoredItems renew a lapsed lease; #960 up to 64 concurrent projected reads per node (type-sized reservations); #961 a refused projected item is a per-item status, not a whole-request fault; #941/#956 unknown child kinds / value-kind enums from a newer origin are skipped, not page-fatal; #942 an export rooted at an alarm-bearing raw tag is rejected at authoring/deploy; #943/#957 outside-grant and origin-ACL-hidden addresses answer `NotFound` exactly like missing ones (was `Denied`). **Deploy:** #949 an ask timeout on `POST /api/deployments` now answers 202 `OutcomeUnknown` with a pre-allocated `deploymentId` + `Location` (was HTTP 500 for a deployment that went ahead); #955 the compose no longer range-locks the config snapshot under Serializable (concurrent edits deadlocked/stalled deploys) — Snapshot isolation + `sp_getapplock` serialisation. **Alarms:** #944 Galaxy recovers a Clear dropped while detached (clear-absent sweep on complete active-set reads); #945 provider/snapshot status frames counted properly, truncated snapshots withheld; #946 OpcUaClient RefreshRequired sweeps rate-limited (10 s default, AdminUI field #954); #947 an upstream-refused OpcUaClient ack now reverts the node; #950 AdminUI `/alerts` scripted ack/shelve show the engine verdict (Applied / Refused / Outcome unknown; additive `ExecuteAck.alarm_verdict`); #951/#952/#953/#958 scripted-alarm late refusals and refused broadcast copies revert, pre-gate cancellation is NotApplied, superseded load failures ignored. **ScadaBridge impact:** mapped (gRPC-data) nodes now return real values to DCL reads (maxAge 0); a peer probing outside its grant now sees `NotFound` not `Denied`; a refused OpcUaClient-backed ack now surfaces as a failure + revert instead of a silent success. No wire-breaking changes (all proto additions optional).
- **2026-12-02 full-review remediation + follow-up rounds 2–6 pushed (2026-12-04, master `da23fd970`; all undeployed — wonder-box hold).** Closed review findings #971–#1002 and their code follow-ups through #1106. **Security / behaviour changes before any deploy:** #971 the C# script sandbox is now an **allow-list** (narrowed BCL reference set; async lambdas, `stackalloc`, `MethodImpl` and deep-data types refused); the deploy gate compiles every in-use script (`Deployment:ScriptCompileGateMode`, default `Error`) — **run lmxopcua#1013 (stored scripts through the new analyzer) and #1015 (illegal VirtualTag names / dangling script refs) against prod ConfigDbs before upgrading.** #1104 a script returning a jagged array (`int[][]`) is now refused (node goes Bad, flatten hint) in-process as well as out-of-process. #974 the Sql driver's read-only guard is dialect-aware (T-SQL ScriptDom single-SELECT; 13 bypasses closed) and **Odbc named queries must now parse as T-SQL** (`SqlNamedQueryInvalid` deploy rule, #1058 — audit PostgreSQL `::` casts / `LIMIT` first); MySQL read-only session is documented as not a boundary (#1042). #975 AdminUI re-validates role grants every 5 min via ZB.MOM.WW.Auth 0.5.0 directory re-query (+ absolute session cap). #973 `/fleet/diagnostics` only dials known cluster members. #1003 Akka remoting untrusted-mode + trusted-selection-paths on by default, mutual TLS opt-in (live gate #1067). #972 ACL revalidation no longer stands down subscriptions when `Security:Acl:Enabled=false`. #980 an unexpected cluster exit now exits non-zero so SCM restarts the service. **MQTT/Sparkplug (#988/#1044):** the primary-host STATE claim id is deterministic per pair (pair exclusivity) and ONLINE is re-asserted; plain DateTime writes publish ISO-8601 UTC (was invariant `MM/dd/yyyy`). **Galaxy secured writes (#991/#1017/#1074/#1084/#1091):** opt-in SecuredWrite under the caller's API-key Galaxy identity (VerifiedWrite still refused); over a gRPC data connection a secured write needs BOTH `MxAccess.SecuredWritesOverDataConnections` (driver, default off) AND the export's `DataExport.AllowSecuredWrites` (migration `AddDataExportAllowSecuredWrites`); a Galaxy refusal is now a definite `BadUserAccessDenied` (was `OutcomeUnknown`). **gRPC data (#994/#1098/#1102/#1105):** projected cohorts batch/pace (10k-item opens), back-pressure instead of teardown, ~1.65 KB/value; a client filter can no longer leave a projected node on a superseded value (#1102). ConfigDb migrations with pre-checks (run `otopcua-preflight`, #1068): `ConfigurationGapsIndexesAndRowVersions` (#998/#1021), `ScriptForeignKeysAndExternalIdUniqueness` (#1040/#1049). Alarm S&F no longer dead-letters on a historian outage (#976; revive tool #1007; live gate #1009). **ScadaBridge impact:** a secured gRPC write from ScadaBridge needs `DataExport.AllowSecuredWrites` on the export plus the driver option, and a refusal reads `BadUserAccessDenied`; Sparkplug consumers see a stable primary-host id per pair; MQTT DateTime payloads change format (ISO-8601); no OPC UA wire-breaking changes. Open deploy gates: #1006/#1009/#1010/#1012/#1013/#1015/#1021/#1023/#1026/#1058/#1067/#1068; follow-ups #1107 (p2: deploy dispatch is fire-and-forget on pub/sub) – #1109.
- **Follow-up rounds 7–8 pushed (2026-12-05, master `961ca2897`; all undeployed — wonder-box hold).** Closed #1107–#1109, #1111, #1112.
- **#1107/#1111, deploy dispatch is no longer fire-and-forget.**
- Central re-sends a deploy at +5, +15 and +35 s, only to nodes that have not acked. A gRPC re-send dials only those nodes.
- Each re-send carries a `TargetNodes` list and a `DeadlineRemaining` value. Both are additive proto fields (`target_nodes = 4`, `deadline_remaining_ms = 5`).
- A node that already acked replays its remembered ack and does not re-apply, so the #601 rule holds: a degraded revision is not re-applied.
- A Failed ack is retried. A late-reached node caps its address-space wait to the time central has left.
- Central keeps a node's Applied over a late stale Failed.
- **Rollout order: upgrade driver nodes before central.** A pre-#1107 node ignores `target_nodes` and re-applies on its own re-send.
- **#1109, a real race fixed.** After a driver restart or config-change respawn, dependent VirtualTags, scripted alarms and Calculations could keep the old driver's last Good value. They now see `BadNoCommunication` until the new driver publishes.
- **#1112, owner decision "brief Bad on restart".** On a driver config-change respawn or operator Restart, the driver's raw and UNS value nodes go `BadWaitingForInitialData` until the new driver's first value. A respawn no longer stamps `BadNoCommunication` or latches a comms-loss audit.
- **ScadaBridge impact:** every driver config-change deploy and operator Restart now shows a brief `BadWaitingForInitialData` on that driver's OPC UA value nodes. Before, they held the old Good value, possibly indefinitely. DCL should treat that status as transient. No wire-breaking OPC UA changes.
- New: #1110 (deploy-gate, live re-send verify), #1113 and #1114 (p3).