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
@@ -19,6 +19,7 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"audit-readbyexec-{Guid.NewGuid():N}.db");
private static readonly DateTime T0 = new(2026, 9, 5, 12, 0, 0, DateTimeKind.Utc);
/// <summary>Releases the resources held by the test fixture.</summary>
public void Dispose()
{
if (File.Exists(_dbPath)) { try { File.Delete(_dbPath); } catch { /* best-effort */ } }
@@ -33,6 +34,9 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
ScadaBridgeAuditEventFactory.Create(AuditChannel.ScriptTrace, kind, AuditStatus.Delivered,
occurredAtUtc: at, executionId: exec, parentExecutionId: parent, sourceSiteId: "site-a");
/// <summary>Verifies that the trace read plan uses the execution-id indexes instead of scanning the retained store.</summary>
/// <param name="idCount">The number of execution ids included in the read.</param>
/// <returns>A task that represents the asynchronous operation.</returns>
[Theory]
[InlineData(1)]
[InlineData(64)]
@@ -56,6 +60,8 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
Assert.DoesNotContain(plan, p => p.StartsWith("SCAN audit_event", StringComparison.Ordinal));
}
/// <summary>Verifies that legacy rows with malformed details JSON do not break startup or trace reads.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task LegacyMalformedDetails_DoNotBreakStartupOrTraceReads()
{
@@ -81,6 +87,8 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
Assert.Equal(row.EventId, Assert.Single(await reopenedAgain.ReadByExecutionIdsAsync([root], DateTime.MinValue, 2000)).EventId);
}
/// <summary>Verifies that the cursor pages through rows with equal timestamps without repeating or skipping any.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Cursor_PagesEqualTimestampsWithoutRepeatingOrSkippingRows()
{
@@ -100,6 +108,8 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
first.Concat(second).Select(e => e.EventId));
}
/// <summary>Verifies that rows matching either the execution id or the parent execution id are returned in order and within the bound.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task MatchesExecutionId_OrParentExecutionId_OrderedAndBounded()
{
@@ -145,6 +155,7 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
/// ApiOutbound row (or any other channel) stored under the execution id is served alongside
/// the ScriptTrace rows, in time order. Pins that no channel predicate creeps in.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ServesOutboundRows_NoChannelPredicate()
{
@@ -171,6 +182,8 @@ public class SqliteAuditWriterReadByExecutionTests : IDisposable
Assert.Equal(AuditChannel.ApiOutbound, AuditRowProjection.Decompose(hits[1]).Channel);
}
/// <summary>Verifies that the read guards reject an invalid limit and an oversized id list.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Guards_LimitAndIdCap()
{