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
@@ -64,6 +64,7 @@ public class ArtifactRevisionHashServiceTests
IReadOnlyList<string>? missing = null) =>
Command() with { Secrets = secrets, MissingSecrets = missing };
/// <summary>Verifies that changing a secret changes the hash while reordering secrets does not.</summary>
[Fact]
public void SecretChanges_MoveTheHash_ButOrderDoesNot()
{
@@ -78,6 +79,7 @@ public class ArtifactRevisionHashServiceTests
Assert.NotEqual(baseline, svc.ComputeHash(Cmd(secrets: [a with { KekId = "kek-B" }, b])));
}
/// <summary>Verifies that a missing secret hashes differently from a present one.</summary>
[Fact]
public void MissingSecret_HashesDifferentlyFromPresent()
{
@@ -88,13 +90,14 @@ public class ArtifactRevisionHashServiceTests
svc.ComputeHash(Cmd(missing: ["A"])));
}
/// <summary>Verifies that the hash of a command without secrets still matches the golden value captured before secrets were added.</summary>
[Fact]
public void ComputeHash_PreSecretsGoldenValue_IsUnchanged()
{
// Captured on HEAD 738e4587 — BEFORE Task 4 wired Secrets/MissingSecrets into the
// Captured on HEAD 738e4587 — BEFORE Secrets/MissingSecrets were wired into the
// projection — using the fixed default baseline (one of each existing artifact
// kind) with a pinned deploymentId/timestamp. A command with Secrets == null and
// MissingSecrets == null must keep hashing to this exact value after Task 4, or a
// MissingSecrets == null must keep hashing to this exact value after that change, or a
// site with no secret references would spuriously flip to "out of date".
var golden = Command(
deploymentId: "golden",
@@ -105,6 +108,7 @@ public class ArtifactRevisionHashServiceTests
_sut.ComputeHash(golden));
}
/// <summary>Verifies that hashing the same input twice produces the same hash.</summary>
[Fact]
public void ComputeHash_SameInputTwice_ProducesSameHash()
{
@@ -114,6 +118,7 @@ public class ArtifactRevisionHashServiceTests
_sut.ComputeHash(Command(timestamp: timestamp)));
}
/// <summary>Verifies that the hash is a SHA-256 value encoded as hexadecimal.</summary>
[Fact]
public void ComputeHash_IsSha256HexEncoded()
{
@@ -126,6 +131,7 @@ public class ArtifactRevisionHashServiceTests
Assert.All(digest, c => Assert.Contains(c, "0123456789abcdef"));
}
/// <summary>Verifies that reordering the artifact lists produces the same hash.</summary>
[Fact]
public void ComputeHash_ReorderedArtifactLists_ProducesSameHash()
{
@@ -143,6 +149,7 @@ public class ArtifactRevisionHashServiceTests
Assert.Equal(_sut.ComputeHash(baseline), _sut.ComputeHash(reordered));
}
/// <summary>Verifies that reordering the methods of an external system produces the same hash.</summary>
[Fact]
public void ComputeHash_ReorderedExternalSystemMethods_ProducesSameHash()
{
@@ -162,6 +169,7 @@ public class ArtifactRevisionHashServiceTests
Assert.Equal(_sut.ComputeHash(a), _sut.ComputeHash(b));
}
/// <summary>Verifies that reordering camelCase method names produces the same hash.</summary>
[Fact]
public void ComputeHash_ReorderedCamelCaseMethodNames_ProducesSameHash()
{
@@ -182,6 +190,7 @@ public class ArtifactRevisionHashServiceTests
Assert.Equal(_sut.ComputeHash(a), _sut.ComputeHash(b));
}
/// <summary>Verifies that unparseable method definitions still participate in the hash.</summary>
[Fact]
public void ComputeHash_UnparseableMethodDefinitions_StillParticipatesInTheHash()
{
@@ -195,6 +204,7 @@ public class ArtifactRevisionHashServiceTests
Assert.NotEqual(_sut.ComputeHash(a), _sut.ComputeHash(b));
}
/// <summary>Verifies that a different deployment id and timestamp produce the same hash.</summary>
[Fact]
public void ComputeHash_DifferentDeploymentIdAndTimestamp_ProducesSameHash()
{
@@ -206,6 +216,7 @@ public class ArtifactRevisionHashServiceTests
Assert.Equal(_sut.ComputeHash(a), _sut.ComputeHash(b));
}
/// <summary>Verifies that empty and null artifact lists hash identically.</summary>
[Fact]
public void ComputeHash_EmptyAndNullArtifactLists_HashIdentically()
{
@@ -217,6 +228,7 @@ public class ArtifactRevisionHashServiceTests
Assert.Equal(_sut.ComputeHash(withNulls), _sut.ComputeHash(withEmpties));
}
/// <summary>Verifies that notification and SMTP artifacts do not affect the hash.</summary>
[Fact]
public void ComputeHash_NotificationAndSmtpArtifacts_DoNotAffectTheHash()
{
@@ -233,6 +245,8 @@ public class ArtifactRevisionHashServiceTests
Assert.Equal(_sut.ComputeHash(baseline), _sut.ComputeHash(withCentralOnlyPayload));
}
/// <summary>Provides one deploy command per artifact field, each differing from its baseline in exactly that field.</summary>
/// <returns>Theory data of the changed field name and the changed command.</returns>
public static TheoryData<string, DeployArtifactsCommand> ChangedFieldCases()
{
var data = new TheoryData<string, DeployArtifactsCommand>();
@@ -288,6 +302,9 @@ public class ArtifactRevisionHashServiceTests
return data;
}
/// <summary>Verifies that changing any single artifact field changes the hash.</summary>
/// <param name="changedField">The name of the artifact field that differs from the baseline.</param>
/// <param name="changed">The command whose single field differs from the baseline.</param>
[Theory]
[MemberData(nameof(ChangedFieldCases))]
public void ComputeHash_EveryArtifactField_ParticipatesInTheHash(
@@ -312,6 +329,7 @@ public class ArtifactRevisionHashServiceTests
Assert.NotEqual(_sut.ComputeHash(baseline), _sut.ComputeHash(changed));
}
/// <summary>Verifies that the hashable records declare their properties in alphabetical order.</summary>
[Fact]
public void HashableRecords_PropertiesDeclaredAlphabetically()
{