Every day's fetch is supposed to return a fresh price for every route on the board. Sometimes it doesn't — an airline routing quirk, a temporary gap in the data source, or just a route that briefly has nothing to report. When that happens, we have two honest options: hide the route entirely, or show the most recent real price we actually have and say so plainly. We do the second one, within a real limit.
If today's fetch has no usable price for a route, the display layer can carry forward the most recent day that did have a real, successfully-classified price. That carried-forward record is tagged is_stale_fallback: true with a last_fresh_date — the actual date the price is from, not today's date wearing a costume.
A stale price is only ever carried forward for up to 7 days. Past that, or if the last-fresh date is missing or malformed, we stop showing it at all rather than let a route quietly display a months-old number forever with no visible warning. Seven days mirrors the same 7-day minimum we require before a route can be judged a deal in the first place — see how we rank deals for that side of the math.
The price-history file itself — the actual trailing average everything else depends on — is never written to by this fallback mechanism. It only ever accumulates genuinely fresh, real fetch results. A stretch of stale-fallback days doesn't quietly corrupt the average once real data resumes; the two systems are kept deliberately separate.