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
@@ -35,7 +35,7 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
private readonly ActorSystem _system = ActorSystem.Create("sitecmd-tests");
/// <inheritdoc />
/// <summary>Disposes the actor system used by the tests.</summary>
public void Dispose() => _system.Dispose();
/// <summary>A dispatcher whose Deployment Manager proxy is a canned-reply responder.</summary>
@@ -88,12 +88,16 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
private sealed class FixedPskProvider(string key) : ISitePskProvider
{
/// <inheritdoc />
public ValueTask<string> GetAsync(string siteId, CancellationToken ct) => new(key);
/// <inheritdoc />
public void Invalidate(string siteId) { }
}
// ── Auth gating (delegated to ControlPlaneAuthInterceptor, proven wired here) ──
/// <summary>Verifies that a request without credentials is rejected with a permission-denied status.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task NoCredentials_IsRejected_WithPermissionDenied()
{
@@ -106,6 +110,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
Assert.Equal(StatusCode.PermissionDenied, ex.StatusCode);
}
/// <summary>Verifies that a request with the wrong key is rejected with a permission-denied status.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WrongKey_IsRejected_WithPermissionDenied()
{
@@ -120,6 +126,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
// ── Readiness ──
/// <summary>Verifies that a request made before the service is set ready is rejected as unavailable, even with a correct key.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task BeforeSetReady_IsRejected_WithUnavailable_EvenWithACorrectKey()
{
@@ -136,6 +144,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
// ── decode → dispatch → encode, one command per oneof group ──
/// <summary>Verifies that a lifecycle command round-trips through the dispatcher.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ExecuteLifecycle_RoundTripsThroughTheDispatcher()
{
@@ -151,6 +161,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
Assert.Equal("cmd-1", decoded.CommandId);
}
/// <summary>Verifies that an OPC UA command round-trips through the dispatcher.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ExecuteOpcUa_RoundTripsThroughTheDispatcher()
{
@@ -164,6 +176,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
Assert.IsType<BrowseNodeResult>(SiteCommandDtoMapper.FromOpcUaReply(reply));
}
/// <summary>Verifies that a debug snapshot query round-trips through the dispatcher.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ExecuteQuery_DebugSnapshot_RoundTripsThroughTheDispatcher()
{
@@ -178,6 +192,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
Assert.Equal("Site1.Pump1", decoded.InstanceUniqueName);
}
/// <summary>Verifies that an unsubscribe-debug-view query returns the fire-and-forget acknowledgement.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ExecuteQuery_UnsubscribeDebugView_ReturnsTheFireAndForgetAck()
{
@@ -195,6 +211,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
Assert.Equal(QueryReply.ReplyOneofCase.UnsubscribeDebugView, reply.ReplyCase);
}
/// <summary>Verifies that a parked-operation command round-trips through the node-local handler.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ExecuteParked_RoundTripsThroughTheNodeLocalHandler()
{
@@ -210,6 +228,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
Assert.Equal("corr-7", decoded.CorrelationId);
}
/// <summary>Verifies that a route command round-trips through the dispatcher.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ExecuteRoute_RoundTripsThroughTheDispatcher()
{
@@ -228,6 +248,8 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
// ── Failover: the reply completes before the leave is initiated ──
/// <summary>Verifies that a trigger-failover command returns the acknowledgement before the leave is initiated.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task TriggerFailover_ReturnsTheAck_BeforeTheLeaveIsInitiated()
{
@@ -267,6 +289,7 @@ public sealed class SiteCommandGrpcServiceTests : IDisposable
/// <summary>Deployment Manager stand-in: replies each command with a canned reply of the right group.</summary>
private sealed class Responder : ReceiveActor
{
/// <summary>Initializes the responder so it replies to every received command with a canned reply.</summary>
public Responder() => ReceiveAny(msg => Sender.Tell(ReplyFor(msg)));
private static object ReplyFor(object m) => m switch