E2E test script — Galaxy (MXAccess) driver: read / write / subscribe / alarms / history #224

Closed
dohertj2 wants to merge 2 commits from task-galaxy-e2e into v2
Owner

Seven-stage e2e script covering every Galaxy-specific capability surface: IReadable + IWritable + ISubscribable + IAlarmSource + IHistoryProvider. Unlike the other drivers there is no per-protocol CLI — Galaxy's proxy lives in-process with the server + talks to OtOpcUaGalaxyHost over a named pipe (MXAccess COM is 32-bit-only), so every stage runs through otopcua-cli against the published OPC UA address space.

Stages

  1. Probeotopcua-cli read on the source NodeId; success proves the whole pipe → proxy → server → client chain is up.
  2. Source read — capture value for downstream comparison.
  3. Virtual-tag bridge — Phase 7 VirtualTag (source × 2) through CachedTagUpstreamSource — the seam most likely to silently stop working.
  4. Subscribe-sees-change — data-change events propagate.
  5. Reverse bridge — OPC UA write → Galaxy, read-back. Soft-passes if the attribute's Galaxy-side ACL forbids writes (BadUserAccessDenied / BadNotWritable) — not every Galaxy attribute is writable for an anonymous session.
  6. Alarm fires — scripted-alarm Condition fires with Active state when source crosses the seeded threshold (> 50).
  7. History readhistoryread returns samples from the Aveva Historian → IHistoryProvider dispatch path.

Two new helpers in _common.ps1

  • Test-AlarmFiresOnThreshold — starts otopcua-cli alarms --refresh in the background on a Condition NodeId, drives the source change, asserts captured stdout contains both ALARM and Active. Same Start-Process + temp-file pattern as Test-SubscribeSeesChange since the alarms command runs until Ctrl+C.
  • Test-HistoryHasSamples — calls otopcua-cli historyread over a configurable lookback window, parses the N values returned. marker, fails below MinSamples. Works for driver-sourced, virtual, or scripted-alarm historized nodes.

Wiring

  • test-all.ps1 picks up an optional galaxy sidecar section and runs the script with configured NodeIds + wait windows.
  • e2e-config.sample.json adds a galaxy section seeded with Phase 7 defaults (p7-smoke-tag-source / -vt-derived / -al-overtemp) — matches scripts/smoke/seed-phase-7-smoke.sql.
  • scripts/e2e/README.md expected-matrix gains a Galaxy row.

Prereqs

  • OtOpcUaGalaxyHost running (NSSM-wrapped) with the Galaxy + MXAccess runtime available
  • seed-phase-7-smoke.sql applied with a live Galaxy attribute substituted into dbo.Tag.TagConfig
  • OtOpcUa server running against the p7-smoke cluster
  • Non-elevated shell (Galaxy.Host pipe ACL denies Admins)

Test plan

  • All e2e scripts parse cleanly (PS7 ?? + -AsHashtable paths unchanged)
  • BOMs preserved on every .ps1
  • Live 7/7 run against a seeded Galaxy — deferred; bring-up needs a real attribute substituted into the seed + server boot with the p7-smoke cluster
Seven-stage e2e script covering every Galaxy-specific capability surface: IReadable + IWritable + ISubscribable + IAlarmSource + IHistoryProvider. Unlike the other drivers there is no per-protocol CLI — Galaxy's proxy lives in-process with the server + talks to OtOpcUaGalaxyHost over a named pipe (MXAccess COM is 32-bit-only), so every stage runs through `otopcua-cli` against the published OPC UA address space. ## Stages 1. **Probe** — `otopcua-cli read` on the source NodeId; success proves the whole pipe → proxy → server → client chain is up. 2. **Source read** — capture value for downstream comparison. 3. **Virtual-tag bridge** — Phase 7 VirtualTag (source × 2) through `CachedTagUpstreamSource` — the seam most likely to silently stop working. 4. **Subscribe-sees-change** — data-change events propagate. 5. **Reverse bridge** — OPC UA write → Galaxy, read-back. Soft-passes if the attribute's Galaxy-side ACL forbids writes (`BadUserAccessDenied` / `BadNotWritable`) — not every Galaxy attribute is writable for an anonymous session. 6. **Alarm fires** — scripted-alarm Condition fires with `Active` state when source crosses the seeded threshold (> 50). 7. **History read** — `historyread` returns samples from the Aveva Historian → `IHistoryProvider` dispatch path. ## Two new helpers in `_common.ps1` - **`Test-AlarmFiresOnThreshold`** — starts `otopcua-cli alarms --refresh` in the background on a Condition NodeId, drives the source change, asserts captured stdout contains both `ALARM` and `Active`. Same Start-Process + temp-file pattern as `Test-SubscribeSeesChange` since the alarms command runs until Ctrl+C. - **`Test-HistoryHasSamples`** — calls `otopcua-cli historyread` over a configurable lookback window, parses the `N values returned.` marker, fails below `MinSamples`. Works for driver-sourced, virtual, or scripted-alarm historized nodes. ## Wiring - `test-all.ps1` picks up an optional `galaxy` sidecar section and runs the script with configured NodeIds + wait windows. - `e2e-config.sample.json` adds a `galaxy` section seeded with Phase 7 defaults (`p7-smoke-tag-source` / `-vt-derived` / `-al-overtemp`) — matches `scripts/smoke/seed-phase-7-smoke.sql`. - `scripts/e2e/README.md` expected-matrix gains a Galaxy row. ## Prereqs - OtOpcUaGalaxyHost running (NSSM-wrapped) with the Galaxy + MXAccess runtime available - `seed-phase-7-smoke.sql` applied with a live Galaxy attribute substituted into `dbo.Tag.TagConfig` - OtOpcUa server running against the `p7-smoke` cluster - Non-elevated shell (Galaxy.Host pipe ACL denies Admins) ## Test plan - [x] All e2e scripts parse cleanly (PS7 `??` + `-AsHashtable` paths unchanged) - [x] BOMs preserved on every .ps1 - [ ] Live 7/7 run against a seeded Galaxy — deferred; bring-up needs a real attribute substituted into the seed + server boot with the `p7-smoke` cluster
dohertj2 added 1 commit 2026-04-21 13:01:14 -04:00
Seven-stage e2e script covering every Galaxy-specific capability surface:
IReadable + IWritable + ISubscribable + IAlarmSource + IHistoryProvider.
Unlike the other drivers there is no per-protocol CLI — Galaxy's proxy
lives in-process with the server + talks to OtOpcUaGalaxyHost over a
named pipe (MXAccess COM is 32-bit-only), so every stage runs through
`otopcua-cli` against the published OPC UA address space.

## Stages

1. Probe                   — otopcua-cli read on the source NodeId
2. Source read             — capture value for downstream comparison
3. Virtual-tag bridge      — Phase 7 VirtualTag (source × 2) through
                             CachedTagUpstreamSource
4. Subscribe-sees-change   — data-change events propagate
5. Reverse bridge          — opc-ua write → Galaxy; soft-passes if the
                             attribute's Galaxy-side ACL forbids writes
                             (`BadUserAccessDenied` / `BadNotWritable`)
6. Alarm fires             — scripted-alarm Condition fires with Active
                             state when source crosses threshold
7. History read            — historyread returns samples from the Aveva
                             Historian → IHistoryProvider path

## Two new helpers in _common.ps1

- `Test-AlarmFiresOnThreshold` — start `otopcua-cli alarms --refresh`
  in the background on a Condition NodeId, drive the source change,
  assert captured stdout contains `ALARM` + `Active`. Uses the same
  Start-Process + temp-file pattern as `Test-SubscribeSeesChange` since
  the alarms command runs until Ctrl+C (no built-in --duration).
- `Test-HistoryHasSamples` — call `otopcua-cli historyread` over a
  configurable lookback window, parse `N values returned.` marker, fail
  if below MinSamples. Works for driver-sourced, virtual, or scripted-
  alarm historized nodes.

## Wiring

- `test-all.ps1` picks up the optional `galaxy` sidecar section and
  runs the script with the configured NodeIds + wait windows.
- `e2e-config.sample.json` adds a `galaxy` section seeded with the
  Phase 7 defaults (`p7-smoke-tag-source` / `-vt-derived` /
  `-al-overtemp`) — matches `scripts/smoke/seed-phase-7-smoke.sql`.
- `scripts/e2e/README.md` expected-matrix gains a Galaxy row.

## Prereqs

- OtOpcUaGalaxyHost running (NSSM-wrapped) with the Galaxy + MXAccess
  runtime available
- `seed-phase-7-smoke.sql` applied with a live Galaxy attribute
  substituted into `dbo.Tag.TagConfig`
- OtOpcUa server running against the `p7-smoke` cluster
- Non-elevated shell (Galaxy.Host pipe ACL denies Admins)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 added 1 commit 2026-04-23 09:44:35 -04:00
Audit of docs/ against src/ surfaced shipped features without current-reference
coverage (FOCAS CLI, Core.Scripting+VirtualTags, Core.ScriptedAlarms,
Core.AlarmHistorian), an out-of-date driver count + capability matrix, ADR-002's
virtual-tag dispatch not reflected in data-path docs, broken cross-references,
and OpcUaServerReqs declaring OPC-020..022 that were never scoped. This commit
closes all of those so operators + integrators can stay inside docs/ without
falling back to v2/implementation/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 closed this pull request 2026-05-23 15:26:34 -04:00
dohertj2 deleted branch task-galaxy-e2e 2026-05-23 15:26:35 -04:00

Pull request closed

Sign in to join this conversation.