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:
@@ -15,6 +15,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
private static ValidateOptionsResult Validate(SiteRuntimeOptions options) =>
|
||||
new SiteRuntimeOptionsValidator().Validate(Options.DefaultName, options);
|
||||
|
||||
/// <summary>Verifies that default options are valid.</summary>
|
||||
[Fact]
|
||||
public void DefaultOptions_AreValid()
|
||||
{
|
||||
@@ -22,6 +23,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.True(result.Succeeded, result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero startup batch size is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroStartupBatchSize_IsRejected()
|
||||
{
|
||||
@@ -31,6 +33,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("StartupBatchSize", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero script execution thread count is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroScriptExecutionThreadCount_IsRejected()
|
||||
{
|
||||
@@ -40,6 +43,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("ScriptExecutionThreadCount", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero tag subscribe retry interval ms is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroTagSubscribeRetryIntervalMs_IsRejected()
|
||||
{
|
||||
@@ -49,6 +53,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("TagSubscribeRetryIntervalMs", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that negative stuck script grace ms is rejected.</summary>
|
||||
[Fact]
|
||||
public void NegativeStuckScriptGraceMs_IsRejected()
|
||||
{
|
||||
@@ -58,6 +63,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("StuckScriptGraceMs", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero stream buffer size is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroStreamBufferSize_IsRejected()
|
||||
{
|
||||
@@ -67,6 +73,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("StreamBufferSize", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that negative startup batch delay ms is rejected.</summary>
|
||||
[Fact]
|
||||
public void NegativeStartupBatchDelayMs_IsRejected()
|
||||
{
|
||||
@@ -76,6 +83,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("StartupBatchDelayMs", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero alarm publish queue capacity is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroAlarmPublishQueueCapacity_IsRejected()
|
||||
{
|
||||
@@ -85,7 +93,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("AlarmPublishQueueCapacity", result.FailureMessage);
|
||||
}
|
||||
|
||||
// ── WP3.1 options ──────────────────────────────────────────────────────────────
|
||||
// ── Script-pool options ──────────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// The ceiling is the upper bound of the instance-scaled pool; below the floor it would
|
||||
@@ -104,6 +112,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("ScriptExecutionMaxThreadCount", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that equal script execution thread count and max is accepted.</summary>
|
||||
[Fact]
|
||||
public void EqualScriptExecutionThreadCountAndMax_IsAccepted()
|
||||
{
|
||||
@@ -126,6 +135,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("TriggerEvalMaxConcurrency", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero trigger eval timeout seconds is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroTriggerEvalTimeoutSeconds_IsRejected()
|
||||
{
|
||||
@@ -159,6 +169,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Equal(200, new SiteRuntimeOptions().MaxLogLinesPerRun);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero max concurrent runs per script is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroMaxConcurrentRunsPerScript_IsRejected()
|
||||
{
|
||||
@@ -169,6 +180,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
}
|
||||
// --- Lever 1 (2026-08-28): tag-subscribe backoff + in-flight ceiling ---
|
||||
|
||||
/// <summary>Verifies that tag subscribe retry max interval ms below floor is rejected.</summary>
|
||||
[Fact]
|
||||
public void TagSubscribeRetryMaxIntervalMs_BelowFloor_IsRejected()
|
||||
{
|
||||
@@ -182,6 +194,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("TagSubscribeRetryMaxIntervalMs", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that tag subscribe retry max interval ms equal to floor is valid.</summary>
|
||||
[Fact]
|
||||
public void TagSubscribeRetryMaxIntervalMs_EqualToFloor_IsValid()
|
||||
{
|
||||
@@ -193,6 +206,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.True(result.Succeeded, result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero tag subscribe in flight ceiling ms is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroTagSubscribeInFlightCeilingMs_IsRejected()
|
||||
{
|
||||
@@ -202,6 +216,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("TagSubscribeInFlightCeilingMs", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that script file access defaults to disabled and is valid.</summary>
|
||||
[Fact]
|
||||
public void ScriptFileAccess_DefaultsToDisabled_AndIsValid()
|
||||
{
|
||||
@@ -210,6 +225,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.True(Validate(options).Succeeded);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that script file access relative root is rejected.</summary>
|
||||
[Fact]
|
||||
public void ScriptFileAccess_RelativeRoot_IsRejected()
|
||||
{
|
||||
@@ -222,6 +238,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("ScriptFileAccess:AllowedRoots:0", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that script file access absolute root is accepted.</summary>
|
||||
[Fact]
|
||||
public void ScriptFileAccess_AbsoluteRoot_IsAccepted()
|
||||
{
|
||||
@@ -230,6 +247,8 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.True(Validate(options).Succeeded);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that script file access max file bytes out of range is rejected.</summary>
|
||||
/// <param name="max">The max value.</param>
|
||||
[Theory]
|
||||
[InlineData(0L)]
|
||||
[InlineData(64L * 1024 * 1024 + 1)]
|
||||
@@ -244,6 +263,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("ScriptFileAccess:MaxFileBytes", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero secret mirror status refresh interval is rejected.</summary>
|
||||
[Fact]
|
||||
public void ZeroSecretMirrorStatusRefreshInterval_IsRejected()
|
||||
{
|
||||
@@ -253,6 +273,7 @@ public class SiteRuntimeOptionsValidatorTests
|
||||
Assert.Contains("SecretMirrorStatusRefreshInterval", result.FailureMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that secret mirror status stale after under two refreshes is rejected.</summary>
|
||||
[Fact]
|
||||
public void SecretMirrorStatusStaleAfter_UnderTwoRefreshes_IsRejected()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user