chore(data-layer): low-severity cleanups — SQLite param chunking, KPI metric catalog, computed-column predicate guard

This commit is contained in:
Joseph Doherty
2026-07-09 09:32:04 -04:00
parent b58d810dbe
commit acd8a6b8b5
6 changed files with 138 additions and 41 deletions
@@ -33,6 +33,20 @@ public class NotificationOutboxKpiSampleSourceTests
Assert.Equal(KpiSources.NotificationOutbox, source.Source);
}
// C4 (arch-review 04): the two metric names that were inline string literals now
// live in the shared KpiMetrics catalog. Their VALUES are persisted in the KpiSample
// store and rendered by the trend UI, so a rename would silently orphan history —
// pin the exact historical strings here.
[Fact]
public void KpiMetricCatalog_NotificationOutbox_PreservesHistoricalStringValues()
{
Assert.Equal("queueDepth", KpiMetrics.NotificationOutbox.QueueDepth);
Assert.Equal("stuckCount", KpiMetrics.NotificationOutbox.StuckCount);
Assert.Equal("parkedCount", KpiMetrics.NotificationOutbox.ParkedCount);
Assert.Equal("deliveredLastInterval", KpiMetrics.NotificationOutbox.DeliveredLastInterval);
Assert.Equal("oldestPendingAgeSeconds", KpiMetrics.NotificationOutbox.OldestPendingAgeSeconds);
}
[Fact]
public async Task CollectAsync_PassesCutoffsAnchoredOnCapturedAt()
{