docs+test(closeout): final-review reservations — stale ACL prose, worker test gaps, config sample fix
ci / nightly-windev (push) Has been skipped
ci / windows-x86 (push) Successful in 1m14s
ci / java (push) Successful in 2m10s
ci / portable (push) Successful in 8m31s

This commit is contained in:
Joseph Doherty
2026-08-17 05:23:23 -04:00
parent f5a58d884b
commit b621d692d0
18 changed files with 167 additions and 46 deletions
@@ -330,6 +330,44 @@ public sealed class FailoverAlarmConsumerTests
Assert.Equal(22, sut.AcknowledgeByName("a", "p", "g", "c", "n", "node", "dom", "full"));
}
/// <summary>
/// Proves that the snapshot truncation verdict is read from whichever child
/// is currently active, not cached from the primary: a capped primary reports
/// <see langword="true"/>, and after failover the standby's own verdict
/// replaces it. The verdict drives the dashboard's completeness caveat, so a
/// stale one would either keep a banner on screen for a feed that is now
/// complete or, worse, clear it for one that is not.
/// </summary>
[Fact]
public void SnapshotActiveAlarms_TruncationVerdictComesFromActiveChild()
{
FlakyPrimary primary = new FlakyPrimary { ThrowOnPoll = false, SnapshotTruncated = true };
StubStandby standby = new StubStandby { SnapshotTruncated = false };
FailoverSettings settings = new FailoverSettings(threshold: 1, probeIntervalSeconds: 0, stableProbes: 1);
using FailoverAlarmConsumer sut = new FailoverAlarmConsumer(primary, standby, settings);
sut.Subscribe(@"\\HOST\Galaxy!Area");
Assert.Equal(AlarmProviderMode.Alarmmgr, sut.Mode);
// Active = Primary → the primary's capped fetch surfaces.
_ = sut.SnapshotActiveAlarms(out bool truncatedOnPrimary);
Assert.True(truncatedOnPrimary);
// Force a failover by failing the primary past threshold.
primary.ThrowOnPoll = true;
sut.PollOnce(); // threshold=1 → switch to Subtag
Assert.Equal(AlarmProviderMode.Subtag, sut.Mode);
// Active = Standby → its own verdict, not the primary's leftover true.
_ = sut.SnapshotActiveAlarms(out bool truncatedOnStandby);
Assert.False(truncatedOnStandby);
// And the standby really is the source: flip its verdict and the answer follows.
standby.SnapshotTruncated = true;
_ = sut.SnapshotActiveAlarms(out bool truncatedAfterStandbyCaps);
Assert.True(truncatedAfterStandbyCaps);
}
/// <summary>
/// Proves that an intermittent failure during failback probing resets the
/// clean-probe counter to zero, requiring a fresh unbroken run of