Make build_player_table leak-free for a past-season backtest
Passing a past season (e.g. 2025 to backtest a 2025 draft) previously still pulled every season in the cache for production stats, O-line/pace/defense ratings, and rookie draft-curve fitting -- all bounded by CURRENT_SEASON, not the season being predicted. A 2025 "backtest" could see 2025's own results. Every history-derived input is now bounded to the five seasons strictly before `season`, matching the lookback the live board already gets by construction (weekly_stats/play_by_play don't have a season that hasn't happened yet). The live depth-chart team override is skipped for a past season too, since it reflects today's rosters, not that season's -- team now comes from that season's own box scores instead. player_season_profiles gains an optional seasons bound to support this; default behavior (season=CURRENT_SEASON, seasons=None) is unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Z
zacharytran26 committed
76c5bcc5c885fdf9038376cf5110355bfe06114b
Parent: 2e00fee