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:
@@ -25,6 +25,7 @@ public class FlowDebugCommandsTests
|
||||
|
||||
private static readonly JsonSerializerOptions CamelCase = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
|
||||
|
||||
/// <summary>Verifies that building the command registers the four subcommands with their required options.</summary>
|
||||
[Fact]
|
||||
public void Build_RegistersTheFourSubcommands_WithTheirRequiredOptions()
|
||||
{
|
||||
@@ -59,6 +60,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Contains(replay.Options, o => o.Name == "--execution-id" && o.Required);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that run-script defaults to a 45-second wait and a 120-second timeout.</summary>
|
||||
[Fact]
|
||||
public void RunScript_Defaults_WaitSeconds45_TimeoutSeconds120()
|
||||
{
|
||||
@@ -70,6 +72,8 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(120, parse.GetValue((Option<int>)cmd.Options.Single(o => o.Name == "--timeout-seconds")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that run-script rejects a wait of zero seconds as an invalid argument.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task RunScript_WaitSecondsZero_IsRejectedWithInvalidArgument()
|
||||
{
|
||||
@@ -80,6 +84,8 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(1, exitCode);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that run-script rejects a timeout of zero seconds as an invalid argument.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task RunScript_TimeoutSecondsZero_IsRejectedWithInvalidArgument()
|
||||
{
|
||||
@@ -90,6 +96,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(1, exitCode);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that run-method defaults to a 120-second timeout.</summary>
|
||||
[Fact]
|
||||
public void RunMethod_TimeoutSecondsDefaultsTo120()
|
||||
{
|
||||
@@ -101,6 +108,8 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(120, parse.GetValue(timeoutOption));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that run-method rejects a timeout of zero seconds as an invalid argument.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task RunMethod_TimeoutSecondsZero_IsRejectedWithInvalidArgument()
|
||||
{
|
||||
@@ -111,6 +120,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(1, exitCode);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that run-value-change defaults to a 45-second wait, matching the command record.</summary>
|
||||
[Fact]
|
||||
public void RunValueChange_WaitSecondsDefaultsTo45_MatchingTheCommandRecord()
|
||||
{
|
||||
@@ -122,6 +132,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(new FlowDebugRunValueChangeCommand(7, "Speed", "42").WaitSeconds, parse.GetValue(waitOption));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the flow-debug command records resolve in the management command registry.</summary>
|
||||
[Fact]
|
||||
public void FlowDebugCommandRecords_ResolveInTheManagementCommandRegistry()
|
||||
{
|
||||
@@ -133,6 +144,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.False(string.IsNullOrWhiteSpace(ManagementCommandRegistry.GetCommandName(typeof(FlowDebugReplayCommand))));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that parsing blank parameters yields null and that a JSON object is cloned.</summary>
|
||||
[Fact]
|
||||
public void ParseParameters_Blank_IsNull_AndObject_IsCloned()
|
||||
{
|
||||
@@ -145,6 +157,8 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal("Z28061", parsed.Value.GetProperty("code").GetString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that parsing parameters rejects malformed or non-object input.</summary>
|
||||
/// <param name="input">The raw parameter text to parse.</param>
|
||||
[Theory]
|
||||
[InlineData("not json")]
|
||||
[InlineData("[1,2]")]
|
||||
@@ -185,6 +199,7 @@ public class FlowDebugCommandsTests
|
||||
return JsonSerializer.Serialize(result, CamelCase);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection emits one row per step with its kind, lane, target, duration and status.</summary>
|
||||
[Fact]
|
||||
public void Projection_EmitsOneRowPerStep_WithKindLaneTargetDurationStatus()
|
||||
{
|
||||
@@ -218,6 +233,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.All(rows, r => Assert.False(r.TryGetProperty("note", out _)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection of an incomplete run appends a note row carrying the error code verbatim.</summary>
|
||||
[Fact]
|
||||
public void Projection_IncompleteRun_AppendsANoteRowWithTheErrorCodeVerbatim()
|
||||
{
|
||||
@@ -231,6 +247,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Contains("standby", note);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection of a truncated run notes that the audit rows remain complete.</summary>
|
||||
[Fact]
|
||||
public void Projection_TruncatedRun_NotesThatTheAuditRowsRemainComplete()
|
||||
{
|
||||
@@ -242,10 +259,11 @@ public class FlowDebugCommandsTests
|
||||
Assert.Contains("audit tree", last.GetProperty("note").GetString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection of a run with truncated logs notes that a replay pulls the remainder.</summary>
|
||||
[Fact]
|
||||
public void Projection_LogsTruncatedRun_NotesThatReplayPullsTheRest()
|
||||
{
|
||||
// Final review M8: `logsTruncated` is a SEPARATE signal from `truncated` (the inline
|
||||
// `logsTruncated` is a SEPARATE signal from `truncated` (the inline
|
||||
// collector sheds low-priority ScriptLog rows before it sheds step rows). The page shows
|
||||
// it; the CLI used to drop it silently.
|
||||
var projected = FlowDebugTableProjection.ProjectEvents(
|
||||
@@ -257,6 +275,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal("inline log lines capped — replay pulls the rest", rows[^1].GetProperty("note").GetString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection reports both truncation flags together.</summary>
|
||||
[Fact]
|
||||
public void Projection_BothTruncationFlags_AreReportedTogether()
|
||||
{
|
||||
@@ -269,6 +288,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Contains("inline log lines capped — replay pulls the rest", note);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection leaves response bodies that do not match the expected shape untouched.</summary>
|
||||
[Fact]
|
||||
public void Projection_LeavesNonMatchingBodiesUntouched()
|
||||
{
|
||||
@@ -277,6 +297,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal("[1]", FlowDebugTableProjection.ProjectEvents("[1]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the projection folds an outbound call lifecycle into a single external-lane row.</summary>
|
||||
[Fact]
|
||||
public void Projection_FoldsAnOutboundLifecycle_IntoOneExternalLaneRow()
|
||||
{
|
||||
@@ -333,7 +354,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.Equal(JsonValueKind.Null, rows[1].GetProperty("correlation").ValueKind);
|
||||
}
|
||||
|
||||
/// <summary>Builds a run whose script step carries two <c>ScriptLog</c> rows and fails with an exception detail (step-logs plan 2026-09-09, Task 14).</summary>
|
||||
/// <summary>Builds a run whose script step carries two <c>ScriptLog</c> rows and fails with an exception detail.</summary>
|
||||
private static string StepLogsPayload(out DateTime log1Time, out DateTime log2Time)
|
||||
{
|
||||
var root = Guid.NewGuid();
|
||||
@@ -362,6 +383,7 @@ public class FlowDebugCommandsTests
|
||||
return JsonSerializer.Serialize(result, CamelCase);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the logs column counts the log lines attached to a step.</summary>
|
||||
[Fact]
|
||||
public void Projection_LogsColumn_CountsAttachedLogLines()
|
||||
{
|
||||
@@ -376,6 +398,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.All(rows, r => Assert.False(r.TryGetProperty("note", out _)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that showing logs prints indented log lines and exception detail beneath the step row.</summary>
|
||||
[Fact]
|
||||
public void Projection_ShowLogsTrue_PrintsIndentedLogLinesAndExceptionDetail_UnderTheStepRow()
|
||||
{
|
||||
@@ -400,6 +423,7 @@ public class FlowDebugCommandsTests
|
||||
Assert.DoesNotContain("at Z", projected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that hiding logs omits the log and exception detail lines.</summary>
|
||||
[Fact]
|
||||
public void Projection_ShowLogsFalse_OmitsLogAndExceptionDetailLines()
|
||||
{
|
||||
@@ -412,10 +436,10 @@ public class FlowDebugCommandsTests
|
||||
/// <summary>
|
||||
/// Drives the real table renderer (<see cref="CommandHelpers.HandleResponse"/>'s table
|
||||
/// branch, which is what every <c>flow-debug</c> command actually prints to the terminal)
|
||||
/// rather than only inspecting the intermediate JSON — a code review of Task 14 found the
|
||||
/// rather than only inspecting the intermediate JSON — a code review found the
|
||||
/// generic column-union renderer padded the log/exception <c>note</c> rows into a far-right
|
||||
/// "note" column instead of printing them as raw indented lines under their step, which the
|
||||
/// JSON-level assertions above could not have caught (Task 14 review, 2026-09-09).
|
||||
/// JSON-level assertions above could not have caught.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void HandleResponse_TableFormat_ShowLogsTrue_PrintsLogLineRawUnderScriptRunRow_NoNoteHeader()
|
||||
|
||||
Reference in New Issue
Block a user