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
@@ -37,6 +37,7 @@ public class SiteScriptCompileCacheTests
private static ScriptCompilationResult Ok() =>
ScriptCompilationResult.Succeeded(CSharpScript.Create<object?>("1", ScriptOptions.Default, typeof(ScriptGlobals)));
/// <summary>Verifies that GetOrAdd with the same code and globals computes the value only once.</summary>
[Fact]
public void GetOrAdd_SameCodeAndGlobals_ComputesOnce()
{
@@ -52,6 +53,7 @@ public class SiteScriptCompileCacheTests
Assert.Equal(1, _cache.Count);
}
/// <summary>Verifies that GetOrAdd with the same code but different globals creates separate entries.</summary>
[Fact]
public void GetOrAdd_SameCode_DifferentGlobals_AreSeparateEntries()
{
@@ -114,6 +116,7 @@ public class SiteScriptCompileCacheTests
() => throw new InvalidOperationException("our entry was evicted by another cache")));
}
/// <summary>Verifies that overflowing the cache keeps it within its bound.</summary>
[Fact]
public void Overflow_StaysWithinTheBound()
{
@@ -132,10 +135,10 @@ public class SiteScriptCompileCacheTests
Assert.True(recomputed > 0, "no oldest-batch entry was evicted — the overflow sweep did not run");
}
// ── WP3.1: approximate LRU replaced the wholesale-Clear overflow cliff ──────────
// ── Approximate LRU replaced the wholesale-Clear overflow cliff ──────────
/// <summary>
/// WP3.1 (test group 8): overflow must evict only the OLDEST batch, keeping hot entries.
/// Overflow must evict only the OLDEST batch, keeping hot entries.
/// The old behaviour cleared all 1024 entries, so the very next deploy or Instance-Actor
/// start paid a full recompile storm on actor threads.
/// </summary>
@@ -177,10 +180,11 @@ public class SiteScriptCompileCacheTests
}
/// <summary>
/// WP3.1: concurrent inserts crossing the bound together must not blow past it — the
/// Concurrent inserts crossing the bound together must not blow past it — the
/// eviction sweep is double-checked under its own lock precisely so a stampede performs
/// one sweep rather than one per racing thread.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ConcurrentGetOrAddStorm_KeepsTheBound()
{
@@ -199,7 +203,7 @@ public class SiteScriptCompileCacheTests
// (register row 100 — it used to be 512, to absorb inserts from other test classes
// sharing the process-global cache; nothing foreign can reach this instance).
// The property under test is that 3200 distinct inserts do not accumulate — before
// WP3.1 this was a wholesale clear, and a per-entry eviction bug would show up here as
// the change to approximate LRU this was a wholesale clear, and a per-entry eviction bug would show up here as
// unbounded growth, not as a handful of extra rows.
Assert.True(_cache.Count <= SiteScriptCompileCache.MaxEntries + tasks,
$"cache grew past its bound: {_cache.Count} vs max {SiteScriptCompileCache.MaxEntries} " +