- Empty net detection: pulled goalie triggers +150-250 bonus, stacks with PP
- Playoff series importance: Game 7 Cup Final = 200, elimination games scale
by round; fallback of 100 when series data unavailable
- Period-aware score differential: 2-goal deficit penalty DECREASES in final
2 min of P3 (goalie-pull zone), 3+ goal games get harsher penalties late
- Persistent comeback narrative: tracks max deficit, sustained bonus for 2+
goal recoveries instead of one-shot spike (0-3 to 3-3 = 150 persistent)
- Shootout special handling: flat base 550 with no time component; ranks below
dramatic close P3 games (skills competition, not hockey)
- Multi-man advantage: parses situationCode for 5v3/4v3, applies 1.6x PP mult
- Non-linear time priority: elapsed^1.5 curve weights final minutes more
- Matchup multiplier rebalance: P1/P2 from 2.0/1.65 to 1.5, tiebreaker not
dominant factor
- Frontend gauge max raised from 700 to 1000 with adjusted color thresholds
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The NHL API nests situationDescriptions under situation.homeTeam /
situation.awayTeam, not at the top level. The old flat-structure
lookup always returned an empty list, silently breaking both the
PP indicator on the frontend and the PP bonus in the hype score.
Updated get_power_play_info, the _priority_components PP check,
and all test fixtures to match the real API shape.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds calculate_game_importance() that boosts Priority for high-stakes
regular-season matchups based on season progress (sharp ramp after game
55), playoff bubble proximity (wildcard rank ~17-19 = max relevance),
and divisional/conference rivalry (1.4x/1.2x multipliers). Max bonus
150 pts applied to both LIVE and PRE games; playoff and FINAL games
are unaffected. Extends standings schema with division, conference,
games_played, and wildcard_sequence fields fetched from the NHL API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Period base: playoff OT escalates indefinitely (P4=600, P5=750…),
reg season P4=5-min OT (600), P5=shootout (700)
- Time priority range increased (max ~300 vs old ~120), calibrated
to period length so 5-min reg season OT reads correctly
- Matchup multiplier inverted: higher period = less weight (any OT
is exciting regardless of teams)
- Replace unconditional score_total with closeness bonus: rewards
tight games regardless of goal volume (5-4 == 1-0 at same diff)
- Power play bonus: 30 (P1/P2) → 50/100/150 (P3 by time) → 200 (OT)
- Comeback bonus: one-time pulse (+50/75/100 by period) when trailing
team scores to within 2 goals; keyed on team names, clears after
firing, skips intermission
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- utc_to_eastern: use zoneinfo instead of hardcoded EDT offset (-4)
so start times are correct in both EST and EDT
- standings: fetch before truncate so a failed API call doesn't wipe
existing standings data
- routes: call parse_games() once per request instead of three times
- scheduler: wrap run_pending() in try/except so an unhandled exception
doesn't kill the background thread
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>