Calculation Backend decision 10

Missing price/CO₂ factor defaults to 0, not a distinct "unknown" state

When a model/day has no matching entry in the price or CO₂ factor table (e.g. a new model was used before its price was added), ClaudeUsageIngestService stores costUsdCent/co2Gram as 0 rather than modeling “unknown” as its own type. A logger.warn is emitted at ingest time.

This is deliberate, not an oversight:

  • The dashboard breaks usage down per model, so a model showing “0 cost/CO2” while clearly having usage is self-evidently wrong and gets noticed without needing a dedicated “unknown” indicator.
  • The fix is operational, not code: look up the correct price/factor, insert it into the claude_prices/co2_factors table, and re-ingest or backfill the affected historical records for that model.
  • Modeling “unknown” as a distinct type would ripple into every consumer (aggregation, serialization, dashboard display) for a rare, self-correcting operational gap — not worth the complexity (see .claude/system/codestyle.md, “Pragmatism > Dogma”).