docs(history): OtOpcUa gRPC data A4 merged — plan complete, ScadaBridge impact check

This commit is contained in:
Joseph Doherty
2026-11-25 04:45:02 -05:00
parent db12ae2dc0
commit cdcb178e34
@@ -704,3 +704,4 @@ on `MonitoredItemNotification.Message` validated by `(ClientHandle, DataValue)`;
- **gRPC data A1 merged (2026-11-24, `68a9d518`) — alarm forwarding origin groundwork, invisible until A2.** Node manager keeps per-condition state records (`SnapshotConditions` bounded per `Lock` hold, start cursor + apply generation; deltas into `ConditionStateHub`; `snapshot_complete` = clean apply + Primary) and `state_known`: native conditions become known only on the driver's new `IAlarmInitialStateSignal` (Galaxy sentinel, OpcUaClient RefreshEnd with `SequentialPublishing`, FOCAS/AbCip/Heidenhain per-device tick, MTConnect baseline/delta), withdrawn on every connectivity edge; scripted only after the first completed evaluation (`OnInputsEstablished`); F5 `ConditionKnownSignalTimeout` (120 s) diagnostic; OpcUaClient-without-refresh backstop. Invariant: a consumer is never told known-inactive while the origin is active. Placements per realm, `condition_key` = HMAC with per-cluster `DataConnections:ConditionKeySecret` (realm byte in the input; missing secret = feature off), `c1.` ids in `https://zb.com/otopcua/mapped/conditions`. L4 measured OpcUaClient/FOCAS/MTConnect/AbCip(sim) p99 ≤1.4 s; Galaxy (VPN) and Heidenhain (no fixture) blocked → lmxopcua#924. Follow-ups lmxopcua#925 (Galaxy deploy-added conditions wait for stream reopen), #926 (OpcUaClient RefreshEnd over lost events). Two Fable review rounds. Not deployed. ScadaBridge impact: none yet.
- **gRPC data A2 merged (2026-11-24, `83c7e586`) — alarm/condition forwarding wire.** Proto: `conditions` feature (field 17), `condition_scope`, Subscribe arm `condition_states`, 8th RPC `CallConditionMethod`; `DataOperations` bits 64 AlarmSubscribe / 128 AlarmAcknowledge / 256 AlarmConfirm (512 Shelve reserved); migration `AddDataConnectionConditions` (`AllowGalaxyServiceAck`, `ConditionMethodTimeoutMilliseconds`). Origin streams condition snapshots + deltas (readiness = withheld `snapshot_complete`; a deploy ENDS the condition stream, consumer re-snapshots); one condition item per root, per-stream cap 32, snapshots charged to the principal's snapshot budget, full queue back-pressures, UNS listings carry the effective name (no RawPath leak). Remote Ack/Confirm/AddComment: Primary-only, idempotent by operation id (per-principal registry cap 256 + global 4096), exception after dispatch ⇒ `OutcomeUnknown`, audited on the `…DataConnections.Audit` category with sanitised caller strings, monotonic activation sequence (stale ack to a re-created condition refused), 5 s bounded Lock wait. v1 goldens unchanged; live `conditions_smoke` PASS. Consumer-side materialisation is A3; follow-up #927 (live driver-failure ack revert gate). Undeployed.
- **gRPC data A3 merged (2026-11-24, `91438049`) — consumer side of alarm/condition forwarding.** Imported conditions materialise on the consumer in `https://zb.com/otopcua/mapped/conditions` (`c1.` ids, classified before `RealmOf`) via `ProjectedConditionRegistry` + `ProjectedConditionAccess` (one Primary-only condition stream per connection, demand-driven with 30 s linger, snapshot barrier, re-snapshot buffered and swapped at `snapshot_complete`, stream end ⇒ re-snapshot never removal, incomplete ⇒ `BadNoCommunication` + RefreshRequired, node-wide memory ledger `BytesPerCondition` 160,000 / cap 400 MB, `MaxConditions` per mapping). Events at projected folders and `i=2253`, gated by the mapping grant even with ACLs off (`ProjectedEventFieldList` marker; never returned to the SDK event-list pool — that reuse dropped other sessions' RefreshEnd events, found by an intermittent test). Acknowledge/Confirm/AddComment dispatched to the origin through `ICallAsyncNodeManager.CallAsync`, never under `Lock` (L3: Read ≤ 2.3 ms with origin stalled 5 s); per-local-caller grant re-check; 8 in flight per node, 4 per connection; no local apply before the origin record; unknown EventId ⇒ `BadEventIdUnknown` unsent. L2 1,000 conditions worst case +106 MiB heap / +151 MiB WS (old `GetTotalMemory` figures inflated, #929). Imported conditions stay off `/alerts` and alarm history. Follow-ups #927–#931. Not fleet-deployable until A4. Undeployed.
- **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` = `<branch>/<origin 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.