fix(r2-10): register the tracker's production reader on driver nodes + wiring guard

This commit is contained in:
Joseph Doherty
2026-07-13 10:42:18 -04:00
parent 37f180c5a3
commit 12b2ce078b
3 changed files with 38 additions and 1 deletions
@@ -70,6 +70,13 @@ public static class DriverFactoryBootstrap
logger: sp.GetService<ILoggerFactory>()?.CreateLogger("ZB.MOM.WW.OtOpcUa.Core.Resilience.DriverCapabilityInvokerFactory"));
});
// The tracker's operator-facing reader: a periodic DPS publisher that mirrors each snapshot to the
// AdminUI resilience panel (R2-10 — closes the "tracker fed by everything, read by nothing" gap).
// Lives on driver nodes exactly where the tracker exists. The lazy Func<ActorSystem> is idempotent
// with the one Program.cs registers for the alarm-command router.
services.TryAddSingleton<Func<Akka.Actor.ActorSystem>>(sp => () => sp.GetRequiredService<Akka.Actor.ActorSystem>());
services.AddHostedService<DriverResilienceStatusPublisherService>();
// Driver nodes also carry the probe set so a fused admin,driver node has it; the admin-only
// case is covered by Program.cs calling AddOtOpcUaDriverProbes() in the hasAdmin block.
services.AddOtOpcUaDriverProbes();