feat(raw): re-migrate discovered-node injection onto the raw device subtree — IRediscoverable is inert in v3 #507

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

IRediscoverable.OnRediscoveryNeeded currently changes nothing. DriverHostActor.HandleDiscoveredNodes
(src/Server/ZB.MOM.WW.OtOpcUa.Runtime/Drivers/DriverHostActor.cs:986) hard-returns after a Debug log — a
deliberate v3 Batch-4 guard, whose own comment ends "Re-migrating injection onto the raw device subtree is a
separate follow-up."
This is that follow-up.

Why it was short-circuited. In v2 a driver-connected FixedTree was grafted under an equipment folder
(equipment bound a driver). v3 retired that binding — equipment references raw tags via UnsTagReference, and
discovered raw tags are authored explicitly through the Batch-2 /raw browse-commit flow. The downstream
mapper/materialiser were only half-migrated to the Raw tree and are still rooted at an equipment id, so letting
the message through would materialise incoherent nodes. Short-circuiting was correct; leaving it permanent is
the gap.

Effect today. Every driver implementing IRediscoverable fires into a void:

Driver Trigger that is currently ignored
Mqtt a Sparkplug DBIRTH introducing a metric
Galaxy DeployWatcher observing a Galaxy redeploy
TwinCAT ADS symbol-table change
AbCip controller @tags change

The operator-visible symptom is uniform: the edge gains a point and the OPC UA tree does not change until
someone redeploys.
The driver-side decision is log-observable (each driver logs that it raised rediscovery),
so this is a platform gap, not a per-driver bug — fixing it once lights up all four.

Scope sketch. Re-root the discovered-node mapper/materialiser at a Device in the /raw tree rather
than at an equipment id, and decide the authoring contract: auto-materialise discovered leaves, or surface them
as a pending-review set the operator commits (the latter matches the existing /raw browse-commit flow and
avoids a chatty edge rewriting the address space unattended). Whichever is chosen, _discoveredByDriver and
the redeploy re-inject tail need to come back with it.

Acceptance. A driver raising OnRediscoveryNeeded results in the new leaf being reachable in the served
address space (auto, or after an explicit commit) without a redeploy, live-verified on docker-dev against the
Sparkplug simulator (docker restart otopcua-sparkplug-sim forces a fresh birth; births are never retained).

`IRediscoverable.OnRediscoveryNeeded` currently changes nothing. `DriverHostActor.HandleDiscoveredNodes` (`src/Server/ZB.MOM.WW.OtOpcUa.Runtime/Drivers/DriverHostActor.cs:986`) hard-returns after a Debug log — a deliberate v3 Batch-4 guard, whose own comment ends *"Re-migrating injection onto the raw device subtree is a separate follow-up."* This is that follow-up. **Why it was short-circuited.** In v2 a driver-connected `FixedTree` was grafted under an equipment folder (equipment bound a driver). v3 retired that binding — equipment references raw tags via `UnsTagReference`, and discovered raw tags are authored explicitly through the Batch-2 `/raw` browse-commit flow. The downstream mapper/materialiser were only half-migrated to the Raw tree and are still rooted at an equipment id, so letting the message through would materialise incoherent nodes. Short-circuiting was correct; leaving it permanent is the gap. **Effect today.** Every driver implementing `IRediscoverable` fires into a void: | Driver | Trigger that is currently ignored | |---|---| | Mqtt | a Sparkplug **DBIRTH** introducing a metric | | Galaxy | `DeployWatcher` observing a Galaxy redeploy | | TwinCAT | ADS symbol-table change | | AbCip | controller `@tags` change | The operator-visible symptom is uniform: **the edge gains a point and the OPC UA tree does not change until someone redeploys.** The driver-side decision is log-observable (each driver logs that it raised rediscovery), so this is a platform gap, not a per-driver bug — fixing it once lights up all four. **Scope sketch.** Re-root the discovered-node mapper/materialiser at a **Device** in the `/raw` tree rather than at an equipment id, and decide the authoring contract: auto-materialise discovered leaves, or surface them as a pending-review set the operator commits (the latter matches the existing `/raw` browse-commit flow and avoids a chatty edge rewriting the address space unattended). Whichever is chosen, `_discoveredByDriver` and the redeploy re-inject tail need to come back with it. **Acceptance.** A driver raising `OnRediscoveryNeeded` results in the new leaf being reachable in the served address space (auto, or after an explicit commit) without a redeploy, live-verified on docker-dev against the Sparkplug simulator (`docker restart otopcua-sparkplug-sim` forces a fresh birth; births are never retained).
dohertj2 added the cross-driver label 2026-07-27 13:49:41 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#507