mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 12:52:11 +03:00
A compression_analytics row was written only on a net-positive saving (chatCore: result.compressed || fallbackApplied || cavemanOutputModeApplied). A Stacked RTK->Caveman pipeline that ran on already-compact context saved nothing -> no row -> indistinguishable from 'never dispatched' (byMode.stacked.count stayed flat while Ultra climbed). Attempted-but-no-op runs are now recorded via writeCompressionSkip with a skip_reason. A new skip_reason column (added through the existing ensureCompressionAnalyticsColumns ALTER path) marks these rows; the analytics summary excludes them from every saving aggregate (via a single successWhere = 'skip_reason IS NULL' filter, so historical totals/averages are byte-identical) and surfaces them as per-mode 'skipped' plus totalSkipped / bySkipReason. The Mode Breakdown shows 'N skipped (no-op)'. TDD: compressionAnalytics.test.ts gains coverage that skip rows are counted separately without polluting saving aggregates, and that a skip-only mode still appears (count 0, skipped > 0). Fail-before proven by reverting the successWhere exclusion (both new tests fail). typecheck:core + eslint clean; 17/17 suite green.