Files
box-box/internal/query
Aman TahilianiandClaude Opus 5.5 09bbccff93 fix(championship): drop cancelled rounds and declare a clinched title (#110)
* fix(championship): drop cancelled rounds and declare a clinched title

The championship hub counted cancelled meetings (2026 Bahrain/Saudi) as
rounds, reporting 25 total / 6 left instead of 23 / 4. Title math then used
6 x 25 = 150 pts as the ceiling, so a 119-pt gap still looked "alive" after
Antonelli had mathematically clinched the title.

- Skip cancelled meetings and cancelled Race/Sprint sessions in both the
  local (query) and OpenF1 aggregation paths.
- Track pending sprints and return sprints_left + max_points_left
  (25/race + 8/sprint) so title math is sprint-aware.
- Frontend: use max_points_left for alive/out, gap annotations and the
  simulator; show a CHAMPION state, "has clinched" title math, and a
  Champion stat tile once P2 cannot catch the leader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(championship): resolve ties on countback in title math

Review feedback:
- Local standings broke points ties by driver number, so a season ending
  level could crown the wrong driver. Order ties by FIA countback (most GP
  wins, then P2s, ...) before falling back to driver number.
- An exact-gap lead was always treated as open. It is a clinch when the
  leader still wins the countback even if the rival takes every remaining
  GP. Every rival, not just P2, is now checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:40:37 -08:00
..
2026-07-03 02:57:18 -04:00
2026-07-03 02:57:18 -04:00
2026-05-25 00:49:13 -04:00
2026-07-03 02:57:18 -04:00
2026-07-03 02:57:18 -04:00