docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped

Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public
members surfaced by commentchecker — resolves 5,847 of 5,869 issues
(99.6%) across three /fixdocs passes.
This commit is contained in:
Joseph Doherty
2026-05-28 08:10:17 -04:00
parent f9fc7dd2e1
commit 64e3fbe035
756 changed files with 9876 additions and 96 deletions
@@ -9,6 +9,7 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Tests.Stability;
[Trait("Category", "Unit")]
public sealed class MemoryRecycleTests
{
/// <summary>Verifies that Tier C hard memory breach requests supervisor recycle.</summary>
[Fact]
public async Task TierC_HardBreach_RequestsSupervisorRecycle()
{
@@ -22,6 +23,8 @@ public sealed class MemoryRecycleTests
supervisor.LastReason.ShouldContain("hard-breach");
}
/// <summary>Verifies that Tier A and B hard memory breach never request recycle.</summary>
/// <param name="tier">The driver tier to test.</param>
[Theory]
[InlineData(DriverTier.A)]
[InlineData(DriverTier.B)]
@@ -36,6 +39,7 @@ public sealed class MemoryRecycleTests
supervisor.RecycleCount.ShouldBe(0);
}
/// <summary>Verifies that Tier C without supervisor hard breach is a no-op.</summary>
[Fact]
public async Task TierC_WithoutSupervisor_HardBreach_NoOp()
{
@@ -46,6 +50,8 @@ public sealed class MemoryRecycleTests
requested.ShouldBeFalse("no supervisor → no recycle path; action logged only");
}
/// <summary>Verifies that soft memory breach never requests recycle at any tier.</summary>
/// <param name="tier">The driver tier to test.</param>
[Theory]
[InlineData(DriverTier.A)]
[InlineData(DriverTier.B)]
@@ -61,6 +67,8 @@ public sealed class MemoryRecycleTests
supervisor.RecycleCount.ShouldBe(0);
}
/// <summary>Verifies that non-breach memory actions are no-ops.</summary>
/// <param name="action">The non-breach memory tracking action to test.</param>
[Theory]
[InlineData(MemoryTrackingAction.None)]
[InlineData(MemoryTrackingAction.Warming)]
@@ -77,10 +85,16 @@ public sealed class MemoryRecycleTests
private sealed class FakeSupervisor : IDriverSupervisor
{
/// <summary>Gets the driver instance identifier.</summary>
public string DriverInstanceId => "fake-tier-c";
/// <summary>Gets the count of recycle operations.</summary>
public int RecycleCount { get; private set; }
/// <summary>Gets the reason from the last recycle operation.</summary>
public string? LastReason { get; private set; }
/// <summary>Recycles the driver asynchronously.</summary>
/// <param name="reason">The reason for recycling.</param>
/// <param name="cancellationToken">The cancellation token.</param>
public Task RecycleAsync(string reason, CancellationToken cancellationToken)
{
RecycleCount++;
@@ -10,6 +10,7 @@ public sealed class MemoryTrackingTests
{
private static readonly DateTime T0 = new(2026, 4, 19, 12, 0, 0, DateTimeKind.Utc);
/// <summary>Verifies that warming phase returns Warming until the time window elapses.</summary>
[Fact]
public void WarmingUp_Returns_Warming_UntilWindowElapses()
{
@@ -23,6 +24,7 @@ public sealed class MemoryTrackingTests
tracker.BaselineBytes.ShouldBe(0);
}
/// <summary>Verifies that when the window elapses, baseline is captured as median and phase transitions to steady.</summary>
[Fact]
public void WindowElapsed_CapturesBaselineAsMedian_AndTransitionsToSteady()
{
@@ -38,6 +40,10 @@ public sealed class MemoryTrackingTests
first.ShouldBe(MemoryTrackingAction.None, "150 MB is the baseline itself, well under soft threshold");
}
/// <summary>Verifies that tier constants match Decision 146 specification.</summary>
/// <param name="tier">The driver tier to test.</param>
/// <param name="expectedMultiplier">Expected growth multiplier.</param>
/// <param name="expectedFloorMB">Expected floor in megabytes.</param>
[Theory]
[InlineData(DriverTier.A, 3, 50)]
[InlineData(DriverTier.B, 3, 100)]
@@ -49,6 +55,7 @@ public sealed class MemoryTrackingTests
floor.ShouldBe(expectedFloorMB * 1024 * 1024);
}
/// <summary>Verifies that soft threshold uses the maximum of multiplier and floor for small baselines.</summary>
[Fact]
public void SoftThreshold_UsesMax_OfMultiplierAndFloor_SmallBaseline()
{
@@ -57,6 +64,7 @@ public sealed class MemoryTrackingTests
tracker.SoftThresholdBytes.ShouldBe(60L * 1024 * 1024);
}
/// <summary>Verifies that soft threshold uses the maximum of multiplier and floor for large baselines.</summary>
[Fact]
public void SoftThreshold_UsesMax_OfMultiplierAndFloor_LargeBaseline()
{
@@ -65,6 +73,7 @@ public sealed class MemoryTrackingTests
tracker.SoftThresholdBytes.ShouldBe(600L * 1024 * 1024);
}
/// <summary>Verifies that hard threshold is twice the soft threshold.</summary>
[Fact]
public void HardThreshold_IsTwiceSoft()
{
@@ -72,6 +81,7 @@ public sealed class MemoryTrackingTests
tracker.HardThresholdBytes.ShouldBe(tracker.SoftThresholdBytes * 2);
}
/// <summary>Verifies that samples below soft threshold return None.</summary>
[Fact]
public void Sample_Below_Soft_Returns_None()
{
@@ -80,6 +90,7 @@ public sealed class MemoryTrackingTests
tracker.Sample(200L * 1024 * 1024, T0.AddMinutes(10)).ShouldBe(MemoryTrackingAction.None);
}
/// <summary>Verifies that samples at soft threshold return SoftBreach.</summary>
[Fact]
public void Sample_AtSoft_Returns_SoftBreach()
{
@@ -90,6 +101,7 @@ public sealed class MemoryTrackingTests
.ShouldBe(MemoryTrackingAction.SoftBreach);
}
/// <summary>Verifies that samples at hard threshold return HardBreach.</summary>
[Fact]
public void Sample_AtHard_Returns_HardBreach()
{
@@ -99,6 +111,7 @@ public sealed class MemoryTrackingTests
.ShouldBe(MemoryTrackingAction.HardBreach);
}
/// <summary>Verifies that samples above hard threshold return HardBreach.</summary>
[Fact]
public void Sample_AboveHard_Returns_HardBreach()
{
@@ -12,6 +12,8 @@ public sealed class ScheduledRecycleSchedulerTests
private static readonly DateTime T0 = new(2026, 4, 19, 0, 0, 0, DateTimeKind.Utc);
private static readonly TimeSpan Weekly = TimeSpan.FromDays(7);
/// <summary>Verifies constructor throws for Tier A or B.</summary>
/// <param name="tier">The driver tier to test.</param>
[Theory]
[InlineData(DriverTier.A)]
[InlineData(DriverTier.B)]
@@ -22,6 +24,7 @@ public sealed class ScheduledRecycleSchedulerTests
tier, Weekly, T0, supervisor, NullLogger<ScheduledRecycleScheduler>.Instance));
}
/// <summary>Verifies constructor throws for zero or negative intervals.</summary>
[Fact]
public void ZeroOrNegativeInterval_Throws()
{
@@ -32,6 +35,7 @@ public sealed class ScheduledRecycleSchedulerTests
DriverTier.C, TimeSpan.FromSeconds(-1), T0, supervisor, NullLogger<ScheduledRecycleScheduler>.Instance));
}
/// <summary>Verifies Tick before the next recycle time is a no-op.</summary>
[Fact]
public async Task Tick_BeforeNextRecycle_NoOp()
{
@@ -44,6 +48,7 @@ public sealed class ScheduledRecycleSchedulerTests
supervisor.RecycleCount.ShouldBe(0);
}
/// <summary>Verifies Tick at or after the next recycle time fires once and advances.</summary>
[Fact]
public async Task Tick_AtOrAfterNextRecycle_FiresOnce_AndAdvances()
{
@@ -57,6 +62,7 @@ public sealed class ScheduledRecycleSchedulerTests
sch.NextRecycleUtc.ShouldBe(T0 + Weekly + Weekly);
}
/// <summary>Verifies RequestRecycleNow fires immediately without advancing the schedule.</summary>
[Fact]
public async Task RequestRecycleNow_Fires_Immediately_WithoutAdvancingSchedule()
{
@@ -71,6 +77,7 @@ public sealed class ScheduledRecycleSchedulerTests
sch.NextRecycleUtc.ShouldBe(nextBefore, "ad-hoc recycle doesn't shift the cron schedule");
}
/// <summary>Verifies multiple ticks across the recycle interval each advance by one interval.</summary>
[Fact]
public async Task MultipleFires_AcrossTicks_AdvanceOneIntervalEach()
{
@@ -85,12 +92,22 @@ public sealed class ScheduledRecycleSchedulerTests
sch.NextRecycleUtc.ShouldBe(T0 + TimeSpan.FromDays(4));
}
/// <summary>Fake driver supervisor for testing.</summary>
private sealed class FakeSupervisor : IDriverSupervisor
{
/// <summary>Gets the driver instance ID.</summary>
public string DriverInstanceId => "tier-c-fake";
/// <summary>Gets the number of times RecycleAsync was called.</summary>
public int RecycleCount { get; private set; }
/// <summary>Gets the reason from the most recent recycle call.</summary>
public string? LastReason { get; private set; }
/// <summary>Simulates a driver recycle operation.</summary>
/// <param name="reason">The reason for the recycle.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>A completed task.</returns>
public Task RecycleAsync(string reason, CancellationToken cancellationToken)
{
RecycleCount++;
@@ -11,6 +11,7 @@ public sealed class WedgeDetectorTests
private static readonly DateTime Now = new(2026, 4, 19, 12, 0, 0, DateTimeKind.Utc);
private static readonly TimeSpan Threshold = TimeSpan.FromSeconds(120);
/// <summary>Verifies that thresholds below 60 seconds are clamped to 60 seconds.</summary>
[Fact]
public void SubSixtySecondThreshold_ClampsToSixty()
{
@@ -18,6 +19,7 @@ public sealed class WedgeDetectorTests
detector.Threshold.ShouldBe(TimeSpan.FromSeconds(60));
}
/// <summary>Verifies that unhealthy drivers always return NotApplicable verdict.</summary>
[Fact]
public void Unhealthy_Driver_AlwaysNotApplicable()
{
@@ -29,6 +31,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Initializing, demand, Now).ShouldBe(WedgeVerdict.NotApplicable);
}
/// <summary>Verifies that an idle subscription-only driver stays Idle.</summary>
[Fact]
public void Idle_Subscription_Only_StaysIdle()
{
@@ -40,6 +43,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Idle);
}
/// <summary>Verifies that pending work with recent progress stays Healthy.</summary>
[Fact]
public void PendingWork_WithRecentProgress_StaysHealthy()
{
@@ -49,6 +53,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Healthy);
}
/// <summary>Verifies that pending work with stale progress is detected as Faulted.</summary>
[Fact]
public void PendingWork_WithStaleProgress_IsFaulted()
{
@@ -58,6 +63,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Faulted);
}
/// <summary>Verifies that active monitored items without recent publishes are detected as Faulted.</summary>
[Fact]
public void MonitoredItems_Active_ButNoRecentPublish_IsFaulted()
{
@@ -70,6 +76,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Faulted);
}
/// <summary>Verifies that active monitored items with fresh publishes stay Healthy.</summary>
[Fact]
public void MonitoredItems_Active_WithFreshPublish_StaysHealthy()
{
@@ -79,6 +86,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Healthy);
}
/// <summary>Verifies that slow history backfill with progress stays Healthy.</summary>
[Fact]
public void HistoryBackfill_SlowButMakingProgress_StaysHealthy()
{
@@ -89,6 +97,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Healthy);
}
/// <summary>Verifies that write-only burst stays Idle when the bulkhead is empty.</summary>
[Fact]
public void WriteOnlyBurst_StaysIdle_WhenBulkheadEmpty()
{
@@ -101,6 +110,7 @@ public sealed class WedgeDetectorTests
detector.Classify(DriverState.Healthy, demand, Now).ShouldBe(WedgeVerdict.Idle);
}
/// <summary>Verifies that DemandSignal.HasPendingWork is true for any non-zero counter.</summary>
[Fact]
public void DemandSignal_HasPendingWork_TrueForAnyNonZeroCounter()
{