Commit Graph

1567 Commits

Author SHA1 Message Date
Joseph Doherty ca2698949b refactor(adminui): delete alias-tag/relay-converter files (build red until spine stripped) 2026-06-12 21:20:41 -04:00
Joseph Doherty e2c6c15ae0 feat(opcua): remove SystemPlatform mirror producer + Galaxy exception from Phase7Composer 2026-06-12 21:17:39 -04:00
Joseph Doherty 47cb5725a9 docs(galaxy): retire alias/SystemPlatform model — Galaxy tags are standard equipment tags 2026-06-12 21:17:30 -04:00
Joseph Doherty 499c9b9165 feat(validation): allow GalaxyMxGateway under Equipment; rename Galaxy-tag FullName check 2026-06-12 21:11:06 -04:00
Joseph Doherty 1c4052ee83 docs(galaxy): Phase A implementation plan (Galaxy standard driver)
18-task plan to make GalaxyMxGateway an Equipment-kind driver: retire the
SystemPlatform NamespaceKind split + mirror + alias/relay machinery, author
Galaxy points as ordinary equipment tags via the standard TagModal. Mostly
deletion + a single EF migration dropping the per-kind unique constraint.
Phases B (native alarms) + C (server historian) remain out of scope.
Co-located .tasks.json for resume.
2026-06-12 21:05:45 -04:00
Joseph Doherty 91cb907633 docs(galaxy): design — Galaxy as a standard Equipment driver
Brainstorming-approved design to normalize GalaxyMxGateway into the standard
Equipment-driver model: retire the SystemPlatform/Equipment namespace split +
the SystemPlatform mirror + the alias-tag/relay machinery, author Galaxy points
as ordinary equipment tags, port native IAlarmSource alarms onto the
equipment-tag materialization path, and add a driver-agnostic server-side
HistoryRead backend (over the existing Wonderware Historian reader). Three
phases (A de-split + UI, B native alarms, C historian); clean break, no
migration converter; one EF migration to drop NamespaceKind.
2026-06-12 20:55:08 -04:00
Joseph Doherty db2e4777dd fix(historian-sidecar): close active TCP client on cancel so RunAsync unwinds
v2-ci / build (push) Failing after 33s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
The net48 sidecar's TcpFrameServer.RunOneConnectionAsync registered the
cancellation token to Stop() only the listener (to unblock a parked
AcceptTcpClientAsync), but never closed the active client. On net48
NetworkStream.ReadAsync ignores the CancellationToken, so while the frame
loop is parked reading an idle connected client, cancelling the token cannot
unblock it — only closing the socket can. RunAsync therefore never returned
on Ctrl-C/service-stop while a connection was open (Program.Main's
RunAsync().GetAwaiter().GetResult() would hang until NSSM force-killed).

Register the cancel to Close() the active client, and convert the resulting
cancel-time read/handshake exception to OperationCanceledException so RunAsync
unwinds cleanly without logging it as a connection failure or counting it
toward MaxConsecutiveFailures.

Caught by the first-ever net48 execution of TcpRoundTripTests on the Windows
VM (these only compile on macOS): SingleActive_SecondClientHelloCompletesOnly
AfterFirstCloses deadlocked in teardown. Full net48 historian suite now green
(122 passed, 0 failed, 2 skipped); all 6 TcpRoundTrip tests pass.
2026-06-12 13:34:45 -04:00
Joseph Doherty 6218512365 fix(historian-sidecar): don't wedge the TCP listener when Start() bind fails
v2-ci / build (push) Failing after 46s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Live verification on a Windows VM surfaced a crash loop: TcpFrameServer.EnsureListening
assigned _listener = new TcpListener(...) BEFORE calling Start(). When Start() throws —
e.g. the port is in a Windows excluded/reserved range (WSAEACCES) or already in use — the
field was left non-null-but-unstarted, so the `if (_listener is not null) return` guard
permanently skipped re-Start() and every subsequent AcceptTcpClientAsync() threw the
misleading InvalidOperationException "Not listening" → 20 failures → exit 2 → NSSM restart
→ loop. Now _listener is assigned only after Start() succeeds, so a transient bind failure
is retried and a permanent one surfaces the real bind error each iteration. Adds a
regression test that forces a bind conflict and asserts the SocketException persists.
2026-06-12 13:02:22 -04:00
Joseph Doherty 1be06502c7 fix(historian): correct AlarmHistorian config-key refs in docs + install (review)
v2-ci / build (push) Failing after 43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
2026-06-12 12:25:13 -04:00
Joseph Doherty fcf84adbad fix(historian-client): cancellable TLS client handshake + default-fields test (review) 2026-06-12 12:13:04 -04:00
Joseph Doherty d4ecc9138f feat(adminui): historian TCP-connect probe + TLS form fields 2026-06-12 12:07:06 -04:00
Joseph Doherty 6d5fc35747 docs(historian): TCP transport 2026-06-12 12:02:50 -04:00
Joseph Doherty ce25581596 feat(install): historian TCP env + firewall rule
Replace OTOPCUA_HISTORIAN_PIPE/OTOPCUA_ALLOWED_SID with TCP transport
env (OTOPCUA_HISTORIAN_TCP_PORT, OTOPCUA_HISTORIAN_BIND,
OTOPCUA_HISTORIAN_TLS_ENABLED, OTOPCUA_HISTORIAN_TLS_CERT/PASSWORD)
in Install-Services.ps1; add idempotent Windows Firewall inbound rule
for the TCP port. Add new params for all TCP/TLS options with cert
provisioning guidance. Update Refresh-Services.ps1 Step 4b comment
(PipeServer → TcpFrameServer) and add a Step 5 note clarifying that
TCP/TLS env is set at install time, not on refresh.
2026-06-12 12:02:26 -04:00
Joseph Doherty e2960515cf chore(historian): drop dead pipe package ref + stale pipe strings (review) 2026-06-12 12:02:05 -04:00
Joseph Doherty 72f32045a4 refactor(historian): remove named-pipe transport 2026-06-12 11:51:53 -04:00
Joseph Doherty 6104eaba60 test(historian-client): TCP-ify FakeSidecarServer + client tests 2026-06-12 11:46:47 -04:00
Joseph Doherty ac12633087 feat(historian-client): default ctor dials TCP 2026-06-12 11:37:42 -04:00
Joseph Doherty 706077f02f feat(historian-sidecar): TCP bootstrap + env, drop allowed-SID 2026-06-12 11:34:06 -04:00
Joseph Doherty 999e58c605 fix(historian-sidecar): cancel SocketException guard + version-reject log + TLS test (review) 2026-06-12 11:31:04 -04:00
Joseph Doherty fd4d05534e fix(historian-client): dispose TcpClient/SslStream on connect+TLS failure (review) 2026-06-12 11:30:39 -04:00
Joseph Doherty 6e152047eb feat(historian-client): TCP connect factory + FrameChannel rename 2026-06-12 11:21:28 -04:00
Joseph Doherty 7ce7505a36 feat(historian-host): bind TCP host/port/tls config 2026-06-12 11:19:46 -04:00
Joseph Doherty 3528702185 feat(historian-sidecar): TcpFrameServer (TCP + optional TLS) 2026-06-12 11:16:28 -04:00
Joseph Doherty 35ac0b8c4e feat(historian-client): add TCP/TLS options fields 2026-06-12 11:14:36 -04:00
Joseph Doherty eb6a71abf2 docs(historian): implementation plan for sidecar TCP transport 2026-06-12 11:10:41 -04:00
Joseph Doherty 3d3f8a47a9 docs(historian): design for sidecar TCP transport (replace named pipe) 2026-06-12 11:03:32 -04:00
Joseph Doherty c6edef0efb fix(install): assert Wonderware sidecar deploy is complete in Refresh-Services
v2-ci / build (push) Failing after 37s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Add a post-publish Step 4b that fails the refresh if the sidecar deploy
folder is missing any load-bearing file (System.Memory.dll, MessagePack.dll,
the .exe, or the net48 binding-redirect .exe.config). A partial/stale deploy
that bypasses `dotnet publish` drops System.Memory.dll, so the sidecar
JIT-load-faults in PipeServer.RunOneConnectionAsync (FileNotFoundException
'System.Memory, Version=4.0.1.2') and NSSM crash-loops it (exit 2 every
~2 min). Catching this at publish time beats discovering it as a production
crash-loop. Guarded by -WhatIf; throws before any service is started.
2026-06-12 09:41:51 -04:00
Joseph Doherty 57355405a6 chore(security): drop dead audit suppressions; patch OpenTelemetry + Tmds.DBus CVEs
All five suppressed advisories are now resolved at baseline/resolved versions,
so every NuGetAuditSuppress is removed repo-wide:
- System.Security.Cryptography.Xml (GHSA-37gx-xxp4-5rgx / GHSA-w3x6-4m5h-cxqf)
  -> fixed by the .NET 10 baseline (10.0.6)
- OPCFoundation Opc.Ua.Core (GHSA-h958-fxgg-g7w3) -> fixed at resolved 1.5.378.106

Two were still live and are now patched via direct security pins:
- OpenTelemetry.Api 1.9.0 -> 1.15.3 (GHSA-g94r-2vxg-569j) pinned in Cluster;
  Runtime/ControlPlane/AdminUI + tests inherit via project reference
- Tmds.DBus.Protocol 0.20.0 -> 0.21.3 (GHSA-xrw6-gwf8-vvr9) pinned in Client.UI

Also correct the Historian sidecar runtime comments (x86 -> x64, matching the
csproj PlatformTarget). Solution audit: 0 vulnerable packages; full build clean.
2026-06-12 09:03:42 -04:00
Joseph Doherty dc9abf674b fix(deps): bump MessagePack 2.5.187 -> 2.5.301 (CVE-2026-48109 / GHSA-hv8m-jj95-wg3x)
v2-ci / build (push) Failing after 33s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
LZ4-decompression out-of-bounds read in MessagePack < 2.5.301 (transitive
via the Historian.Wonderware driver). 2.5.301 is the patched v2-series
release; stays on v2 (no v3 major bump). Restore no longer fails NU1903.
2026-06-12 08:04:04 -04:00
Joseph Doherty 8406349a27 chore(plan): mark alias-tag tasks T0–T10 complete 2026-06-12 07:55:54 -04:00
Joseph Doherty e77fd3eec0 fix(adminui): converter UI — try/catch + confirm + FleetAdmin gate on per-equipment convert (review) 2026-06-11 21:54:21 -04:00
Joseph Doherty 7682d185fb feat(adminui): relay->alias converter UI (per-equipment + fleet-wide /uns/convert-relays) 2026-06-11 21:49:43 -04:00
Joseph Doherty 299eaa461c fix(adminui): gate Galaxy picker so it doesn't clobber alias FullName on edit; refresh gateways (review) 2026-06-11 21:45:55 -04:00
Joseph Doherty d19271fff8 fix(adminui): converter skips name-collisions + disabled relays (review) 2026-06-11 21:44:19 -04:00
Joseph Doherty 2a30d7185a docs: Galaxy alias tags + relay converter (Uns.md, CLAUDE.md) 2026-06-11 21:39:12 -04:00
Joseph Doherty 4af27ea173 feat(adminui): AliasTagModal + Tags-tab Add-alias (Galaxy picker) 2026-06-11 21:37:04 -04:00
Joseph Doherty 943bc5f709 feat(adminui): ConvertRelayVirtualTagsToAliasesAsync (relay VTag -> alias Tag) 2026-06-11 21:32:43 -04:00
Joseph Doherty fe068652b3 fix(adminui): alias update pins invariants + LoadAliasTagAsync + null-driver guard (review) 2026-06-11 21:25:06 -04:00
Joseph Doherty 9f13101896 feat(validation): require TagConfig.FullName on Galaxy alias tags; reframe Tag doc 2026-06-11 21:21:32 -04:00
Joseph Doherty 53116bdd83 feat(adminui): CreateAliasTagAsync/UpdateAliasTagAsync + Galaxy-gateway guard 2026-06-11 21:17:45 -04:00
Joseph Doherty fcc73ccd2d fix(adminui): null Source for alias rows without a FullName (review nits) 2026-06-11 21:12:52 -04:00
Joseph Doherty bc9e83ed9f feat(composer): admit GalaxyMxGateway-backed equipment alias tags (+byte-parity) 2026-06-11 21:10:21 -04:00
Joseph Doherty 4b4738a891 feat(adminui): alias DTO + Galaxy gateway lookup + Source/IsAlias on tag rows 2026-06-11 21:05:02 -04:00
Joseph Doherty 2ba2f8a899 feat(commons): TryParseRelayBody — detect pure ctx.GetTag relay scripts 2026-06-11 20:59:10 -04:00
Joseph Doherty 93a9c6d3db docs(plan): Galaxy alias tag implementation plan (T0–T10)
11-task TDD plan from the approved alias-tag design. Approach A (reuse
Tag entity, broaden composer/artifact equipment-tag filter); converter
rewrites relay VirtualTags as alias Tags. No entity/EF migration.
2026-06-11 20:31:17 -04:00
Joseph Doherty 305023aa9f docs(design): Galaxy alias tag (UNS) — approved brainstorming design
Equipment exposes a Galaxy attribute under a friendly UNS name as a
first-class driver-bound Tag (alias) instead of a relay VirtualTag.
Approach A: reuse the Tag entity, broaden the equipment-tag filter to
admit GalaxyMxGateway-backed equipment tags; no entity/EF migration.
Includes a relay->alias converter (per-equipment + fleet-wide).
2026-06-11 20:22:32 -04:00
Joseph Doherty 909e0e3664 chore(uns): mark equipment-page plan complete (live-verified + merged)
v2-ci / build (push) Failing after 47s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
2026-06-11 15:42:38 -04:00
Joseph Doherty d77124b191 chore(uns): mark plan tasks T0–T10 complete (resume snapshot) 2026-06-11 15:24:30 -04:00
Joseph Doherty 80b19d6fc8 chore(uns): create-redirect null guard + alarm isolation test + alarm-authoring doc (final review) 2026-06-11 15:23:06 -04:00
Joseph Doherty a0f3f4ab89 docs(uns): document the equipment page tabs; repoint alarm-editing surface
Update Uns.md to show Equipment as a leaf in the browse tree (Area → Line →
Equipment), add the /uns/equipment/{id} page with its Details/Tags/Virtual
Tags/Alarms tabs, and adjust the actions table and sub-sections accordingly.
ScriptedAlarms.md and AlarmTracking.md required no changes — neither
referenced the standalone /scripted-alarms editing page.
2026-06-11 15:14:09 -04:00