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
@@ -86,15 +86,24 @@ public class KpiMetricAggregationTests
(KpiSources.SiteHealth, "localDbReplicationConnected"),
};
/// <summary>Supplies every emitted source and metric pair as theory data.</summary>
/// <returns>The theory data rows of source and metric names.</returns>
public static IEnumerable<object[]> AllEmittedCases() =>
AllEmittedMetrics.Select(m => new object[] { m.Source, m.Metric });
/// <summary>Supplies the rate metric source and metric pairs as theory data.</summary>
/// <returns>The theory data rows of source and metric names.</returns>
public static IEnumerable<object[]> RateCases() =>
RateMetrics.Select(m => new object[] { m.Source, m.Metric });
/// <summary>Supplies the gauge-sampled source and metric pairs as theory data.</summary>
/// <returns>The theory data rows of source and metric names.</returns>
public static IEnumerable<object[]> GaugeCases() =>
GaugeSampling.Select(m => new object[] { m.Source, m.Metric });
/// <summary>Verifies that every emitted metric resolves to a defined aggregation.</summary>
/// <param name="source">The KPI source name.</param>
/// <param name="metric">The metric name.</param>
[Theory]
[MemberData(nameof(AllEmittedCases))]
public void Resolve_EveryEmittedMetric_ReturnsDefinedAggregation(string source, string metric)
@@ -106,6 +115,9 @@ public class KpiMetricAggregationTests
$"({source}, {metric}) resolved to an undefined aggregation: {result}");
}
/// <summary>Verifies that rate metrics are classified as rate.</summary>
/// <param name="source">The KPI source name.</param>
/// <param name="metric">The metric name.</param>
[Theory]
[MemberData(nameof(RateCases))]
public void Resolve_RateMetrics_ClassifiedAsRate(string source, string metric)
@@ -113,6 +125,9 @@ public class KpiMetricAggregationTests
Assert.Equal(KpiRollupAggregation.Rate, KpiMetricAggregationCatalog.Resolve(source, metric));
}
/// <summary>Verifies that gauge-sampled metrics are classified as gauge.</summary>
/// <param name="source">The KPI source name.</param>
/// <param name="metric">The metric name.</param>
[Theory]
[MemberData(nameof(GaugeCases))]
public void Resolve_GaugeSampling_ClassifiedAsGauge(string source, string metric)
@@ -120,6 +135,7 @@ public class KpiMetricAggregationTests
Assert.Equal(KpiRollupAggregation.Gauge, KpiMetricAggregationCatalog.Resolve(source, metric));
}
/// <summary>Verifies that last-hour audit metrics resolve as gauges rather than rates.</summary>
[Fact]
public void Resolve_LastHourAuditMetrics_AreGaugeNotRate()
{
@@ -133,6 +149,9 @@ public class KpiMetricAggregationTests
KpiMetricAggregationCatalog.Resolve(KpiSources.AuditLog, "errorEventsLastHour"));
}
/// <summary>Verifies that an unknown metric defaults to a gauge.</summary>
/// <param name="source">The KPI source name.</param>
/// <param name="metric">The metric name.</param>
[Theory]
[InlineData(KpiSources.NotificationOutbox, "someBrandNewMetricAddedLater")]
[InlineData("AnEntirelyNewSource", "anyMetric")]
@@ -144,6 +163,7 @@ public class KpiMetricAggregationTests
Assert.Equal(KpiRollupAggregation.Gauge, KpiMetricAggregationCatalog.Resolve(source, metric));
}
/// <summary>Verifies that the same metric name under a different source is keyed on the source and metric pair.</summary>
[Fact]
public void Resolve_SameMetricNameDifferentSource_KeysOnSourcePair()
{
@@ -157,8 +177,9 @@ public class KpiMetricAggregationTests
KpiMetricAggregationCatalog.Resolve(KpiSources.SiteCallAudit, "deliveredLastInterval"));
}
// ---- Task 8: catalog metric literals promoted to shared KpiMetrics constants (R4) ----
// ---- Catalog metric literals promoted to shared KpiMetrics constants (R4) ----
/// <summary>Verifies that the promoted metric constants lock the historical persisted values.</summary>
[Fact]
public void PromotedMetricConstants_LockHistoricalPersistedValues()
{
@@ -168,6 +189,9 @@ public class KpiMetricAggregationTests
Assert.Equal("eventLogWriteFailures", KpiMetrics.SiteHealth.EventLogWriteFailures);
}
/// <summary>Verifies that the promoted rate pairs still classify as rate.</summary>
/// <param name="source">The KPI source name.</param>
/// <param name="metric">The metric name.</param>
[Theory]
[InlineData(KpiSources.SiteCallAudit, KpiMetrics.SiteCallAudit.DeliveredLastInterval)]
[InlineData(KpiSources.SiteHealth, KpiMetrics.SiteHealth.AlarmEvalErrors)]