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
@@ -12,7 +12,7 @@ using IAuditWriter = ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Services.IAuditWri
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Scripts;
/// <summary>
/// Audit Log #23 — execution-correlation tests exercised through a full
/// Audit Log execution-correlation tests exercised through a full
/// <see cref="ScriptRuntimeContext"/>:
///
/// <list type="bullet">
@@ -40,10 +40,12 @@ public class ExecutionCorrelationContextTests
/// </summary>
private sealed class CapturingAuditWriter : IAuditWriter
{
// C3 (Task 2.5): store the decomposed row view so assertions keep
// Store the decomposed row view so assertions keep
// reading the ScadaBridge domain fields as typed properties.
/// <summary>The audit rows captured by this writer, in write order.</summary>
public List<AuditRowProjection.AuditRowValues> Events { get; } = new();
/// <inheritdoc />
public Task WriteAsync(AuditEvent evt, CancellationToken ct = default)
{
Events.Add(evt.AsRow());
@@ -119,6 +121,8 @@ public class ExecutionCorrelationContextTests
return live;
}
/// <summary>Verifies that no execution id supplied, sync call, stamps fresh non empty execution id.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task NoExecutionIdSupplied_SyncCall_StampsFreshNonEmptyExecutionId()
{
@@ -141,6 +145,8 @@ public class ExecutionCorrelationContextTests
Assert.Null(evt.CorrelationId);
}
/// <summary>Verifies that same context, api call and db write, share the same execution id.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SameContext_ApiCallAndDbWrite_ShareTheSameExecutionId()
{
@@ -189,10 +195,12 @@ public class ExecutionCorrelationContextTests
Assert.Null(dbRow.CorrelationId);
}
/// <summary>Verifies that parent execution id supplied, stamped on emitted row, and distinct from own execution id.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ParentExecutionIdSupplied_StampedOnEmittedRow_AndDistinctFromOwnExecutionId()
{
// Audit Log #23 (ParentExecutionId, Task 5): an inbound-API-routed call
// ParentExecutionId: an inbound-API-routed call
// supplies the spawning execution's ExecutionId as the routed script's
// ParentExecutionId. Every audit row the routed script emits must carry
// that value in AuditEvent.ParentExecutionId — and still carry its OWN
@@ -224,6 +232,8 @@ public class ExecutionCorrelationContextTests
Assert.NotEqual(parentExecutionId, evt.ExecutionId!.Value);
}
/// <summary>Verifies that no parent execution id supplied, non routed run, parent stays null on emitted row.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task NoParentExecutionIdSupplied_NonRoutedRun_ParentStaysNullOnEmittedRow()
{
@@ -246,6 +256,8 @@ public class ExecutionCorrelationContextTests
Assert.NotEqual(Guid.Empty, evt.ExecutionId!.Value);
}
/// <summary>Verifies that parent execution id supplied, stamped on api and db rows, from same context.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ParentExecutionIdSupplied_StampedOnApiAndDbRows_FromSameContext()
{