Remove the periodic 5-minute device re-browse (tag-set drift detection) from FOCAS/TwinCAT/MTConnect/AbCip #523
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decision (owner, 2026-07-28): remove the periodic re-browse. Shipped in
e77c8a35, merged tomasterin914d70bf. This issue tracks taking it back out.What is in
mastertodayDriverInstanceActorstarts a periodic timer on every Connected entry for drivers that declareITagDiscovery.SupportsOnlineDiscoveryand reportAuthoredDiscoveryRefs. Each tick runs a fullDiscoverAsyncagainst the live device and diffs the result against the authored tag set, raising the/hostsre-browse prompt on a change.Four drivers qualify: FOCAS, TwinCAT, MTConnect, AbCip. Interval is
DriverInstanceActor.DefaultDriftCheckInterval= 5 minutes, a constructor parameter with no appsettings key — so a deployment cannot currently turn it off or slow it down without a code change. That is the core objection: it is recurring, unconfigurable, unsolicited traffic to real PLCs, CNCs and MTConnect Agents, and it was never live-gated.What to remove
DriverInstanceActor:DriftCheckTick,StartDriftCheck,StopDriftCheck,HandleDriftCheckAsync,QualifiesForDriftCheck,_driftCheckInterval,_lastDriftSignature,DefaultDriftCheckInterval,DriftBrowseTimeout,CollectLeafRefs, thedriftCheckIntervalparams onProps/ctor, theReceiveAsync<DriftCheckTick>registration and theStartDriftCheck()/StopDriftCheck()call sites.src/Server/ZB.MOM.WW.OtOpcUa.Runtime/Drivers/TagSetDrift.cs(whole file).TagSetDriftDetectorTests,DriverInstanceActorDriftCheckTests.AuthoredDiscoveryRefs+DiscoveryStreamIncludesAuthoredTagsonFocasDriver,TwinCATDriver,AbCipDriver,MTConnectDriver.ITagDiscovery: theAuthoredDiscoveryRefsandDiscoveryStreamIncludesAuthoredTagsmembers. Check for external implementors first — these are default-implemented interface members, so removing them is source-compatible for anyone who did not override them, but a driver in a sibling repo that did override would break.CLAUDE.md§Change Detection and the 2026-07-28 entry indeferment.md§9.Do NOT remove the
IRediscoverableconsumption itself (09a401b8). That is a separate, event-driven signal — the driver tells us, we do not poll — and it costs nothing when nothing changes.Consequence to record, not to argue
AbCip and FOCAS browse a live backend but implement no
IRediscoverable, so after this removal they have no change signal at all: a PLC program re-download that adds or removes tags will be invisible until someone re-browses under/rawby hand. TwinCAT (ADS symbol-version) and MTConnect (AgentinstanceId) keep their native event-driven signals and lose only the redundant polling.If that turns out to matter for AbCip/FOCAS later, the event-driven shape is the one to reach for — a device-side change notification, or a drift check that runs only when something else already indicates a change (a reconnect, a deploy) rather than on a wall-clock timer.
Alternative considered and NOT chosen
Gating the interval behind an appsettings key (default off) would keep the capability available without the unsolicited traffic. The owner's decision is removal; recorded here only so the option is not re-discovered from scratch.
DONE — removed, merged to
masteras2a0461a1(commit5fff5973).Removed
TagSetDrift+TagSetDriftDetectorRuntime/Drivers/TagSetDrift.cs(file deleted)DriftCheckTick,DefaultDriftCheckInterval, thedriftCheckIntervalProps/ctor parameter,QualifiesForDriftCheck,Start/StopDriftCheck,HandleDriftCheckAsync,CollectLeafRefs,_lastDriftSignatureDriverInstanceActorITagDiscovery.AuthoredDiscoveryRefs+.DiscoveryStreamIncludesAuthoredTags, and their four implementationsCore.Abstractions; FOCAS, TwinCAT, MTConnect, AbCipDriverInstanceActorDriftCheckTests(6),TagSetDriftDetectorTests(8)Runtime.TestsKept, deliberately
ITagDiscovery.SupportsOnlineDiscovery— it predates drift detection and is what the universal browse picker dispatches on.IRediscoverableconsumption (09a401b8) and the/hostsre-browse chip, now fed by that one source. The driver tells us; we do not poll, and it costs nothing when nothing changes.⚠️ Consequence, carried forward rather than buried
AbCip and FOCAS now have no tag-change signal at all. Both browse a live backend, neither implements
IRediscoverable, and the periodic compare was the only thing that would have noticed a PLC program re-download or a CNC option install. Galaxy, TwinCAT, MTConnect and MQTT raise natively and are unaffected.Recorded in
CLAUDE.md§Change Detection so the next reader does not have to rediscover it, together with the shape to reach for if that coverage is wanted back: event-driven, or triggered by something that already indicates change (a reconnect, a deploy) — not a wall-clock timer.Note on the design that was removed
The design itself was sound: the tautology drivers (Modbus, S7, MQTT, AbLegacy, Sql — which echo authored config from
DiscoverAsync) were correctly gated out, and the structurally undetectable "vanished" direction was declared rather than faked. None of that was the objection. The objection was to the feature existing in that shape at all — it browsed real plant equipment on a recurring timer, at a frequency nobody could configure, and that behaviour was never once observed against real hardware. A well-built mechanism for something that should not run is still something that should not run.Build clean;
Runtime.Tests476 passed / 13 skipped (skip set unchanged at the time), FOCAS 275, TwinCAT 192, MTConnect 491, AbCip 342,Core.Abstractions266 — all green.