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
@@ -57,11 +57,14 @@ public sealed class DeployNotifyFetchTests
/// </summary>
private sealed class SqliteFetchDbContext : ScadaBridgeDbContext
{
/// <summary>Creates the SQLite-adapted context from the supplied options.</summary>
/// <param name="options">The EF Core options for the context.</param>
public SqliteFetchDbContext(DbContextOptions<ScadaBridgeDbContext> options)
: base(options, new EphemeralDataProtectionProvider())
{
}
/// <inheritdoc />
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
@@ -113,6 +116,7 @@ public sealed class DeployNotifyFetchTests
private readonly IHost _host;
private readonly DbContextOptions<ScadaBridgeDbContext> _dbOptions;
/// <summary>Gets the in-memory HTTP client that drives the config-fetch endpoint.</summary>
public HttpClient Client { get; }
/// <summary>Base URL the site presents to the fetcher (the test server's address).</summary>
@@ -131,6 +135,8 @@ public sealed class DeployNotifyFetchTests
BaseUrl = client.BaseAddress!.ToString();
}
/// <summary>Builds the harness: opens the in-memory database, starts the test server and creates the client.</summary>
/// <returns>The ready-to-use harness.</returns>
public static async Task<FetchHarness> CreateAsync()
{
var connection = new SqliteConnection("DataSource=:memory:");
@@ -177,6 +183,8 @@ public sealed class DeployNotifyFetchTests
/// and returns its generated id. The PendingDeployment → Instance FK is enforced by SQLite, so a
/// real row is required.
/// </summary>
/// <param name="uniqueName">The unique name of the instance to create.</param>
/// <returns>The generated instance id.</returns>
public async Task<int> SeedInstanceAsync(string uniqueName)
{
await using var ctx = new SqliteFetchDbContext(_dbOptions);
@@ -197,6 +205,8 @@ public sealed class DeployNotifyFetchTests
/// (<see cref="DeploymentManagerRepository.AddPendingDeploymentAsync"/> + SaveChanges), so
/// supersession of any prior row for the same instance is exercised exactly as in production.
/// </summary>
/// <param name="pending">The pending deployment to stage.</param>
/// <returns>A task that represents the asynchronous operation.</returns>
public async Task StageAsync(PendingDeployment pending)
{
await using var ctx = new SqliteFetchDbContext(_dbOptions);
@@ -205,6 +215,7 @@ public sealed class DeployNotifyFetchTests
await repo.SaveChangesAsync();
}
/// <summary>Releases the resources held by this instance.</summary>
public void Dispose()
{
Client.Dispose();
@@ -239,6 +250,8 @@ public sealed class DeployNotifyFetchTests
// 1. Large config round-trips: the core proof that the 128 KB size limit is gone.
// ----------------------------------------------------------------------------------------
/// <summary>Verifies that a config larger than 128 KB is fetched with its exact bytes intact.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FetchAsync_LargeConfigOver128Kb_RoundTripsExactBytes()
{
@@ -269,6 +282,8 @@ public sealed class DeployNotifyFetchTests
// Fetching A -> 404 (IsSuperseded); fetching B -> B's config.
// ----------------------------------------------------------------------------------------
/// <summary>Verifies that fetching a superseded deployment throws a 404 superseded error while the newest deployment is still served.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FetchAsync_SupersededDeployment_Throws404SupersededAndServesNewest()
{
@@ -295,6 +310,8 @@ public sealed class DeployNotifyFetchTests
// 3. Wrong token: a live, non-expired row with a bad token -> 401 (NOT 404).
// ----------------------------------------------------------------------------------------
/// <summary>Verifies that fetching with a wrong token throws a 401 error that is not reported as superseded.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FetchAsync_WrongToken_Throws401NotSuperseded()
{
@@ -318,6 +335,8 @@ public sealed class DeployNotifyFetchTests
// even with the correct token.
// ----------------------------------------------------------------------------------------
/// <summary>Verifies that fetching an expired row throws a 404 superseded error even with the correct token.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task FetchAsync_ExpiredRow_Throws404SupersededEvenWithCorrectToken()
{