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
@@ -40,6 +40,7 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
private TestServer _server = null!;
/// <summary>Boots the in-process gRPC host with the real interceptor.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
public async Task InitializeAsync()
{
_host = await new HostBuilder()
@@ -69,7 +70,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
_server = _host.GetTestServer();
}
/// <inheritdoc />
/// <summary>Stops and disposes the in-process gRPC host.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
public async Task DisposeAsync()
{
await _host.StopAsync();
@@ -93,7 +95,9 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
private sealed class FixedPskProvider(string key) : ISitePskProvider
{
/// <inheritdoc />
public ValueTask<string> GetAsync(string siteId, CancellationToken ct) => new(key);
/// <inheritdoc />
public void Invalidate(string siteId) { }
}
@@ -103,6 +107,7 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
/// <summary>The site header the last accepted call carried.</summary>
public string? LastSiteHeader { get; private set; }
/// <inheritdoc />
public override Task<PullAuditEventsResponse> PullAuditEvents(
PullAuditEventsRequest request, ServerCallContext context)
{
@@ -111,6 +116,7 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
return Task.FromResult(new PullAuditEventsResponse { MoreAvailable = false });
}
/// <inheritdoc />
public override async Task SubscribeInstance(
InstanceStreamRequest request,
IServerStreamWriter<SiteStreamEvent> responseStream,
@@ -125,6 +131,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
}
}
/// <summary>Verifies that the control-plane channel can receive a worst-case audit-sized message.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task CM1_ControlPlaneChannelReceivesWorstCaseAuditSizedMessage()
{
@@ -135,6 +143,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
Assert.Equal(17 * 1024 * 1024, call.ResponseStream.Current.CorrelationId.Length);
}
/// <summary>Verifies that a call carrying the correct key is accepted on a unary call.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task CorrectKey_IsAccepted_OnAUnaryCall()
{
@@ -146,6 +156,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
Assert.False(reply.MoreAvailable);
}
/// <summary>Verifies that a call carrying the wrong key is rejected with a permission-denied status.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WrongKey_IsRejected_WithPermissionDenied()
{
@@ -158,6 +170,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
Assert.Equal(StatusCode.PermissionDenied, ex.StatusCode);
}
/// <summary>Verifies that a call with no credentials is rejected.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task NoCredentialsAtAll_IsRejected()
{
@@ -171,6 +185,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
Assert.Equal(StatusCode.PermissionDenied, ex.StatusCode);
}
/// <summary>Verifies that the credentials are applied to streaming calls as well as unary calls.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task CredentialsApplyToStreamingCalls_NotJustUnaryOnes()
{
@@ -186,6 +202,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
Assert.Equal("c1", call.ResponseStream.Current.CorrelationId);
}
/// <summary>Verifies that the wrong key is also rejected on streaming calls.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WrongKey_IsRejected_OnStreamingCallsToo()
{
@@ -200,6 +218,8 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
Assert.Equal(StatusCode.PermissionDenied, ex.StatusCode);
}
/// <summary>Verifies that a key that cannot be resolved fails the call instead of sending it without credentials.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task AnUnresolvableKey_FailsTheCall_RatherThanDialingWithoutOne()
{
@@ -225,11 +245,15 @@ public class ControlPlaneAuthEndToEndTests : IAsyncLifetime
private sealed class ThrowingPskProvider : ISitePskProvider
{
/// <inheritdoc />
public ValueTask<string> GetAsync(string siteId, CancellationToken ct)
=> throw new InvalidOperationException($"no key for '{siteId}'");
/// <inheritdoc />
public void Invalidate(string siteId) { }
}
/// <summary>Verifies that the site header is sent with the call so central can choose a per-site key.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task TheSiteHeaderTravels_SoCentralCanPickAPerSiteKeyInPhase1A()
{