3 months ago
87464d1Additive tables ai_review_usage, usage_counters, provider_costs_daily, economics_daily per economics-surface-contracts.md. economics_daily uses a null-safe unique index instead of a PK so the org_id null totals row is legal. Service-layer writers are idempotent on their grain; backfill seeds ai_review_usage from stored run_steps traces (both shapes), marked backfilled, cost null, source prod (only the prod worker persists traces). Contracts hold the shared constants and the pure source-derivation helper.
Parent3ebc53c