The previous #1026 commit left one failure: on a fresh rig (s1026-h run 1) only 852 of 1888 large-mapping items recovered after the SOURCE restart; the rest stayed BadUserAccessDenied because every renewal failed in the catalog cache's bound of one retained predecessor per node (RenewalFail.Cache.PredecessorChain 81 163). Cause: a renewal interrupted mid-cycle. The demand had rebound onto the successor S (RenewedEvent) but the stream ended before S's baseline reached the node's SourceState, so the idle source still served (and pinned) the predecessor P. Once both leases lapsed, every between-attempt renewal of S needed P unpinned (P retired+pinned, S pinned, new = 3 > 2), and nothing ever released the idle source: its pins go only when GetSource replaces an invalid source, which needs a valid demand, which needs the renewal. An origin restart does this to every batch in flight (~1000 items here). Fix: between attempts, before renewing, retire an idle source whose own proof lapsed AND is no longer the node's current proof (it fell behind its demands), exactly as GetSource retires an invalid source; the next attempt creates a fresh one. A source that is on the node's current proof keeps its overlap predecessor (expired-overlap recovery parking relies on it: releasing it broke Two_cadences_release_expired_overlap_without_borrowing_witnesses_during_failover). Diagnostics: catalog pins carry a holder kind (demand/read/binding/source/parked); a refused chain counts RenewalFail.Chain.<role>.<holder>. Commit-closure failures are split (Canceled/Deadline/Fence/Cache), the cache's own refusals named (RenewalFail.Cache.<reason>). Test: A_renewal_interrupted_before_the_successor_baseline_still_recovers_after_both_leases_lapse (holds the rebind's remove ack, lets both leases lapse; never recovers without the fix). Live (OrbStack rig s1026-j, fresh, 160 + 1888 items, 4 Hz churn, SOURCE pair restart), three consecutive gate runs: PASS / PASS / PASS. Open 10.2 / 10.7 / 3.1 s, post-restart recovery 1.54 / 1.52 / 1.54 s, consumer Reset / ResetHistory / ResetSourceInvalidated / ResetInterestLost deltas 0 in every run, no history-expired or source-invalidated log line, origin invalidations 0 (only InterestHistoryGap catch-ups). Co-Authored-By: Claude <noreply@anthropic.com>
OtOpcUa documentation
Two tiers of documentation live here:
- Current reference at the top level (
docs/*.md,docs/drivers/*.md) — describes what's shipped today. Start here for operator + integrator reference. - Implementation history + design notes at
docs/v2/*.mdanddocs/plans/*.md— the plan, decision log and dated design/implementation plans the current reference is built from. Start here when you need the why behind an architectural choice.
Open work is tracked in Gitea issues on dohertj2/lmxopcua, not in these docs.
The project was originally called LmxOpcUa (a single-driver Galaxy/MXAccess OPC UA server) and has since become OtOpcUa, a multi-driver OPC UA server platform. Any lingering LmxOpcUa-string in a path you see in docs is a deliberate residual (executable name lmxopcua-cli, client PKI folder {LocalAppData}/LmxOpcUaClient/) — fixing those requires migration shims + is tracked as follow-ups.
Platform overview
- Host (
src/Server/ZB.MOM.WW.OtOpcUa.Host) is the single fused binary (.NET 10, AnyCPU). Its resolved roles (Cluster:Roles, elseOTOPCUA_ROLES) decide what to mount:admin(AdminUI + control-plane singletons),driver(OPC UA endpoint + per-node driver actors), or both. See ServiceHosting.md and v2/Architecture-v2.md. - Address space has two namespaces: Raw (
https://zb.com/otopcua/raw, the/rawFolder → Driver → Device → TagGroup → Tag tree,s=<RawPath>) and UNS (https://zb.com/otopcua/uns, Area → Line → Equipment → signal). Every value has one source — its Raw tag — and UNS equipment variables reference and mirror it. See Raw.md and Uns.md. - Clusters. Each cluster is a 2-node Akka.NET pair with an elected Primary. The central (admin) cluster and site (driver) clusters talk over a gRPC mesh with per-cluster PSKs; driver-only nodes can run without a ConfigDb, fed by the config mesh. See Redundancy.md, v2/Cluster.md, v2/ControlPlane.md and v2/Runtime.md.
- Data connections. Nodes and clusters can map each other's Raw/UNS branches over a dedicated TLS gRPC service for browse, read, write and subscribe. See DataConnections.md.
- Core owns shared abstractions (driver capability contracts, scripting, virtual tags, scripted alarms, alarm historian).
- Drivers plug in via capability interfaces in
ZB.MOM.WW.OtOpcUa.Core.Abstractions(IDriver,IReadable,IWritable,ITagDiscovery,ISubscribable,IHostConnectivityProbe,IAlarmSource,IRediscoverable,IPerCallHostResolver, …); each opts into what it supports. The Galaxy driver reaches MXAccess via gRPC to the separately installed mxaccessgw gateway (sibling repo). - History is server-side and pluggable:
ServerHistorian:Backend=Gateway(default, AVEVA Historian via HistorianGateway),SqlServerorQuestDb. See Historian.md.
Where to find what
Architecture + data-path reference
| Doc | Covers |
|---|---|
| OpcUaServer.md | Top-level server architecture — Core, driver dispatch, Config DB, generations |
| AddressSpace.md | Address-space composition and the node manager |
| Raw.md | The /raw device tree — authoring, CSV import/export, browse-commit, Calculation pseudo-driver |
| Uns.md | The global /uns tree — Area/Line/Equipment, reference-only equipment tags, effective names, UNS namespace |
| ReadWriteOperations.md | OPC UA Read/Write → CapabilityInvoker → IReadable/IWritable |
| IncrementalSync.md | Address-space updates on redeploy — surgical deltas vs. rebuild |
| DriverLifecycle.md | Server-side driver lifecycle + infrastructure contracts (IDriverFactory, IDriverProbe, IDriverHealthPublisher, IDriverConfigEditor, IHistorianDataSource) + the Commons library |
| DataConnections.md | gRPC data connections — directional node/cluster connections, Raw/UNS branch projection, TLS + scoped credentials, primary routing, admission limits, recovery |
| Telemetry.md | Live telemetry transport feeding the AdminUI's alerts / script-log / hosts panels |
Scripting, alarms + history
| Doc | Covers |
|---|---|
| VirtualTags.md | Core.Scripting + Core.VirtualTags — Roslyn script sandbox, dispatch alongside driver tags, out-of-process script runner |
| ScriptEditor.md | Monaco script editor — Roslyn-backed IntelliSense; AdminUI/ScriptAnalysis/ backend; {{equip}} paths |
| ScriptedAlarms.md | Core.ScriptedAlarms — script-predicate IAlarmSource + Part 9 state machine |
| AlarmTracking.md | IAlarmSource + AlarmSurfaceInvoker + OPC UA alarm conditions — native driver alarms end-to-end |
| AlarmHistorian.md | Core.AlarmHistorian store-and-forward sink — LocalDbStoreAndForwardSink, the replicated alarm_sf_events buffer + Primary-only drain, dead-letter/retry/eviction |
| Historian.md | HistoryRead / HistoryUpdate, alarm history and continuous historization across the Gateway / SqlServer / QuestDb backends |
One Core subsystem is shipped without a dedicated top-level doc:
| Project | See |
|---|---|
Analyzers (Roslyn OTOPCUA0001) |
security.md § OTOPCUA0001 Analyzer |
Drivers
| Doc | Covers |
|---|---|
| drivers/README.md | Driver index + capability matrix |
| drivers/Galaxy.md | AVEVA System Platform Galaxy — in-process gRPC client to the mxaccessgw gateway |
| drivers/Modbus.md | Modbus TCP / RTU-over-TCP (incl. DL205 addressing) |
| drivers/S7.md | Siemens S7 |
| drivers/AbCip.md | Allen-Bradley CIP — ControlLogix / CompactLogix |
| drivers/AbLegacy.md | Allen-Bradley Legacy — SLC 500 / MicroLogix (PCCC) |
| drivers/TwinCAT.md | Beckhoff TwinCAT (ADS) |
| drivers/FOCAS.md | FANUC FOCAS/2 CNC |
| drivers/Heidenhain.md | Heidenhain LSV2 (read-only) |
| drivers/OpcUaClient.md | OPC UA Client — gateway/aggregation driver |
| drivers/Mqtt.md | MQTT — plain JSON topics + Sparkplug B |
| drivers/MTConnect.md | MTConnect Agent (read-only) |
| drivers/Sql.md | SQL poll — SQL Server / Postgres / Oracle / MySQL / ODBC |
| drivers/Calculation.md | Calculation pseudo-driver — script-computed tags from other RawPaths |
| drivers/TestConnectProbes.md | AdminUI Test-connect probes |
| drivers/Historian.Wonderware.md | Retired Wonderware historian sidecar (historical) |
| v2/driver-specs.md | Per-driver addressing + quirks (design reference) |
| v2/Galaxy.ParityRig.md · v2/Galaxy.ParityMatrix.md · v2/Galaxy.Performance.md | Galaxy gateway setup, parity matrix, tracing/metrics/soak |
Integration-test fixtures: Modbus · S7 · AB server · AbLegacy · TwinCAT · FOCAS · OpcUaClient · MQTT. The full infra index is ../infra/README.md.
Operational
| Doc | Covers |
|---|---|
| Configuration.md | Live appsettings + environment-variable reference |
| ServiceHosting.md | Single fused OtOpcUa.Host binary install/uninstall with role gating, Traefik, script-worker isolation |
| security.md | Transport security profiles, LDAP (AdminUI), data-plane API keys, ACLs, role grants, OTOPCUA0001 analyzer |
| Redundancy.md | RedundancyStateActor, ServiceLevelCalculator, per-cluster meshes, deploy acks, Prometheus metrics |
| Reservations.md | Fleet-wide ZTag / SAPID uniqueness — authoring check, deploy gate, unique indexes (reservation ledger retired, #1049) |
| v2/admin-ui.md | AdminUI spec |
| StatusDashboard.md | Pointer — superseded by v2/admin-ui.md |
| ui-consistency-validation.md | Shared UI consistency validation record (2026-11) |
| v2/dev-environment.md | Dev-box bootstrap + endpoint inventory |
| v2/upgrade-preflight.md | otopcua-preflight — read-only pre-upgrade ConfigDb check (migration pre-checks, deploy gate, script gate) |
| v2/redundancy-interop-playbook.md | Redundancy interop playbook |
Client tooling
| Doc | Covers |
|---|---|
| Client.CLI.md | otopcua-cli — OPC UA command-line client |
| Client.UI.md | Avalonia desktop client |
| DriverClis.md | Driver test-client CLIs — index + shared commands |
| Driver.Modbus.Cli.md | otopcua-modbus-cli — Modbus-TCP |
| Driver.AbCip.Cli.md | otopcua-abcip-cli — ControlLogix / CompactLogix / Micro800 / GuardLogix |
| Driver.AbLegacy.Cli.md | otopcua-ablegacy-cli — SLC / MicroLogix / PLC-5 (PCCC) |
| Driver.S7.Cli.md | otopcua-s7-cli — Siemens S7-300 / S7-400 / S7-1200 / S7-1500 |
| Driver.TwinCAT.Cli.md | otopcua-twincat-cli — Beckhoff TwinCAT 2/3 ADS |
| Driver.FOCAS.Cli.md | otopcua-focas-cli — Fanuc FOCAS/2 CNC |
Requirements
| Doc | Covers |
|---|---|
| reqs/HighLevelReqs.md | HLRs — numbered system-level requirements |
| reqs/OpcUaServerReqs.md | OPC UA server-layer reqs |
| reqs/ClientRequirements.md | Client CLI + UI reqs |
| reqs/StatusDashboardReqs.md | Pointer — superseded by Admin UI |
| v1/reqs/ServiceHostReqs.md | Per-process hosting reqs (v1 archive) |
| v1/reqs/GalaxyRepositoryReqs.md | Galaxy repository reqs (v1 archive — owned by mxaccessgw today) |
| v1/reqs/MxAccessClientReqs.md | MXAccess reqs (v1 archive — owned by mxaccessgw today) |
Implementation history (docs/v2/, docs/plans/)
Design decisions, phase plans and execution notes. docs/plans/ holds the dated design + implementation plans (with live-gate records under docs/plans/evidence/); docs/v2/ holds the v2 plan and component notes:
- v2/plan.md — authoritative v2 vision doc + numbered decision log (referenced as "decision #N" elsewhere)
- v2/Architecture-v2.md — single-page tour of the v2 layout
- v2/Cluster.md · v2/ControlPlane.md · v2/Runtime.md — cluster bootstrap, admin singletons, driver-role actor tree
- v2/admin-ui.md — Admin UI spec (v2/AdminUI-rebuild-plan.md — rebuild plan)
- v2/acl-design.md — data-plane ACL + permission-trie design
- v2/config-db-schema.md — Config DB schema reference
- v2/driver-specs.md · v2/driver-stability.md — per-driver addressing + quirks; driver stability-tier design (tiers are not active)
- Protocol notes: v2/modbus-addressing.md · v2/modbus-test-plan.md · v2/dl205.md · v2/s7.md · v2/focas-version-matrix.md · v2/mitsubishi.md · v2/aveva-system-platform-io-research.md · v2/f14b-part9-sdk-notes.md
- v2/test-data-sources.md — integration-test simulator matrix (includes the pinned libplctag
ab_serverversion for AB CIP tests) - v2/multi-host-dispatch.md — per-PLC circuit breakers (decision #144)
- v2/v2-release-readiness.md — release-readiness tracker
- v2/phase-7-status.md — Phase 7 reconciliation
- v2/implementation/ — per-phase execution plans with exit-gate evidence
v1 archive
The v1 in-process MXAccess architecture (Galaxy.Host + Galaxy.Proxy + Galaxy.Shared, .NET 4.8 x86 COM, the OtOpcUaGalaxyHost Windows service) was retired in PR 7.2 (2026-04-30, commit ae7106d). Docs that described that shape are kept under v1/ as historical record — see v1/README.md and v2/V1_ARCHIVE_STATUS.md. Notable archived write-ups: v1/Subscriptions.md, v1/AlarmTracking.md, v1/DataTypeMapping.md, v1/HistoricalDataAccess.md, v1/Configuration.md, v1/drivers/Galaxy-Repository.md.