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
@@ -14,7 +14,7 @@ using ZB.MOM.WW.ScadaBridge.SiteRuntime.Scripts;
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Actors;
/// <summary>
/// WP3.1 test groups 1 and 2 — the regression pin for arch-review finding #4 (High).
/// Test groups 1 and 2 — the regression pin for the trigger-evaluation starvation finding.
///
/// <para><b>The finding.</b> Trigger-expression evaluation used to be queued onto the same
/// fixed 8-thread <see cref="ScriptExecutionScheduler"/> that runs blocking script bodies. Eight
@@ -33,6 +33,7 @@ public class TriggerEvalStarvationTests : TestKit, IDisposable
{
private readonly SharedScriptLibrary _sharedLibrary;
/// <summary>Initializes a new instance of the <c>TriggerEvalStarvationTests</c> class.</summary>
public TriggerEvalStarvationTests()
{
var compilationService = new ScriptCompilationService(
@@ -42,6 +43,7 @@ public class TriggerEvalStarvationTests : TestKit, IDisposable
StarvationHooks.Gate = new SemaphoreSlim(0);
}
/// <inheritdoc />
void IDisposable.Dispose()
{
StarvationHooks.Gate.Release(32);
@@ -70,11 +72,11 @@ public class TriggerEvalStarvationTests : TestKit, IDisposable
}
/// <summary>
/// GROUP 1 — the finding-#4 regression pin. Eight script bodies blocked on a semaphore
/// GROUP 1 — the trigger-evaluation starvation regression pin. Eight script bodies blocked on a semaphore
/// occupy every thread of an 8-thread pool; an Expression-triggered alarm must still raise
/// in well under 2 s.
///
/// <para>On the pre-WP3.1 wiring this test does not merely fail slowly — it never
/// <para>On the previous wiring this test does not merely fail slowly — it never
/// completes: the evaluation sits in the same FIFO behind eight bodies that only unblock
/// after the assertion window, and its 2 s timeout has not even started ticking.</para>
/// </summary>
@@ -138,6 +140,7 @@ public class TriggerEvalStarvationTests : TestKit, IDisposable
/// false) at its timeout rather than stalling indefinitely — and the trigger must drain
/// rather than park, so the next change still evaluates.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SaturatedEvalGate_ResolvesTheQueuedEvaluationAtItsEnqueueAnchoredDeadline()
{
@@ -169,7 +172,7 @@ public class TriggerEvalStarvationTests : TestKit, IDisposable
// 3. The next evaluation can never acquire the gate. Its deadline was armed at
// enqueue, so it cancels at ~1 s, is treated as false, and clears the alarm.
// Pre-WP3.1 the clock started at dequeue, so this would hang forever.
// Previously the clock started at dequeue, so this would hang forever.
var stopwatch = Stopwatch.StartNew();
alarm.Tell(new AttributeValueChanged("Inst1", "A", "A", 2, "Good", DateTimeOffset.UtcNow));
var cleared = instanceProbe.ExpectMsg<AlarmStateChanged>(TimeSpan.FromSeconds(10));