Skip to content

fix(basketball): fetch the WNBA postseason - #325

Merged
ChuckBuilds merged 1 commit into
mainfrom
fix/wnba-october-window
Aug 23, 2026
Merged

fix(basketball): fetch the WNBA postseason#325
ChuckBuilds merged 1 commit into
mainfrom
fix/wnba-october-window

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Continuing the season-readiness sweep from #324 across the remaining sports plugins. One real bug, and it's on a clock.

WNBA never fetched its own postseason

# WNBA season typically runs from May to September
datestring = f"{season_year}0501-{season_year}0930"

The regular season does end in September. The playoffs and Finals don't — 2024's Finals ended 20 October, 2025's in mid-October. Both fetch calls pass this string as dates=, and there's no date-less fallback, so no postseason game was ever retrieved. The scoreboard went blank exactly when the games matter most.

Window now closes 1 November.

Timing: the 2026 regular season ends in early September and the postseason runs mid-September into October — this would have started dropping games within weeks.

The other leagues are fine

Checked rather than assumed, and covered by the test rather than changed:

league mechanism verdict
NBA {y}1001-{y+1}0630, flips 1 Oct correct — opener is later in October, reaches the June Finals
NCAA M ESPN season param, flips 1 Nov correct — keyed to the year the season ends, ahead of early-November openers
NCAA W same correct

The NCAA ones caught me out briefly: they use no date window at all, so the truncation risk doesn't apply, but the season number has to be right. now.month >= 11 → year + 1 matches ESPN's convention of labelling 2026-27 as season 2027.

Repo-wide sweep

Swept every sports plugin for both failure shapes — pinned literal dates, and windows that stop before the postseason:

  • Pinned dates: only hockey-scoreboard/data_fetcher.py, fixed separately in fix(hockey): derive the ESPN season window instead of pinning it to 2025-26 #324.
  • Truncated windows: only WNBA. MLB (0301-1101) covers a November World Series; NFL (0801-{y+1}0301) covers a February Super Bowl; NCAA FB (0801-{y+1}0201) covers the January CFP final; NCAA hockey (0901-{y+1}0501) covers the April Frozen Four; UFC uses the full calendar year.

Verification

6 of the new checks fail against the previous window. Suite 12 passed (up from 11).

Not verified on hardware — both rigs have been unreachable all day.

🤖 Generated with Claude Code

https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 950d58ca-c547-471e-b2da-903b61035826


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Aug 22, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 16 complexity

Metric Results
Complexity 16

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Continuing the season-readiness sweep from #324 across the other sports
plugins.

The WNBA window was:

    # WNBA season typically runs from May to September
    datestring = f"{season_year}0501-{season_year}0930"

The regular season does end in September. The playoffs and Finals do not --
2024's Finals ended on 20 October, 2025's in mid-October. Both fetch calls
pass this string as `dates=` and there is no date-less fallback, so no
postseason game was ever fetched: the scoreboard went blank exactly when the
games matter most. The window now closes on 1 November.

Timing: the 2026 regular season ends in early September and the postseason
runs from mid-September into October, so this would have started dropping
games within weeks.

The other three leagues in this plugin were checked and are correct, so they
are covered by the test rather than changed:

  NBA       1 October start, flips on 1 October, reaches the June Finals
  NCAA M/W  no date window at all -- ESPN's `season` parameter, keyed to the
            year the season ENDS, flipping on 1 November ahead of the
            early-November openers

Swept every other sports plugin for the same shape. Only hockey-scoreboard's
data_fetcher.py had pinned dates, fixed separately in #324; MLB, MiLB, NFL,
NCAA FB and NCAA hockey all derive their windows correctly and cover their
postseasons.

Tests: 6 of the new checks fail against the previous window. Suite 12 passed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
@ChuckBuilds
ChuckBuilds force-pushed the fix/wnba-october-window branch from 1f9a70e to 92432a7 Compare August 23, 2026 15:48
@ChuckBuilds

Copy link
Copy Markdown
Owner Author

Force-pushed to correct the branch scope — worth flagging since the history changed.

This branch had picked up four commits that don't belong to it (#322's soccer registry fix and #323's youtube-stats fix). My mistake: an earlier merge-order test ran git checkout -B /tmp/mergetest origin/main 2>/dev/null, and a branch name starting with / is invalid. The 2>/dev/null swallowed that error, so the test merges landed on my local main instead, and every branch cut afterwards inherited them.

Nothing was wrong with the code — all four PRs were green — but merging this one would have silently merged #322 and #323 with it.

The branch is now a single commit on top of origin/main, touching only its own files. No review comments existed on it, so nothing was lost. Tests re-run on the rebuilt branch and still pass.

@ChuckBuilds
ChuckBuilds merged commit b05e94c into main Aug 23, 2026
4 checks passed
@ChuckBuilds
ChuckBuilds deleted the fix/wnba-october-window branch August 23, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants