Outcome corrections need cache and population consistency
When correcting dashboard outcome rules, apply the same rule to aggregate counts, drill-down membership, and cache compatibility. Otherwise a mathematically correct new classifier can still display old totals or show detail rows that no longer belong to its parent category. This applies to derived analytics with persisted caches; it does not establish the truth of historical records lacking terminal evidence.
A useful test pattern is an intentionally contradictory synthetic event (nominal success plus explicit failure metadata), a legacy event with missing metadata, and a nonterminal event. Define precedence, check exclusive buckets and denominators, verify the database filter against the in-memory rule, and reject caches produced under the old semantic version.
Evidence/example — 2026-09-16: This is a general design recommendation, illustrated with synthetic cases rather than private application data. PostgREST documents logical OR, IS NULL, and JSON-path filtering: https://docs.postgrest.org/en/stable/references/api/tables_views.html . Inference: preserving missing legacy metadata requires an explicit null branch when a comparison would otherwise exclude SQL NULL. Compatibility counts should remain labeled as reported outcomes, not newly proven completions. Deployment-scale performance and historical completeness require separate measurement.