If you are building the ingestion side of a cold chain or asset tracking platform, there is a category of bug that does not show up in staging, does not show up in the first pilot, and shows up for the first time when a customer asks you to produce a defensible record of a shipment that went wrong.

It is not a bug in your code. It is a bug in your data contract. This post is about the three places it hides.

1. The time base problem

Here is the naive schema most platforms start with, one row per sensor reading:

{