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
@@ -49,6 +49,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
private readonly SharedScriptLibrary _sharedScriptLibrary;
private readonly TestLocalDb _localDb;
/// <summary>Creates a temporary LocalDb-backed site store and the compilation services for each test.</summary>
public InstanceSweepSelfHealTests()
{
_localDb = TestLocalDb.CreateTemp("instance-sweep-test");
@@ -60,6 +61,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
_compilationService, NullLogger<SharedScriptLibrary>.Instance);
}
/// <inheritdoc />
void IDisposable.Dispose()
{
// Shut the actors down BEFORE the ILocalDb they write through is disposed.
@@ -191,7 +193,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
// ── Row 78: a config that arrives with no deploy, no enable and no reconcile ──
/// <summary>
/// THE row-78 reproduction. The node boots with an empty deployed-config store (so the
/// THE reproduction of the missing-start bug. The node boots with an empty deployed-config store (so the
/// boot-time load starts nothing), and the config for an ENABLED instance then appears in
/// storage on its own — exactly what LocalDb's CDC sync applier does when it seeds a fresh
/// node from its peer. No <see cref="DeployInstanceCommand"/>, no
@@ -202,6 +204,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// snapshot still answers <c>InstanceNotFound = true</c>, the live symptom verbatim.
/// </para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_StartsEnabledInstance_WhoseConfigArrivedWithoutADeployOrReconcile()
{
@@ -231,6 +234,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// pattern as row 67, with the trigger named so an operator can tell a sweep heal from a
/// startup-reconcile heal.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SweepStartedInstance_EmitsAWarningSiteEvent_NamingTheSweepTrigger()
{
@@ -259,6 +263,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// A DISABLED instance legitimately has a config row and no running actor. The sweep must
/// never start it — that would silently undo an operator's disable.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_NeverStarts_ADisabledInstance()
{
@@ -280,6 +285,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// that re-fired every tick would be a restart loop plus an unbounded stream of Warning site
/// events.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_StartsTheInstanceExactlyOnce_AcrossManySweeps()
{
@@ -306,6 +312,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// A sweep that finds nothing wrong must be completely silent — no site events at all. This
/// runs on every tick of every healthy site, forever.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_IsSilent_WhenThereIsNothingToHeal()
{
@@ -327,6 +334,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// site that wants the pre-fix behaviour keeps it (and the option's disable path is proven,
/// not merely validated).
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_DoesNothing_WhenTheIntervalIsZero()
{
@@ -355,6 +363,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// nothing.
/// </para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_DefersToAnInFlightRedeploy()
{
@@ -393,17 +402,18 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
// ── Row 72: a running actor serving a revision the store has replaced ──
/// <summary>
/// THE row-72 reproduction. An instance is deployed and running at <c>rev-1</c>; the durable
/// row is then refreshed to <c>rev-2</c> out of band — what
/// THE reproduction of the stale-revision bug. An instance is deployed and running at its first
/// revision; the durable row is then refreshed to the second revision out of band — what
/// <c>StoreDeployedConfigIfNewerAsync</c> does when the startup reconcile finds a STALE
/// config, and what a replicated deploy does on the standby.
///
/// <para>
/// <b>Fails before the fix</b>: the actor keeps serving <c>rev-1</c>'s config indefinitely
/// <b>Fails before the fix</b>: the actor keeps serving the first revision's config indefinitely
/// (the snapshot still shows the old attribute value) and nothing anywhere says the stored
/// and running revisions differ.
/// </para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_RestartsInstance_ServingAStaleRevision()
{
@@ -444,6 +454,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// The stale-revision restart must not fire when the stored and running revisions agree —
/// otherwise every healthy instance on the site would be restarted once a minute.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_DoesNotRestart_WhenStoredAndRunningRevisionsMatch()
{
@@ -470,6 +481,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// site events for a config that can never apply, and the running instance is unharmed —
/// the gate returns before anything is stopped, so it keeps serving the old config.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Sweep_StaleRestartRejectedByTheCompileGate_IsAnnouncedOnceAndNotRetried()
{
@@ -541,12 +553,12 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
StoreGenerationAtRead: generationAtRead);
/// <summary>
/// <b>Deferred register row 101, the row-72 leg.</b> A sweep read dispatched before a deploy
/// <b>Deferred register row 101, the stale-revision leg.</b> A sweep read dispatched before a deploy
/// persisted its new row can land after that deploy has completed AND after the deploy
/// pipeline released the instance — <see cref="DeploymentManagerActor"/>'s
/// <c>InstanceIsOwnedByADeployPipeline</c> only covers a deploy still in flight, so it is no
/// defence here. The snapshot then carries the revision the deploy just REPLACED while the
/// running actor carries the new one, which is bit-for-bit the divergence the row-72 repair
/// running actor carries the new one, which is bit-for-bit the divergence the stale-revision repair
/// looks for — in the wrong direction.
///
/// <para>
@@ -556,6 +568,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// claim marks the OLD revision as attempted, so the instance simply stays reverted.
/// </para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task StaleSweepSnapshot_CarryingASupersededRevision_DoesNotRestartBackward()
{
@@ -586,7 +599,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
}
/// <summary>
/// The row-101 guard must not blunt the row-72 repair it sits in front of: the SAME message
/// The stale-snapshot guard must not blunt the stale-revision repair it sits in front of: the SAME message
/// stamped with the CURRENT generation is a genuine answer and must still converge the
/// runtime on the stored revision.
///
@@ -597,6 +610,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// meaning, which is the whole point of the guard.
/// </para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FreshSweepSnapshot_CarryingANewerRevision_StillRestartsTheInstance()
{
@@ -630,7 +644,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
}
/// <summary>
/// <b>Deferred register row 101, the row-78 leg.</b> A sweep read dispatched before a delete
/// <b>Deferred register row 101, the missing-start leg.</b> A sweep read dispatched before a delete
/// committed still shows the instance's row — enabled, with a config — while the actor has
/// already stopped it and dropped its bookkeeping. The delete specifically clears
/// <c>_sweepAttemptedRevisions</c>, so the once-per-revision claim is freshly available and
@@ -641,6 +655,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// re-adds it to the deployed-name set, and announces the resurrection as a self-heal.
/// </para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task StaleSweepSnapshot_ShowingADeletedInstance_DoesNotResurrectIt()
{
@@ -667,9 +682,10 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
/// <summary>
/// The mirror of the resurrection test: the same enabled-config-with-no-actor snapshot,
/// stamped with the CURRENT generation, must still perform the row-78 start. Nothing has
/// stamped with the CURRENT generation, must still perform the missing-start heal. Nothing has
/// mutated the store through this actor, so <c>0</c> is current here.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FreshSweepSnapshot_ShowingAStoredEnabledInstance_StillStartsIt()
{
@@ -700,6 +716,7 @@ public class InstanceSweepSelfHealTests : TestKit, IDisposable
///
/// <para><b>Fails before the fix</b>: one read, and the pre-mutation snapshot is applied.</para>
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task StaleBootSnapshot_IsReReadRatherThanApplied()
{