Omitted field null deserialization
Your task
A rolling deploy of the catalog API changes a list endpoint: a field that was always present, inventory_count (integer), is now OMITTED entirely for out-of-stock items (instead of returning 0) as a payload-size optimization. Web is fine. But during and after the rollout, the cart service (a SEPARATE backend caller, deployed weeks ago) starts treating some items as having inventory_count = null → unlimited, allowing oversell, and the rate roughly tracks the fraction of catalog pods on the new version. Dashboards: no errors (cart's deserializer defaults a missing field to its 'unlimited' sentinel), p99 normal; an oversell business metric climbs. Triage, explain why it tracks the rollout, and mitigate.
It covers
- Api contract
- Optional field
- Client cache