SIGN IN SIGN UP

Resolve ESPN team defenses to real names; add espn_league_context

Team defenses have no gsis_id, so they were never in the player crosswalk --
sync_espn reported every D/ST pick as an unmatched ESPN#<id>, even after the
earlier crosswalk fix (which only helped real players). ESPN encodes them as
-(16000 + proTeamId) instead of a real playerId; mapping that against the
stable proTeamId list resolves them to real names ("Cleveland Browns D/ST")
with no extra network call. A real 2024 draft went from 15 unmatched picks
(all team defenses) to 0.

Also adds espn_league_context: given a league_id and season, reads team
count, scoring, roster starters, and (via ESPN_SWID) your team and real
draft slot straight from ESPN, so a caller doesn't have to already know a
league's settings to configure against it. Used by draft_backtest.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Z
zacharytran26 committed
85f5550d83473e3d39f01ac750f2e342f682aee0
Parent: b58b92e