The 2008 Yankees showed 86-70 in my standings. They finished 89-73. Six games were missing, and the record still looked plausible enough that nobody would question it.
Two bugs in the merge layer of Statpro, my sports stats site, had that same quality this week. The merge layer is the code that combines schedule and box-score records from a source into my own database. Both bugs made me distrust my own numbers.
The postponed game that hid its makeup
A rescheduled MLB game appears twice in a season's schedule under the same game ID: once as the postponed listing, and once as the makeup that carries the score. My dedup kept whichever listing it saw first. Roughly a thousand games from 2000 to 2025 ended up stored as finals with no score. The 2001 season alone had 123 of them, the wave of postponements after 9/11.
The fix ranks listings by how resolved they are, so a makeup always beats the postponement it replaced:
const STATUS_LISTING_RANK: Record<MlbGameStatus, number> = {
final: 2, in_progress: 1, scheduled: 1, postponed: 0, cancelled: 0,
};
function listingRank(game: ScheduleGame): number {
if (game.status === "final" && listingScored(game)) return 3;
return STATUS_LISTING_RANK[game.status];
}
282 players who never existed
The second bug was stranger. Early-2000s NBA box scores pad their rosters with filler rows: sequential pseudo IDs, blank names and stats that are all null. My merge minted a real identity for each one. That made 282 phantom players and 47,928 stat rows holding exactly two real values between them.
The merge now skips any row with a blank name, no minutes and no points. A one-off cleanup script deleted the valueless rows in one transaction. Any phantom that somehow accrued real stats stays, flagged as having a missing name.
Plausible is the dangerous kind of wrong
Both times the source handed me garbage dressed up as data, and my pipeline stored it faithfully. I didn't reject the source. I taught the merge to tell a real record from a filler one. A number that's obviously broken gets fixed in a day. One that's off by three wins hid for years.