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,12 +4,14 @@ using ZB.MOM.WW.ScadaBridge.SiteRuntime.Scripts;
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Scripts;
/// <summary>
/// SiteRuntime-009: the dedicated script-execution scheduler must run script bodies on
/// The dedicated script-execution scheduler must run script bodies on
/// its own dedicated threads, not on the shared .NET thread pool, so blocking script
/// I/O cannot starve the global pool.
/// </summary>
public class ScriptExecutionSchedulerTests
{
/// <summary>Verifies that the scheduler does not inline work on another scheduler's worker thread.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Scheduler_DoesNotInlineOnAnotherSchedulersWorker()
{
@@ -24,6 +26,8 @@ public class ScriptExecutionSchedulerTests
}, CancellationToken.None, TaskCreationOptions.None, first);
}
/// <summary>Verifies that the scheduler runs work off the shared thread pool.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Scheduler_RunsWork_OffTheThreadPool()
{
@@ -43,6 +47,7 @@ public class ScriptExecutionSchedulerTests
Assert.StartsWith("script-execution-", threadName);
}
/// <summary>Verifies that the scheduler respects the configured thread count.</summary>
[Fact]
public void Scheduler_RespectsConfiguredThreadCount()
{
@@ -50,6 +55,7 @@ public class ScriptExecutionSchedulerTests
Assert.Equal(4, scheduler.MaximumConcurrencyLevel);
}
/// <summary>Verifies that the shared scheduler returns the same instance for the same options.</summary>
[Fact]
public void Scheduler_Shared_ReturnsSameInstanceForOptions()
{
@@ -59,11 +65,12 @@ public class ScriptExecutionSchedulerTests
Assert.Same(a, b);
}
// Gitea #18: IsDisposed backs the Shared() recreate guard so a disposed scheduler
// IsDisposed backs the Shared() recreate guard so a disposed scheduler
// can never be handed back and silently poison every later execution. Verified on a
// local instance — deliberately NOT by disposing the process-wide singleton, which
// would strand any script another test class queued on it (the very static hazard
// #18 is about).
// this test guards against).
/// <summary>Verifies that <c>IsDisposed</c> flips to true when the scheduler is disposed.</summary>
[Fact]
public void IsDisposed_FlipsOnDispose()
{
@@ -79,6 +86,8 @@ public class ScriptExecutionSchedulerTests
// SiteRuntime-S2/UA5: the scheduler exposes observability gauges so a stuck /
// saturated script-execution pool is visible to operators via site health.
/// <summary>Verifies that the gauges reflect the busy thread count and the queue depth.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Gauges_ReflectBusyThreadAndQueueDepth()
{