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
@@ -24,6 +24,7 @@ public class SiteCommandDispatcherTests : TestKit
// ── The 19 commands that forward to the Deployment Manager singleton proxy ──
/// <summary>The proxy-routed commands (lifecycle, OPC UA, debug snapshot/subscribe, route).</summary>
/// <returns>The proxy-routed command types, one per xunit member-data row.</returns>
public static IEnumerable<object[]> ProxyCommandTypes() => new[]
{
typeof(Commons.Messages.Deployment.RefreshDeploymentCommand),
@@ -47,6 +48,8 @@ public class SiteCommandDispatcherTests : TestKit
typeof(Commons.Messages.InboundApi.RouteToWaitForAttributeRequest),
}.Select(t => new object[] { t });
/// <summary>Verifies that each proxy-routed command is forwarded to the Deployment Manager proxy.</summary>
/// <param name="commandType">The command message type under test.</param>
[Theory]
[MemberData(nameof(ProxyCommandTypes))]
public void ProxyCommands_ForwardToDeploymentManager(Type commandType)
@@ -61,6 +64,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Same(dm.Ref, route.Target);
}
/// <summary>Verifies that unsubscribing a debug view is forwarded to the Deployment Manager as fire-and-forget and answered with a synthetic acknowledgement.</summary>
[Fact]
public void UnsubscribeDebugView_IsFireAndForget_ToDeploymentManager_WithSyntheticAck()
{
@@ -79,6 +83,7 @@ public class SiteCommandDispatcherTests : TestKit
// ── Artifact handler (null-guarded) ──
/// <summary>Verifies that a deploy-artifacts command with a handler is forwarded to the artifact handler and not to the proxy.</summary>
[Fact]
public void DeployArtifacts_WithHandler_ForwardsToArtifactHandler_NotTheProxy()
{
@@ -94,6 +99,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.NotSame(dm.Ref, route.Target);
}
/// <summary>Verifies that a deploy-artifacts command without a handler replies that the handler is not available.</summary>
[Fact]
public void DeployArtifacts_WithoutHandler_RepliesHandlerNotAvailable()
{
@@ -113,6 +119,7 @@ public class SiteCommandDispatcherTests : TestKit
// ── Event-log handler (null-guarded) ──
/// <summary>Verifies that an event log query with a handler is forwarded to the event log handler.</summary>
[Fact]
public void EventLogQuery_WithHandler_ForwardsToEventLogHandler()
{
@@ -127,6 +134,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Same(eventLog.Ref, route.Target);
}
/// <summary>Verifies that an event log query without a handler replies that the handler is not available.</summary>
[Fact]
public void EventLogQuery_WithoutHandler_RepliesHandlerNotAvailable()
{
@@ -145,6 +153,7 @@ public class SiteCommandDispatcherTests : TestKit
// ── Parked handler (null-guarded) — stays NODE-LOCAL on purpose (replicated store) ──
/// <summary>The five parked commands, each of which routes to the per-node parked handler.</summary>
/// <returns>The parked command types, one per xunit member-data row.</returns>
public static IEnumerable<object[]> ParkedCommandTypes() => new[]
{
typeof(ParkedMessageQueryRequest),
@@ -154,6 +163,8 @@ public class SiteCommandDispatcherTests : TestKit
typeof(DiscardParkedOperation),
}.Select(t => new object[] { t });
/// <summary>Verifies that each parked command with a handler is routed to the node-local parked handler and never to the proxy.</summary>
/// <param name="commandType">The command message type under test.</param>
[Theory]
[MemberData(nameof(ParkedCommandTypes))]
public void ParkedCommands_WithHandler_RouteToNodeLocalParkedHandler_NeverTheProxy(Type commandType)
@@ -173,6 +184,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.NotSame(dm.Ref, route.Target);
}
/// <summary>Verifies that a parked message query without a handler replies that the handler is not available.</summary>
[Fact]
public void ParkedMessageQuery_WithoutHandler_RepliesHandlerNotAvailable()
{
@@ -187,6 +199,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Equal(command.PageNumber, reply.PageNumber);
}
/// <summary>Verifies that a parked message retry without a handler replies that the handler is not available.</summary>
[Fact]
public void ParkedMessageRetry_WithoutHandler_RepliesHandlerNotAvailable()
{
@@ -198,6 +211,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Equal(command.CorrelationId, reply.CorrelationId);
}
/// <summary>Verifies that a parked message discard without a handler replies that the handler is not available.</summary>
[Fact]
public void ParkedMessageDiscard_WithoutHandler_RepliesHandlerNotAvailable()
{
@@ -209,6 +223,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Equal(command.CorrelationId, reply.CorrelationId);
}
/// <summary>Verifies that retrying a parked operation without a handler replies with a not-applied acknowledgement.</summary>
[Fact]
public void RetryParkedOperation_WithoutHandler_RepliesNotAppliedAck()
{
@@ -221,6 +236,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.NotNull(reply.ErrorMessage);
}
/// <summary>Verifies that discarding a parked operation without a handler replies with a not-applied acknowledgement.</summary>
[Fact]
public void DiscardParkedOperation_WithoutHandler_RepliesNotAppliedAck()
{
@@ -234,6 +250,7 @@ public class SiteCommandDispatcherTests : TestKit
// ── Commands that must NOT enter ResolveRoute ──
/// <summary>Verifies that route resolution rejects the failover command, which must go through PrepareFailover instead.</summary>
[Fact]
public void ResolveRoute_RejectsFailover_ItGoesThroughPrepareFailover()
{
@@ -244,6 +261,7 @@ public class SiteCommandDispatcherTests : TestKit
// ── Failover (local path) ──
/// <summary>Verifies that handling a failover resolves the target, leaves the cluster, and then acknowledges with the target.</summary>
[Fact]
public void HandleFailover_ResolvesAndLeaves_ThenAcksWithTheTarget()
{
@@ -269,6 +287,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.True(leaveIssued);
}
/// <summary>Verifies that handling a failover is refused when there is no peer node.</summary>
[Fact]
public void HandleFailover_RefusesWhenThereIsNoPeer()
{
@@ -281,6 +300,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.NotNull(ack.ErrorMessage);
}
/// <summary>Verifies that a failover command addressed to another site is refused without touching the resolver.</summary>
[Fact]
public void HandleFailover_RefusesACommandAddressedToAnotherSite_WithoutTouchingTheResolver()
{
@@ -294,6 +314,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.False(invoked);
}
/// <summary>Verifies that a fault while leaving the cluster is reported in the reply rather than thrown.</summary>
[Fact]
public void HandleFailover_FaultInTheLeave_IsReportedNotThrown()
{
@@ -306,6 +327,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Contains("cluster unavailable", ack.ErrorMessage);
}
/// <summary>Verifies that PrepareFailover builds the acknowledgement from a dry run and does not leave the cluster until the commit-leave step runs.</summary>
[Fact]
public void PrepareFailover_BuildsTheAckFromADryRun_WithoutLeaving_UntilCommitLeaveRuns()
{
@@ -334,6 +356,7 @@ public class SiteCommandDispatcherTests : TestKit
Assert.Equal(new[] { "resolve", "leave" }, events);
}
/// <summary>Verifies that a refused PrepareFailover has no deferred leave to commit.</summary>
[Fact]
public void PrepareFailover_WhenRefused_HasNoDeferredLeave()
{