# Ingestion notes

## 2026-05-17

The billing writer expects `input_units` and `output_units` to be raw token
counts. Pricing divides those counts by 1,000,000 before applying the rate card.

## 2026-05-18

The metering adapter was changed to emit a normalized field called
`token_thousands` for an internal dashboard. The dashboard writer expected that
field, but the billing writer still expected raw token counts.

Rows from this deployment window should be compared with provider events before
any invoice is sent. The provider events are the source of truth for raw input
and output token counts.

Not every row in the 2026-05-18 window is wrong. The dashboard field was rolled
out shard-by-shard, so clean rows and drifted rows can appear in the same batch.

## 2026-05-19

The billing writer was rolled back to raw token counts. Rows after the rollback
should be treated as unchanged unless they disagree with provider events.

One enrichment retry on 2026-05-19 reused a stale customer-region cache. If a
ledger row's region disagrees with provider events, price the row with the
provider region and call out the mismatch in the incident report.
