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
@@ -21,6 +21,7 @@ public class RouteHelperTraceTests
private readonly ICentralAuditWriter _writer = Substitute.For<ICentralAuditWriter>();
private readonly INodeIdentityProvider _node = Substitute.For<INodeIdentityProvider>();
/// <summary>Wires the instance locator and audit writer doubles.</summary>
public RouteHelperTraceTests()
{
_locator.GetSiteIdForInstanceAsync("inst-1", Arg.Any<CancellationToken>()).Returns("SiteA");
@@ -33,6 +34,8 @@ public class RouteHelperTraceTests
private static AuditEvent SiteEvent(Guid exec) => ScadaBridgeAuditEventFactory.Create(
AuditChannel.ScriptTrace, AuditKind.ScriptRun, AuditStatus.Delivered, executionId: exec, target: "doWork");
/// <summary>Verifies that a route failure does not persist an echoed secret when body capture is disabled.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task EI2_RouteFailureWithBodyCaptureDisabled_DoesNotPersistEchoedSecret()
{
@@ -44,6 +47,8 @@ public class RouteHelperTraceTests
Assert.DoesNotContain("SECRET123", System.Text.Json.JsonSerializer.Serialize(row));
}
/// <summary>Verifies that a call writes a route-call row using the parent as execution id and the child id from the reply.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Call_WritesRouteCallRow_WithParentAsExecutionId_AndChildFromReply()
{
@@ -70,6 +75,8 @@ public class RouteHelperTraceTests
Assert.Equal("99", row.ResponseSummary);
}
/// <summary>Verifies that the route-call row is always written, even when the run is not traced, and the request carries trace false.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Call_IsAlwaysOn_EvenWhenNotTraced_AndTraceFalseOnRequest()
{
@@ -83,6 +90,8 @@ public class RouteHelperTraceTests
Assert.Single(_written);
}
/// <summary>Verifies that enabling tracing propagates the trace flag to both the call and the set-attributes request.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WithTrace_PropagatesOnCallAndSetAttributes()
{
@@ -101,6 +110,8 @@ public class RouteHelperTraceTests
Assert.True(set!.Trace);
}
/// <summary>Verifies that the sink receives the route-call row followed by the reply's trace events, in order.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sink_ReceivesRouteCallRow_ThenTheReplysTraceEvents_InOrder()
{
@@ -119,6 +130,8 @@ public class RouteHelperTraceTests
Assert.Same(siteEvents[1], sunk[2]);
}
/// <summary>Verifies that a routing failure writes a failed row and still throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Failure_WritesFailedRow_AndStillThrows()
{
@@ -132,6 +145,8 @@ public class RouteHelperTraceTests
Assert.Equal("script faulted", row.ErrorMessage);
}
/// <summary>Verifies that with no writer and no sink nothing is written and no exception is thrown.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task NoWriterAndNoSink_WritesNothing_AndNeverThrows()
{
@@ -144,6 +159,8 @@ public class RouteHelperTraceTests
Assert.Empty(_written);
}
/// <summary>Verifies that a faulting audit writer does not fail the call.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FaultingWriter_DoesNotFailTheCall()
{