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
@@ -4,7 +4,7 @@ using Microsoft.Extensions.Options;
namespace ZB.MOM.WW.ScadaBridge.SiteEventLogging.Tests;
/// <summary>
/// WP1.7 (arch-review remediation, 2026-08-14): <see cref="SiteEventLogger"/>'s
/// The <see cref="SiteEventLogger"/>'s
/// background writer loop must drain its bounded channel into batched transactions
/// (up to <see cref="SiteEventLogger.WriteBatchSize"/> events per commit) instead of
/// committing one transaction per event — mirroring the reference shape in
@@ -17,6 +17,7 @@ public class SiteEventLoggerBatchingTests : IDisposable
private readonly string _dbPath;
private readonly TestLocalDb _localDb;
/// <summary>Initializes a new instance of the <see cref="SiteEventLoggerBatchingTests"/> class with a temporary LocalDb file.</summary>
public SiteEventLoggerBatchingTests()
{
_dbPath = Path.Combine(Path.GetTempPath(), $"test_batch_{Guid.NewGuid()}.db");
@@ -25,6 +26,7 @@ public class SiteEventLoggerBatchingTests : IDisposable
_logger = new SiteEventLogger(options, NullLogger<SiteEventLogger>.Instance, _localDb.Db);
}
/// <summary>Releases the resources held by this test class.</summary>
public void Dispose()
{
_logger.Dispose();
@@ -32,6 +34,8 @@ public class SiteEventLoggerBatchingTests : IDisposable
TestLocalDb.DeleteFiles(_dbPath);
}
/// <summary>Verifies that logging a single event commits exactly one batch.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task LogEventAsync_SingleEvent_CommitsOneBatch()
{
@@ -40,6 +44,8 @@ public class SiteEventLoggerBatchingTests : IDisposable
Assert.Equal(1, _logger.CommittedBatchCount);
}
/// <summary>Verifies that a burst of queued events commits far fewer batches than events.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ProcessWriteQueue_BurstOfQueuedEvents_CommitsFarFewerBatchesThanEvents()
{
@@ -102,6 +108,8 @@ public class SiteEventLoggerBatchingTests : IDisposable
Assert.Equal(burstCount, count);
}
/// <summary>Verifies that a batch failure faults every queued event so none is silently dropped.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ProcessWriteQueue_BatchFailure_FaultsEveryQueuedEvent_NoneSilentlyDropped()
{
@@ -156,6 +164,8 @@ public class SiteEventLoggerBatchingTests : IDisposable
$"Expected FailedWriteCount to account for all {burstCount} events in the rolled-back batch, got {_logger.FailedWriteCount}.");
}
/// <summary>Verifies that a poison row in the middle of a batch fails alone while the other rows are written.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ProcessWriteQueue_PoisonRowMidBatch_OtherRowsLand_AndOnlyThePoisonRowIsCountedFailed()
{
@@ -223,6 +233,8 @@ public class SiteEventLoggerBatchingTests : IDisposable
Assert.Equal(burstCount - 1, landed);
}
/// <summary>Verifies that disposing the logger persists events that are still queued at shutdown.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Dispose_PersistsEventsStillQueuedAtShutdown()
{