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
@@ -52,6 +52,7 @@ public class FlowGraphBuilderTests
return [inbound, route, wait, run, write2, write1, cascade];
}
/// <summary>Verifies that an inferred device cascade edge is drawn dashed.</summary>
[Fact]
public void InferredDeviceCascade_IsDashed()
{
@@ -65,6 +66,9 @@ public class FlowGraphBuilderTests
Assert.True(edge.External);
}
/// <summary>Verifies that a folded node uses the latest error detail from its rows.</summary>
/// <param name="initialDetail">The error detail on the initial row.</param>
/// <param name="finalDetail">The error detail on the final row.</param>
[Theory]
[InlineData(null, "terminal stack")]
[InlineData("old stack", null)]
@@ -81,6 +85,7 @@ public class FlowGraphBuilderTests
Assert.Equal(finalDetail, step.Lifecycle[1].ErrorDetail);
}
/// <summary>Verifies that the Delmia call shape projects the expected lanes and edges plus a synthesized response.</summary>
[Fact]
public void DelmiaShape_ProjectsLanes_Edges_AndSynthesizedResponse()
{
@@ -142,6 +147,7 @@ public class FlowGraphBuilderTests
Assert.All(graph.Steps, s => Assert.Equal(FlowStepOutcome.Ok, s.Outcome));
}
/// <summary>Verifies that building the graph is deterministic and the synthesized response id is stable.</summary>
[Fact]
public void Build_IsDeterministic_ResponseIdIsStable()
{
@@ -152,6 +158,7 @@ public class FlowGraphBuilderTests
Assert.Equal(a.Edges, b.Edges);
}
/// <summary>Verifies that the truncated flag passes through to the built graph.</summary>
[Fact]
public void Truncated_PassesThrough()
{
@@ -160,6 +167,7 @@ public class FlowGraphBuilderTests
Assert.Empty(FlowGraphBuilder.Build(Array.Empty<AuditEvent>()).Steps);
}
/// <summary>Verifies that an unrecognized step kind projects to an unknown node without throwing.</summary>
[Fact]
public void UnknownKind_ProjectsToUnknown_NeverThrows()
{
@@ -190,6 +198,7 @@ public class FlowGraphBuilderTests
Assert.Empty(graph.Edges);
}
/// <summary>Verifies that a failed script run with a timeout message is classified as timed out.</summary>
[Fact]
public void FailedScriptRun_WithTimeoutMessage_IsTimedOut()
{
@@ -205,6 +214,7 @@ public class FlowGraphBuilderTests
Assert.Single(graph.Edges);
}
/// <summary>Verifies that the script trace extra payload round-trips as camelCase JSON and ignores unknown members.</summary>
[Fact]
public void ScriptTraceExtra_RoundTrips_CamelCase_AndIgnoresUnknownMembers()
{
@@ -219,7 +229,7 @@ public class FlowGraphBuilderTests
Assert.Null(ScriptTraceExtra.TryParse("nope"));
}
// ---- Outbound calls (2026-09-06 plan, Task 2) --------------------------------------------
// ---- Outbound calls (2026-09-06 plan) --------------------------------------------
private static AuditEvent SiteRunRow(int ms, Guid executionId = default) => ScadaBridgeAuditEventFactory.Create(
AuditChannel.ScriptTrace, AuditKind.ScriptRun, AuditStatus.Delivered,
@@ -240,6 +250,7 @@ public class FlowGraphBuilderTests
executionId: SiteRun, sourceSiteId: "site-a", sourceInstanceId: "M1", errorMessage: error, durationMs: durationMs,
requestSummary: request, responseSummary: response);
/// <summary>Verifies that the four rows of a cached API call fold into a single asynchronous node.</summary>
[Fact]
public void CachedApiCall_FourRows_FoldIntoOneAsyncNode()
{
@@ -286,6 +297,7 @@ public class FlowGraphBuilderTests
Assert.Equal(3, graph.Edges.Count);
}
/// <summary>Verifies that a synchronous API call sits in the chain without an asynchronous edge.</summary>
[Fact]
public void SyncApiCall_SitsInChain_NoAsyncEdge()
{
@@ -309,6 +321,7 @@ public class FlowGraphBuilderTests
Assert.DoesNotContain(graph.Edges, e => e.FromEventId == graph.Steps[1].EventId && e.ToEventId == graph.Steps[3].EventId);
}
/// <summary>Verifies that two synchronous calls with no correlation id are not folded together.</summary>
[Fact]
public void TwoSyncCalls_NullCorrelation_AreNotFoldedTogether()
{
@@ -326,6 +339,7 @@ public class FlowGraphBuilderTests
Assert.Equal(2, graph.Edges.Count);
}
/// <summary>Verifies that a notification send and its parked central delivery fold into one parked notify node.</summary>
[Fact]
public void NotifySend_PlusCentralDeliverParked_FoldsIntoOneParkedNotifyNode()
{
@@ -354,6 +368,7 @@ public class FlowGraphBuilderTests
Assert.Equal(notify.EventId, async.ToEventId);
}
/// <summary>Verifies that a cached call with only a submit row is pending and has no duration.</summary>
[Fact]
public void CachedSubmitOnly_IsPending_WithNoDuration()
{
@@ -374,6 +389,7 @@ public class FlowGraphBuilderTests
Assert.Equal(graph.Steps[0].EventId, async.FromEventId);
}
/// <summary>Verifies that the response links from the last step of the inbound execution rather than the last cascaded step.</summary>
[Fact]
public void ResponseLinksFromTheInboundExecutionsLastStep_NotTheLastCascadedStep()
{
@@ -385,6 +401,7 @@ public class FlowGraphBuilderTests
Assert.Equal(FlowStepKind.RouteCall, graph.Steps[1].Kind);
}
/// <summary>Verifies that the response falls back to the inbound row when no other row shares its execution.</summary>
[Fact]
public void ResponseFallsBackToTheInboundRow_WhenNothingElseSharesItsExecution()
{
@@ -422,6 +439,7 @@ public class FlowGraphBuilderTests
return [inbound, route, run, write];
}
/// <summary>Verifies that with a site clock running ahead, site steps still follow their route call and precede the response.</summary>
[Fact]
public void SiteClockAhead_SiteStepsStillFollowTheirRouteCall_AndPrecedeResponse()
{
@@ -440,6 +458,7 @@ public class FlowGraphBuilderTests
Assert.Equal(T0.AddMilliseconds(900), graph.Steps[4].OccurredAtUtc.UtcDateTime);
}
/// <summary>Verifies that with a site clock running behind, site steps do not sort ahead of the inbound request.</summary>
[Fact]
public void SiteClockBehind_SiteStepsDoNotSortAheadOfTheInboundRequest()
{
@@ -456,6 +475,7 @@ public class FlowGraphBuilderTests
Assert.Equal(events.Select(e => e.EventId), graph.Steps.Take(4).Select(s => s.EventId));
}
/// <summary>Verifies that with a site clock running behind, a trigger cascade spawns from the last parent step rather than the first.</summary>
[Fact]
public void SiteClockBehind_TriggerCascade_SpawnsFromTheLastParentStep_NotTheFirst()
{
@@ -477,6 +497,7 @@ public class FlowGraphBuilderTests
Assert.Equal(run.EventId, spawn.ToEventId);
}
/// <summary>Verifies that on a shared clock a trigger cascade spawns from the write that fired it rather than the parent's last step.</summary>
[Fact]
public void SameClock_TriggerCascade_SpawnsFromTheWriteThatFiredIt_NotTheParentsLastStep()
{
@@ -502,6 +523,7 @@ public class FlowGraphBuilderTests
Assert.Equal(cascade.EventId, spawn.ToEventId);
}
/// <summary>Verifies that with simultaneous writes a trigger cascade spawns from the write of the trigger attribute rather than the last write.</summary>
[Fact]
public void SimultaneousWrites_TriggerCascade_SpawnsFromTheWriteOfTheTriggerAttribute_NotTheLastWrite()
{
@@ -524,6 +546,7 @@ public class FlowGraphBuilderTests
Assert.Equal(cascade.EventId, spawn.ToEventId);
}
/// <summary>Verifies that a trigger cascade whose attribute the parent never wrote falls back to time-based placement.</summary>
[Fact]
public void TriggerCascade_WhoseAttributeTheParentNeverWrote_FallsBackToTheTimeRule()
{
@@ -543,6 +566,7 @@ public class FlowGraphBuilderTests
Assert.Equal(writeA.EventId, spawn.FromEventId);
}
/// <summary>Verifies that a folded node takes the emission index of its earliest emitted row.</summary>
[Fact]
public void FoldedNode_TakesTheEmissionIndexOfItsEarliestEmittedRow()
{
@@ -562,8 +586,9 @@ public class FlowGraphBuilderTests
Assert.Equal(new[] { FlowStepKind.ApiCall, FlowStepKind.ScriptRun }, graph.Steps.Select(s => s.Kind));
}
// ---- Review findings on Task 2 (2026-09-06) --------------------------------------------
// ---- Review findings on outbound calls (2026-09-06) --------------------------------------------
/// <summary>Verifies that leading asynchronous steps hang off the spawner and are never orphaned.</summary>
[Fact]
public void LeadingAsyncSteps_HangOffTheSpawner_NeverOrphaned()
{
@@ -591,6 +616,7 @@ public class FlowGraphBuilderTests
Assert.Equal(3, graph.Edges.Count);
}
/// <summary>Verifies that when an execution has only notify rows, all of them link from the spawner.</summary>
[Fact]
public void OnlyNotifyRows_InAnExecution_AllLinkFromTheSpawner()
{
@@ -606,6 +632,7 @@ public class FlowGraphBuilderTests
Assert.All(graph.Edges, e => { Assert.True(e.Async); Assert.True(e.Spawn); Assert.Equal(graph.Steps[0].EventId, e.FromEventId); });
}
/// <summary>Verifies that folding is independent of row order and ties are broken by lifecycle rank.</summary>
[Fact]
public void Fold_IsOrderIndependent_AndTiesBreakByLifecycleRank()
{
@@ -628,6 +655,7 @@ public class FlowGraphBuilderTests
Assert.Equal(sa.Lifecycle!.Select(r => r.Kind), sb.Lifecycle!.Select(r => r.Kind));
}
/// <summary>Verifies that a cached step whose submit row is missing is still treated as asynchronous.</summary>
[Fact]
public void CachedStep_WhoseSubmitRowIsMissing_IsStillAsync()
{
@@ -642,6 +670,7 @@ public class FlowGraphBuilderTests
Assert.Single(graph.Edges, e => e.Async && e.ToEventId == api.EventId);
}
/// <summary>Verifies that edges on the external lane never count as cluster boundary crossings.</summary>
[Fact]
public void ExternalLaneEdges_NeverCountAsClusterBoundaryCrossings()
{
@@ -660,8 +689,9 @@ public class FlowGraphBuilderTests
Assert.Equal(graph.Steps[1].EventId, into.FromEventId);
}
// ---- Script entry point (2026-09-08 plan, Task 6) -----------------------------------------
// ---- Script entry point (2026-09-08 plan) -----------------------------------------
/// <summary>Verifies that a route-call root without an inbound row builds a central-to-site graph with no response.</summary>
[Fact]
public void RouteCallRoot_WithoutInboundRow_BuildsCentralToSite_AndNoResponse()
{