fix(heidenhain): resolve the probe's secret resolver lazily — eager resolution crash-looped central nodes at boot (#803)
v2-ci / unit-tests (push) Successful in 1h9m7s

The Test-Connect probe set is resolved inside the AdminOperations Akka starter; resolving
ISecretResolver there walks AddZbSecrets -> IAuditWriter -> ActorAuditWriter, whose ctor needs
AuditWriterActorKey (registered later in the same builder). Found by the docker-dev live gate.
Regression test: resolving the probe set never resolves ISecretResolver (fails before the fix).
Also: TagRowProblem doc comment re-attached; Heidenhain credential help text names the
secret:heidenhain/ and env:OTOPCUA_HEIDENHAIN_ namespaces.
This commit is contained in:
Joseph Doherty
2026-11-11 00:27:37 -05:00
parent 7af9c40e41
commit 5bbe1e3c7a
8 changed files with 60 additions and 17 deletions
@@ -199,8 +199,12 @@ public static class DriverFactoryBootstrap
// Factory-built so the probe resolves secret: INSPECT password references through the node's resolver
// (registered on every node by AddZbSecrets; optional so a test graph without one still builds — a
// secret: ref then fails closed with a clear probe message rather than sending the literal).
// ⚠️ Captured as an accessor, NOT resolved here: the probe set is resolved inside the AdminOperations
// Akka starter, and ISecretResolver → AddZbSecrets → IAuditWriter → ActorAuditWriter needs the
// AuditWriterActorKey that is registered later in that builder — resolving it eagerly crash-looped every
// central node at boot (#803 live gate). See ControlPlane ServiceCollectionExtensions' WithActors note.
services.TryAddEnumerable(ServiceDescriptor.Singleton<IDriverProbe, HeidenhainProbe>(
sp => new HeidenhainProbe(sp.GetService<ISecretResolver>())));
sp => new HeidenhainProbe(() => sp.GetService<ISecretResolver>())));
return services;
}