server: DriverNodeManager prefers IAlarmSource ack over IWritable (PR B.3) #414

Merged
dohertj2 merged 1 commits from track-b3-prefer-driver-native-alarm into master 2026-04-30 17:23:12 -04:00
Owner

Summary

Thirteenth PR of the alarms-over-gateway epic (docs/plans/alarms-over-gateway.md). Depends on PR B.2 (#413, merged).

When DriverNodeManager registers an AlarmConditionState with AlarmConditionService, it now picks the acknowledger:

  • Driver implements IAlarmSourceDriverAlarmSourceAcknowledger routes the operator comment through IAlarmSource.AcknowledgeAsync via the existing AlarmSurfaceInvoker (Phase 6.1 resilience pipeline, no-retry per decision #143). Preserves operator-comment fidelity end-to-end — the value-driven sub-attribute write collapses the comment into a single string write that loses MxAccess metadata.
  • Driver does not implement IAlarmSourceDriverWritableAcknowledger fallback (existing behaviour for AbCip / Modbus / S7 / etc).

The dedup logic that prefers driver-native transitions over sub-attribute synthesis lives in AlarmConditionService and is already in place — drivers that surface OnAlarmEvent (B.2) feed the service directly, while sub-attribute writes still flow through DriverNodeManager's ConditionSink so a Galaxy template without $Alarm extensions stays functional.

Test plan

  • 2 new routing-decision tests in DriverAlarmSourceAcknowledgerRoutingTests pin the IAlarmSource detection
  • Server build clean (analyzer-required AlarmSurfaceInvoker wrapping satisfied)

Follow-up

  • E.7 — lmxopcua OPC UA-facing client surface refresh (now unblocked by B.2 + B.3).
## Summary Thirteenth PR of the **alarms-over-gateway** epic (docs/plans/alarms-over-gateway.md). Depends on PR B.2 (#413, merged). When `DriverNodeManager` registers an `AlarmConditionState` with `AlarmConditionService`, it now picks the acknowledger: - Driver implements `IAlarmSource` → `DriverAlarmSourceAcknowledger` routes the operator comment through `IAlarmSource.AcknowledgeAsync` via the existing `AlarmSurfaceInvoker` (Phase 6.1 resilience pipeline, no-retry per decision #143). Preserves operator-comment fidelity end-to-end — the value-driven sub-attribute write collapses the comment into a single string write that loses MxAccess metadata. - Driver does not implement `IAlarmSource` → `DriverWritableAcknowledger` fallback (existing behaviour for AbCip / Modbus / S7 / etc). The dedup logic that prefers driver-native transitions over sub-attribute synthesis lives in `AlarmConditionService` and is already in place — drivers that surface `OnAlarmEvent` (B.2) feed the service directly, while sub-attribute writes still flow through DriverNodeManager's `ConditionSink` so a Galaxy template without `$Alarm` extensions stays functional. ## Test plan - [x] 2 new routing-decision tests in `DriverAlarmSourceAcknowledgerRoutingTests` pin the IAlarmSource detection - [x] Server build clean (analyzer-required `AlarmSurfaceInvoker` wrapping satisfied) ## Follow-up - **E.7** — lmxopcua OPC UA-facing client surface refresh (now unblocked by B.2 + B.3).
dohertj2 added 1 commit 2026-04-30 17:23:08 -04:00
Thirteenth PR of the alarms-over-gateway epic
(docs/plans/alarms-over-gateway.md). Depends on PR B.2 (GalaxyDriver
implements IAlarmSource, merged).

When DriverNodeManager registers an AlarmConditionState with
AlarmConditionService, it now picks the acknowledger:

- Driver implements IAlarmSource → DriverAlarmSourceAcknowledger
  routes the operator comment through IAlarmSource.AcknowledgeAsync
  via the existing AlarmSurfaceInvoker (Phase 6.1 resilience pipeline,
  no-retry per decision #143). Preserves operator-comment fidelity
  end-to-end — the value-driven sub-attribute write collapses the
  comment into a single string write that loses MxAccess metadata.
- Driver does not implement IAlarmSource →
  DriverWritableAcknowledger fallback (existing behaviour for
  AbCip / Modbus / S7 / etc).

The dedup logic that prefers driver-native transitions over
sub-attribute synthesis lives in AlarmConditionService and is
already in place — drivers that surface OnAlarmEvent (B.2) feed
the service directly, while sub-attribute writes still flow
through DriverNodeManager's ConditionSink so a Galaxy template
without $Alarm extensions stays functional.

Tests:
- 2 new routing-decision tests in
  DriverAlarmSourceAcknowledgerRoutingTests pin the
  IAlarmSource detection used at registration time.
- Server build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 merged commit 0b5a4a676e into master 2026-04-30 17:23:12 -04:00
dohertj2 deleted branch track-b3-prefer-driver-native-alarm 2026-04-30 17:23:12 -04:00
Sign in to join this conversation.