IRediscoverable + IHostConnectivityProbe events have no consumer in src/ (9 drivers raise into the void); CLAUDE.md Change Detection is wrong #518

Open
opened 2026-07-27 13:52:08 -04:00 by dohertj2 · 0 comments
Owner

Found in the MTConnect Task 13 code review (PR #506) and verified independently against current master. Out of scope for that plan.

This is the "implemented but never dispatched" class that previously produced DeferredAddressSpaceSink and the gated-shut native alarms.

Verified

The only OnRediscoveryNeeded += / OnHostStatusChanged += subscriptions anywhere in src/ are GalaxyDriver.cs:586 and :221, where Galaxy wires its own sub-components (DeployWatcher / HostStatusAggregator) to re-raise on its own interface implementation. That is Galaxy fulfilling its contract — not an external consumer.

DriverInstanceActor wires exactly two driver events: OnDataChange (L721) and OnAlarmEvent (L792). DriverHostActor, GenericDriverNodeManager, AdminUI, ControlPlane and Cluster subscribe to neither of the two in question.

Impact

Modbus, S7, AbCip, AbLegacy, TwinCAT, FOCAS, OpcUaClient and Galaxy all raise these two events into the void. MTConnect now joins them. Every driver's rediscovery and host-connectivity work is dormant at the runtime layer.

Concretely for MTConnect: RediscoverPolicy=Once means an Agent restart should trigger a re-browse via OnRediscoveryNeeded. The driver raises it correctly (verified and mutation-tested in Task 13). Nothing listens. So a restarted Agent leaves a stale address space behind a Healthy driver until the next reconnect.

CLAUDE.md is factually wrong

The Change Detection section states that DeployWatcher "raises IRediscoverable.OnRediscoveryNeeded when the Galaxy redeploys. The server's DriverHost consumes the signal and rebuilds the address space."

DriverHost consumes nothing. Either the doc or the code needs to change.

Check before concluding the interface is dead

IHostConnectivityProbe.GetHostStatuses() — the polled half — may well have a live consumer via Configuration/Entities/DriverHostStatus.cs. Verify whether the polled path works even though the event path does not, before treating the whole interface as unused.

Suggested fix

Decide whether these events should be wired in DriverInstanceActor alongside OnDataChange/OnAlarmEvent, or whether the interfaces should be retired. Then reconcile CLAUDE.md with whichever answer wins.

Found in the MTConnect Task 13 code review (PR #506) and verified independently against current `master`. Out of scope for that plan. This is the **"implemented but never dispatched"** class that previously produced `DeferredAddressSpaceSink` and the gated-shut native alarms. ## Verified The **only** `OnRediscoveryNeeded +=` / `OnHostStatusChanged +=` subscriptions anywhere in `src/` are `GalaxyDriver.cs:586` and `:221`, where Galaxy wires its **own** sub-components (`DeployWatcher` / `HostStatusAggregator`) to re-raise on its own interface implementation. That is Galaxy fulfilling its contract — **not** an external consumer. `DriverInstanceActor` wires exactly two driver events: `OnDataChange` (`L721`) and `OnAlarmEvent` (`L792`). `DriverHostActor`, `GenericDriverNodeManager`, AdminUI, ControlPlane and Cluster subscribe to neither of the two in question. ## Impact Modbus, S7, AbCip, AbLegacy, TwinCAT, FOCAS, OpcUaClient and Galaxy all raise these two events **into the void**. MTConnect now joins them. Every driver's rediscovery and host-connectivity work is dormant at the runtime layer. Concretely for MTConnect: `RediscoverPolicy=Once` means an Agent restart should trigger a re-browse via `OnRediscoveryNeeded`. The driver raises it correctly (verified and mutation-tested in Task 13). Nothing listens. So a restarted Agent leaves a **stale address space behind a Healthy driver** until the next reconnect. ## CLAUDE.md is factually wrong The **Change Detection** section states that `DeployWatcher` "raises `IRediscoverable.OnRediscoveryNeeded` when the Galaxy redeploys. The server's `DriverHost` consumes the signal and rebuilds the address space." `DriverHost` consumes nothing. Either the doc or the code needs to change. ## Check before concluding the interface is dead `IHostConnectivityProbe.GetHostStatuses()` — the **polled** half — may well have a live consumer via `Configuration/Entities/DriverHostStatus.cs`. Verify whether the polled path works even though the event path does not, before treating the whole interface as unused. ## Suggested fix Decide whether these events should be wired in `DriverInstanceActor` alongside `OnDataChange`/`OnAlarmEvent`, or whether the interfaces should be retired. Then reconcile CLAUDE.md with whichever answer wins.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#518