From ce8db9071fbfa9894b387274cb239926636a21a5 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 1 Dec 2026 21:00:58 -0500 Subject: [PATCH] =?UTF-8?q?docs(history):=20OtOpcUa=202026-12-01=20issue?= =?UTF-8?q?=20batch=20(#938=E2=80=93#961)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/skills/sister-project-history/otopcua.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/skills/sister-project-history/otopcua.md b/.claude/skills/sister-project-history/otopcua.md index c5d4813..f467af9 100644 --- a/.claude/skills/sister-project-history/otopcua.md +++ b/.claude/skills/sister-project-history/otopcua.md @@ -707,3 +707,4 @@ on `MonitoredItemNotification.Message` validated by `(ClientHandle, DataValue)`; - **gRPC data A4 merged (2026-11-25, `179881f4`) — history + alarm forwarding plan COMPLETE (X0, H1–H4, A1–A4).** Condition diagnostics (metrics `otopcua.dataconn.conditions.{items,resyncs,capacity_rejections,refresh_required}` and `…condition_methods{method,outcome}` with `side`; AdminUI Data connections page shows per-connection/per-mapping condition state, held state, node budget). #930/#931 fixed (refused/over-capacity mappings retried in-stream with long backoff; no refresh storm). Consumer now HOLDS imported conditions across a deploy (a deploy's undecided empty mapping set is not a removal) — fixed live findings F1–F3 (lost EventIds / phantom Active event / duplicate transition on every fleet deploy); failed/degraded deploys release, never-settling deploys stale-mark then release after `MaxHold` 5 min; one RefreshRequired on takeover. Folder-first event subscriptions work (F4). Live A01–A08 8/8 on docker-dev (`conditions_scenarios.py`, run a4s-7; native alarms via a run-owned opc-plc `--alm`; opc-plc freezes an alarm after ack — its own behaviour). L1 p99 4.7 ms. **ScadaBridge consumer-impact check:** imported `ConditionId` opaque (`c1.` in `mapped/conditions`) and stable for the connection's life (mapping changes don't move it; `ConditionKeySecret` rotation does); `SourceName` = `/` and CAN move (mapping undeployed / higher-priority mapping lists it / first seen while Raw unavailable) ⇒ ScadaBridge#147 (key on ConditionId); OtOpcUa now emits `RefreshRequiredEventType` ⇒ ScadaBridge#148 (p1, call ConditionRefresh); native `ConfirmedState=true` re-assert preserved; severity verbatim. Fleet deploy still needs #915 soak decision, #916/#917 v1 fixes, ScadaBridge#147/#148, L5 production count #932, Gateway leg #923. Follow-ups #933–#936 (#935: every deploy re-activates an acked still-active scripted alarm at the origin). Undeployed. - **Follow-ups #933–#936 closed (2026-11-25, master `05f431f5`, via `0c57f1ab` for #935).** **#935 (scripted alarms, affects every OtOpcUa with scripted alarms):** a deploy (same-process reload of `ScriptedAlarmEngine`) is now a *restatement* — a surviving alarm keeps its in-memory condition, so an operator-acked still-active alarm stays Acknowledged, no `Activated`, no duplicate `alerts`/historian row, `LastTransitionUtc` and the activation marker unchanged (previously every deploy re-activated it; docs claimed the opposite). Engine restart still reloads from the store (Active not persisted). Operator commands are applied under the engine gate; after a FAILED load commands are rejected (Warning only — the caller still sees Good, #937) until the next good load, which reads the store. Imported conditions: #933 keys held by a definitively refused mapping are removed after 20 min (temporarily unknown ⇒ held indefinitely; clock pauses during outages); #934 root re-resolve off the frame loop; #936 removal RefreshRequired reaches the credentials that were admitted to the condition. Live A01–A08 8/8 on both branches. Undeployed. - **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).