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
@@ -6,12 +6,14 @@ using ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.TestSupport;
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Scripts;
/// <summary>
/// WP3.2 (site_events volume policy — docs/plans/2026-08-15-site-events-policy-design.md,
/// stage (b) test plan item 5): <see cref="ScriptRunSummaryRecorder"/> in isolation — no
/// Site-events volume policy (docs/plans/2026-08-15-site-events-policy-design.md):
/// <see cref="ScriptRunSummaryRecorder"/> in isolation — no
/// actor, no hosted service, just the accumulate/flush contract.
/// </summary>
public class ScriptRunSummaryRecorderTests
{
/// <summary>Verifies that flushing with no activity emits no row.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ZeroActivity_FlushEmitsNoRow()
{
@@ -24,6 +26,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Empty(siteLog.Entries);
}
/// <summary>Verifies that flushing mixed outcomes emits one row with the correct totals.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task MixedOutcomes_FlushEmitsOneRowWithCorrectTotals()
{
@@ -63,6 +67,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Equal(3, scripts.GetArrayLength());
}
/// <summary>Verifies that the counters reset after a flush.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task CountersReset_AfterFlush()
{
@@ -81,6 +87,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Empty(secondLog.Entries);
}
/// <summary>Verifies that more than fifty scripts cap the breakdown and roll up the remainder.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task MoreThanFiftyScripts_CapsBreakdownAndRollsUpTheRest()
{
@@ -122,6 +130,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Equal(60, top.GetProperty("started").GetInt64());
}
/// <summary>Verifies that concurrent increments are race-free.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ConcurrentIncrements_AreRaceFree()
{
@@ -149,6 +159,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Contains($"{expectedTotal} completed", row.Message);
}
/// <summary>Verifies that a run spanning a flush boundary still reports its completion in the next window.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RunSpanningAFlushBoundary_StillReportsItsCompletionInTheNextWindow()
{
@@ -183,6 +195,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Equal(42, script.GetProperty("maxDurationMs").GetInt64());
}
/// <summary>Verifies that a completion-only entry does not undo idle flush suppression.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task CompletionOnlyEntry_DoesNotResurrectTheIdleFlushSuppression()
{
@@ -198,6 +212,8 @@ public class ScriptRunSummaryRecorderTests
Assert.Empty(idleLog.Entries);
}
/// <summary>Verifies that duration tracking reports the average and maximum.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DurationTracking_ReportsAverageAndMax()
{