IHostConnectivityProbe / DriverHostStatus: dead surface — build the publisher or delete it #521
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?
Split out of
deferment.md§3.2 / Gitea #518. TheIRediscoverablehalf of #518 is fixed —DriverInstanceActornow consumes it and surfaces a re-browse prompt on/hosts. This tracks the other half, which is a keep-or-delete decision, not a bug.What is true today
IHostConnectivityProbeis implemented by 11 drivers (Modbus, FOCAS, TwinCAT, OpcUaClient, AbLegacy, S7, Sql, Galaxy, MTConnect, Mqtt, AbCip).GetHostStatuses()has zero production call sites. The only non-driver references are the interface declaration and a comment inUnwrappedCapabilityCallAnalyzerexplaining why the analyzer exempts it.OnHostStatusChangedhas exactly one+=insrc/—GalaxyDriver.cs:221, which is intra-driver (its aggregator re-raising onto its own interface). Every other subscription is intests/.DriverHostStatusentity + DbSet + table exist and nothing ever writes a row. EveryDriverHostStatusesreference in the repo is the DbSet declaration plusDriverHostStatusTests.OnHostStatusChangedand upserts rows on transitions + periodic liveness heartbeats."DriverInstanceResilienceStatus.cs:12claims "The Admin UI left-joins this table on DriverHostStatus for display" — that join exists in no razor file.There is no permanently-empty UI table.
/hostsreads Akka membership,IDriverStatusSnapshotStoreand ConfigDBClusterNodes/DriverInstances— neverDriverHostStatus. So the dead surface is invisible: an empty table, an unused DbSet, and 11 driver implementations of a method nobody calls.The decision
Do not delete on inference. The table was re-created in the v3 initial migration (
20260715230637_V3Initial.cs:108-121), so someone carried it forward deliberately. Confirm intent first.Either:
(a) Build the missing publisher. A hosted service subscribing to every registered driver's
OnHostStatusChanged, upsertingDriverHostStatusrows on transition plus a liveness heartbeat, and a/hostssection that reads them. This is what the entity doc already describes. Note the two halves are separable —OnHostStatusChanged(the event) is the useful half;GetHostStatuses()(the snapshot pull) is only needed to prime state at startup.(b) Delete it. Drop
GetHostStatuses()from the interface, the 11 driver implementations, the DbSet, the table (migration), andDriverHostStatusTests. Fix the two doc-comments that describe the non-existent publisher and the non-existent Admin UI join.Per-host connectivity is genuinely useful for a multi-device driver (a FOCAS or AbLegacy instance owning several PLCs), where today one unreachable device is invisible behind an otherwise-Healthy driver row. That is the argument for (a).