docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)

Comment/XML-doc changes only:
- add summaries to ~10k test methods, fixtures, fakes and helpers
  (+ <param> on theories, <returns> on async Task methods,
  <inheritdoc/> on interface implementations the checker can resolve)
- strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N,
  #NN, Component-0NN) from comments, keeping the explanatory text;
  reword false positives in comments only
- real docs on fakes implementing BCL/library interfaces
  (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime)
- reword the last 5 src/ false positives (CWE-1236, failures-1,
  year-0001, M365)

Only non-comment edits: four one-line nested classes split across lines
so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
Joseph Doherty
2026-10-07 15:05:49 -04:00
parent 0ffd4bdbea
commit 513fa1aa16
998 changed files with 17896 additions and 2395 deletions
@@ -6,7 +6,7 @@ using ZB.MOM.WW.ScadaBridge.Communication.Grpc;
namespace ZB.MOM.WW.ScadaBridge.Communication.Tests.Grpc;
/// <summary>
/// Arch-review 2026-08-19 P3-2 — a channel replaced by the 60 s DB address refresh (or an admin
/// A channel replaced by the 60 s DB address refresh (or an admin
/// edit) must not be disposed out from under an in-flight <see cref="SitePairChannelProvider.ExecuteAsync{T}"/>
/// call. <c>ExecuteAsync</c> reads the channel under the pair gate but runs the RPC outside it, so an
/// inline dispose aborted whatever was running — a multi-minute <c>DeployArtifactsCommand</c>
@@ -19,6 +19,8 @@ public class SitePairChannelProviderDisposalTests
Options.Create(new CommunicationOptions()),
NullLogger<SitePairChannelProvider>.Instance);
/// <summary>Verifies that shutdown retains the active channel and disposes it only once the call completes.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Shutdown_RetainsActiveChannelThenDisposesItAtCompletion()
{
@@ -47,6 +49,8 @@ public class SitePairChannelProviderDisposalTests
Assert.Throws<ObjectDisposedException>(() => channel.CreateCallInvoker());
}
/// <summary>Verifies that a sweep keeps a retired channel alive until the in-flight call actually completes.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RetiredChannel_SweepKeepsItAliveUntilActualCallCompletion()
{
@@ -77,6 +81,8 @@ public class SitePairChannelProviderDisposalTests
Assert.Throws<ObjectDisposedException>(() => held!.CreateCallInvoker());
}
/// <summary>Verifies that an operation that may have been applied before the channel became unavailable is not replayed.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ApplyThenUnavailable_DoesNotReplayAnAmbiguousOperation()
{
@@ -94,6 +100,8 @@ public class SitePairChannelProviderDisposalTests
Assert.NotNull(error);
}
/// <summary>Verifies that a secondary node that applies the operation but loses the response reports an unknown outcome without another replay.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SecondaryAppliesThenLosesResponse_AlsoReportsUnknownWithoutAnotherReplay()
{
@@ -113,6 +121,9 @@ public class SitePairChannelProviderDisposalTests
Assert.Equal(1, effects);
}
/// <summary>Verifies that a safe read or an explicit pre-dispatch rejection can be retried on the other node.</summary>
/// <param name="safeRead">Whether the call is a safe read rather than an explicit pre-dispatch rejection.</param>
/// <returns>A task that represents the asynchronous operation.</returns>
[Theory]
[InlineData(false)]
[InlineData(true)]
@@ -132,6 +143,8 @@ public class SitePairChannelProviderDisposalTests
Assert.Equal(2, attempts);
}
/// <summary>Verifies that updating a site during an in-flight call parks the old channel and lets the call complete.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task UpdateSite_WhileCallInFlight_ParksTheOldChannelAndLetsTheCallComplete()
{
@@ -172,6 +185,7 @@ public class SitePairChannelProviderDisposalTests
Assert.Throws<ObjectDisposedException>(() => inFlightChannel!.CreateCallInvoker());
}
/// <summary>Verifies that removing a site parks both channels rather than disposing them inline.</summary>
[Fact]
public void RemoveSite_ParksBothChannelsRatherThanDisposingThemInline()
{
@@ -187,6 +201,7 @@ public class SitePairChannelProviderDisposalTests
Assert.Equal(0, provider.ParkedChannelCount);
}
/// <summary>Verifies that updating a site with unchanged endpoints parks no channels.</summary>
[Fact]
public void UpdateSite_UnchangedEndpoints_ParksNothing()
{
@@ -197,6 +212,7 @@ public class SitePairChannelProviderDisposalTests
Assert.Equal(0, provider.ParkedChannelCount);
}
/// <summary>Verifies that disposing the provider drains parked channels regardless of the remaining grace period.</summary>
[Fact]
public void Dispose_DrainsParkedChannelsRegardlessOfRemainingGrace()
{
@@ -212,7 +228,9 @@ public class SitePairChannelProviderDisposalTests
private sealed class NoKeyProvider : ISitePskProvider
{
/// <inheritdoc />
public ValueTask<string> GetAsync(string siteId, CancellationToken ct) => new("k");
/// <inheritdoc />
public void Invalidate(string siteId) { }
}
}