feat(server): route OPC UA Part 9 AddComment to ScriptedAlarmEngine

RouteScriptedAlarmMethodCalls now handles ConditionType.AddComment
alongside Acknowledge/Confirm, dispatching to engine.AddCommentAsync.
An empty comment is rejected by the Part 9 state machine and surfaced
as BadInvalidArgument. MapCallOperation gates AddComment at the
AlarmAcknowledge tier — there is no dedicated AddComment permission bit.

Closes phase-7-status.md Gap 1: all Part 9 alarm methods now route to
the engine. Adds 3 unit tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-05-18 09:43:03 -04:00
parent c5915700bd
commit 419eda256b
5 changed files with 87 additions and 12 deletions

View File

@@ -28,10 +28,11 @@ remains, plus follow-ups surfaced during the run.
`DriverNodeManager.MarkAsAlarmCondition` (scripted alarms get a shelvable
`ShelvedStateMachine` subtree created before `alarm.Create`). The three
per-instance shelve method NodeIds are indexed so the Call gate resolves
them to `OpcUaOperation.AlarmShelve`. Remaining: address-space
materialisation of the shelve method nodes is best confirmed by a live
OPC UA browse (pairs with the G6 / D.1 rig steps). `AddComment` is still
not wired to an OPC UA method node — see `phase-7-status.md` Gap 1.
them to `OpcUaOperation.AlarmShelve`. `AddComment` also now routes to the
engine (gated at the `AlarmAcknowledge` tier) — `phase-7-status.md` Gap 1
is fully closed. Remaining: address-space materialisation of the shelve
method nodes is best confirmed by a live OPC UA browse (pairs with the
G6 / D.1 rig steps).
- **mxaccessgw alarm epic branch.** The alarm subsystem work (A.2/A.3/A.4
+ the two production-gap fixes from #18) lives on the mxaccessgw branch