fix(historian): document comms-loss outage markers; freeze DefaultSupportedKinds

Review round 1: the #481 FanCommsLossToDependencyMux fan-out DOES reach the recorder. Per the
controller ruling it is historized as an Empty/BadNoCommunication outage marker when the backend
supports Empty and counted in DroppedUnsupportedKind otherwise; remarks and the counter doc now say
so. DefaultSupportedKinds is a FrozenSet. The drop-leg test now runs under the default (gateway)
kinds, and the Empty leg pins status 0x80310000.

Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
Joseph Doherty
2026-10-09 12:52:32 -04:00
parent 04b882f5c6
commit 1c822eeeed
2 changed files with 20 additions and 8 deletions
@@ -88,6 +88,7 @@ public sealed class ContinuousHistorizationRecorderTypedValueTests : TestKit
[Fact]
public async Task A_null_BadNoCommunication_sample_is_written_as_Empty_when_the_backend_supports_Empty()
{
// The #481 comms-loss fan-out shape: stored as an Empty/BadNoCommunication outage marker.
var writer = new PoolThreadValueWriter();
IActorRef rec = Spawn(writer, AllKinds);
@@ -96,13 +97,16 @@ public sealed class ContinuousHistorizationRecorderTypedValueTests : TestKit
HistorizationValue written = await AwaitSingleWriteAsync(writer);
written.Value.Kind.ShouldBe(HistorianValueKind.Empty);
written.StatusCode.ShouldBe(OpcUaStatus.BadNoCommunication);
written.StatusCode.ShouldBe(0x80310000u);
}
[Fact]
public async Task A_null_BadNoCommunication_sample_is_dropped_when_the_backend_does_not_support_Empty()
public async Task A_null_BadNoCommunication_sample_is_dropped_under_the_default_gateway_kinds()
{
// The #481 comms-loss fan-out shape (DriverHostActor.FanCommsLossToDependencyMux): on the default
// (numeric-only, gateway) kinds it is metered as an unsupported kind and nothing is appended.
var writer = new PoolThreadValueWriter();
IActorRef rec = Spawn(writer, NumericKinds);
IActorRef rec = Spawn(writer, supportedKinds: null);
rec.Tell(new VirtualTagActor.DependencyValueChanged(Ref, null, DateTime.UtcNow, OpcUaStatus.BadNoCommunication));