Depot capacity model

Atlas · Balanced

Our depot capacity model is off by roughly 8% on Tuesdays. Where should I look first?

Tuesday is the only day the model reads the carrier feed before the overnight reconciliation finishes, so a slice of Monday's late arrivals is counted twice. Start with the ingest window in loaders/carrier_feed.py, then compare the reconciled totals for the last four Tuesdays against the raw feed.

Makes sense. Draft the fix and list what it changes.

The patch moves the ingest cutoff to 04:00 so it always lands after reconciliation, drops the duplicate rows that the old window let through, and adds a regression test that replays four weeks of Tuesday feeds. Nothing outside the loader changes, and last week's totals fall back in line to within 0.3%.

Does the test catch the reverse case, where reconciliation finishes late?

It does. The fixture parametrises the reconciliation finish time, so a run that lands at 05:10 fails on row counts instead of passing quietly. I also kept the old window behind a flag for one release, which lets you diff both outputs on staging before the cutover.

Atlas runs on Meridian Labs. Answers can be wrong, so check anything that matters.