mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
bcd307d8a4
Two classes of read-efficiency fixes on hot/aggregation paths. No response shape or value changes — DTOs untouched, all 2541 backend tests pass. P2 — select projections on full-mirror SessionsIndex scans (bandwidth only): - GetMetricsSummaryAsync: cross-partition status tally now projects [PartitionKey, Status] instead of the ~40-column mirror row (incl. the large FailureSnapshotJson) -> ~10-20x less transfer. - QuickSearchSessionsAsync: typeahead scan projects only the matched fields (+ RowKey for the SessionId fallback) instead of the full row, for up to QuickSearchMaxScannedRows rows per request. P3 — push the existing sinceUtc window floor server-side at 8 AppInstall call sites across 5 files (previously each dematerialized the whole table / partition and filtered to the window in memory): - UsageMetricsService (global + tenant): now.AddDays(-days) - MaintenanceService.Aggregation (global + tenant, per aggregated day): targetDate - SlaBreachEvaluationService (current ISO week): now.AddDays(-8) margin - SlaMetricsService: startDate (matches the in-memory lower bound exactly) - Get(Global)GeographicLocationSessionsFunction: cutoff Each floor equals the session-window floor the apps are joined against (app.StartedAt >= session.StartedAt >= floor), so results are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>