Sync IndyCar standings from OC Blacktop, fall back to ESPN #131
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "claude/faster-indycar-standings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
ESPN's IndyCar standings aggregate lags hours behind a race finish. After Mid-Ohio, Álex Palou was stuck at 374 points an evening later — his true total was 409 (P1). Our 2-hour sync cadence isn't the bottleneck; ESPN's aggregation itself is stale.
Change
OcBlacktopIndyCarStandingsAdapterreads the fresher OC Blacktop feed (x-api-key, free tier) and maps drivers to the existingFetchedStandingsRecordshape — nothing downstream changes.IndyCarStandingsAdapteron any failure: missing key, network error, empty payload, or schema drift. A flaky third party never breaks the sync.id/name or unparseableposition/points(→ fallback) rather than silently overwriting real standings with zeros, while still keeping legitimate 0-point backmarkers.getAdapter()forindycar_standings;OCBLACKTOP_API_KEYdocumented in.env.example.Verification
npm run test:run— 86 pass, incl. 6 new adapter tests (mapping, fallback on non-OK/empty/schema-drift/no-key, zero-point preserved).npm run typecheck— clean.🤖 Generated with Claude Code