test(grpc-data): H4 review 7 — diagnostics snapshot round-trips on the cluster serializer; old-shape payloads decode

Round-trips NodeDiagnosticsSnapshot (OriginHistory, HistoryVariants and the other H4 members) through
the serializer Akka picks for the fleet-diagnostics reply, and decodes payloads stripped of the H4
members. The origin flag is renamed NoPeerTrafficYet (default false): Akka's JSON serializer fills a
missing constructor argument with the CLR default, so a payload without it must never claim it.
This commit is contained in:
Joseph Doherty
2026-11-24 08:41:52 -05:00
parent 2fba036176
commit 7498f1ce82
6 changed files with 102 additions and 9 deletions
@@ -53,7 +53,7 @@ else
<div class="small mb-2 data-connection-origin"><strong>@nodeId</strong>
@if (node.OriginHistory is { } origin)
{
<span> · remote history @(origin.Available ? "served" : "no historian backend") · peer history sessions @origin.Sessions · open origin continuations @origin.OpenContinuations · history items answered @DataConnectionDiagnostics.HistoryCounts(origin.ReadsGood, origin.ReadsUncertain, origin.ReadsBad)@(origin.PeerServicesStarted ? "" : " · no peer has called since start")</span>
<span> · remote history @(origin.Available ? "served" : "no historian backend") · peer history sessions @origin.Sessions · open origin continuations @origin.OpenContinuations · history items answered @DataConnectionDiagnostics.HistoryCounts(origin.ReadsGood, origin.ReadsUncertain, origin.ReadsBad)@(origin.NoPeerTrafficYet ? " · no peer has called since start" : "")</span>
}
else { <span> · remote history evidence unavailable</span> }
@if (node.DroppedExportOperations is { } dropped)
@@ -156,7 +156,7 @@ public sealed class DataConnectionHistoryDiagnostics
if (_originState is not { } state)
{
if (_provisionalAvailability is not { } provisional) return null;
try { return new(provisional(), 0, 0, 0, 0, 0, PeerServicesStarted: false); }
try { return new(provisional(), 0, 0, 0, 0, 0, NoPeerTrafficYet: true); }
catch (Exception) { return null; }
}
(bool Available, int Sessions, int Open) now;