镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

f1: resolve the timezone through core's sports_timezone; core 3.6.0 ships both stage 2 modules - #567

Merged
ChuckBuilds merged 2 commits into
mainfrom
claude/sports-stage2-followup
Sep 29, 2026
Merged

ChuckBuilds merged 2 commits into
mainfrom
claude/sports-stage2-followup

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

A follow-up to #565. Core v3.6.0 is now released, with src.common.favorite_team_check and src.common.sports_timezone.

Changes

  • f1-scoreboard 1.9.6: f1_timezone.py gets the same guarded shim as the other nine scoreboards, labelled "F1 scoreboard" and passing its own write-back values.
    • The code above the shim is unchanged and stays as the fallback.
    • Its test_timezone_resolution.py stubs the system zone on whichever module actually resolves it.
    • f1 is added to the guard's ADOPTERS, so the guard-shape check and the core-path == fallback check cover it.
    • The floor stays at 3.4.0 (f1's current one). f1 records its history in versions[] and has no CHANGELOG.md.
  • check_min_core_version.py: both modules are now dated "3.6.0", and its test tracks the v3.6.0 tag.
  • Doc 08: notes that the modules are in core 3.6.0+, and why soccer and ufc aren't using core's favourite check yet (below).

No floors are raised and no copies are deleted; that's the separate cleanup PR.

Not included: the favourite-team check for soccer and ufc

  • ufc doesn't fit. Its favourites are fighter names and weight classes, not team codes. ESPN's mma/ufc/teams endpoint returns no teams, so the check would never report anything.
  • soccer is held back. It already has its own older favourite check, the one the shared module grew out of. Core's version logs a false "season has finished" message between matchdays.
    • The cause: ESPN's soccer scoreboard keeps showing the last round, so every event on it is in the past.
    • Today the Premier League played its last games on 20 September, and its next are on 10 October.
    • The same logic is in core 3.6.0 and the seven bundled copies, and it also showed up for MLB on ledpi. It gets fixed first, and then soccer adopts.

Verification

Baseline origin/main. Core path is v3.6.0, fallback path is v3.5.0.

  • Rendering: all 88 harness PNGs for f1, soccer and ufc are byte-identical on both cores.
  • Plugin tests: run_plugin_tests.py gives 68 passed on both cores.
  • Repo scripts: all 54 scripts/test_*.py and check scripts pass on both, including check_version_bump --base origin/main f1-scoreboard and update_registry.py --check.
  • Mutation check: mutating the new f1 guard coverage was caught 4 of 5 times. The one missed (the write-back value) is a no-op for f1, because it never had the bug.

🤖 Generated with Claude Code

ChuckBuilds and others added 2 commits September 29, 2026 09:29
…en the core ships it (1.9.6)

f1_timezone.py is the same code as core's src.common.sports_timezone apart from
its label and write-back values, so it gets the guarded shim the nine
scoreboards got in stage 2: on a core with the module, resolve_timezone_name,
resolve_timezone and system_timezone_name point at core's, given "F1
scoreboard", this plugin's write-back values and its own logger; otherwise the
code above the shim, byte-unchanged, runs. The shim carries the same pyflakes
and pylint markers as the others.

- test_timezone_resolution.py stubs system_timezone_name on whichever module
  the resolver reads it from, as the others do.
- scripts/test_timezone_and_favorite_check_copies.py: f1 joins ADOPTERS, so the
  guard shape and "core path == fallback path" checks cover it (it was already
  compared with core in the helper and resolver checks).
- docs 08: all ten timezone copies now end in the shim.

Patch bump with a versions[] entry; the floor stays 3.4.0 (f1's own). f1 keeps
its history in versions[] and has no CHANGELOG.md, so none is added.
No behaviour change: every harness render is byte-identical on both paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one; docs 08 on soccer and ufc

Core v3.6.0 (a11412da) is tagged and ships both stage 2 modules (core #665),
so check_min_core_version.py dates them "3.6.0" instead of None, and the tag
test tracks v3.6.0. Verified against the tag: the table test passes with
LEDMATRIX_CORE at v3.6.0 and at v3.5.0. No plugin floor changes; the sunset
that floors the scoreboards on 3.6.0 and deletes the copies is separate.

docs 08: the modules are in core 3.6.0 and later, and the favourite-check row
says why soccer and ufc are not on core's check:

- soccer keeps the older check in its manager.py (the one #233 added, which
  the shared module grew out of). Core's check reads a mid-season break as a
  finished season: out of season it treats "every event in the past" as the
  end of the season, but ESPN's soccer scoreboard shows the last matchday
  until the next one, so today (Premier League, last games 20 September, next
  10 October, calendar running to May 2027) it would log "the season has
  finished". Soccer's own check says nothing then. Adopting core's needs that
  fixed in core first.
- ufc has no favourite check. Its favourites are fighter names and weight
  classes, and ESPN's mma/ufc teams endpoint returns an empty list, so the
  check could never say anything.

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

coderabbitai Bot commented Sep 29, 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: Advanced

Run ID: 9267c3a1-febf-466b-9598-33d4d4e6e91c


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

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity

Metric Results
Complexity 4

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.

@ChuckBuilds
ChuckBuilds merged commit eb174fe into main Sep 29, 2026
5 checks passed
@ChuckBuilds
ChuckBuilds deleted the claude/sports-stage2-followup branch September 29, 2026 13:45
ChuckBuilds added a commit that referenced this pull request Sep 29, 2026
… timezone code (stage 2 sunset) (#570)

* chore(scripts): track core v3.6.1 in the core-floor table's tag test

Core v3.6.1 (e5bbfa2a) is tagged. It adds no src module (only the
favourite check's finished-season fix, core #667), so no table entry
changes: MODULE_FIRST_VERSION records the first release that ships a
module, and favorite_team_check stays 3.6.0. A comment says why the
scoreboards floor on 3.6.1 anyway. The tag test tracks v3.6.1, and
REPORTED_AS's note records that it reports "3.6.1".

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

* scoreboards + f1: floor on core 3.6.1 (minor bumps)

afl 1.33.0, baseball 1.52.0, basketball 1.39.0, football 3.16.0,
hockey 1.38.0, lacrosse 1.34.0, nrl 1.32.0, soccer 2.36.0, ufc 1.17.0,
f1 1.10.0.

versions[0].ledmatrix_min_version and compatible_versions rise to 3.6.1
(from 3.5.0; f1 from 3.4.0). 3.6.0 is the first release that ships
src.common.favorite_team_check and src.common.sports_timezone; 3.6.1 is
the first whose favourite check has the finished-season fix (core #667)
that the plugins' bundled copies already carried (#566), so it is the
lowest floor at which deleting those copies changes nothing. soccer, ufc
and f1 use only sports_timezone, for which 3.6.0 would do; they take 3.6.1
too so the sports scoreboards share one floor. f1 imports nothing that
3.6.1 lacks (check_min_core_version and check_core_api_signatures pass,
and its harness renders on 3.6.1 are byte-identical).

The next commit deletes the bundled code; the versions[] notes and
CHANGELOG entries describe both. f1 keeps its history in versions[] and
has no CHANGELOG.md, as in #567; its README's core requirement is updated.
A floor raise is a minor bump, as for the 3.2.0-3.5.0 raises before it.
plugins.json regenerated with update_registry.py.

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

* scoreboards + f1: delete the bundled favourite check and timezone resolver; use core's plainly

The plugins floor on core 3.6.1, which ships both modules, so the
fallbacks kept for older cores can never run again.

Favourite check (afl, baseball, basketball, football, hockey, lacrosse,
nrl): <sport>_favorite_check.py is deleted (7 x 369 lines) and the guard
in manager.py collapses to a plain
`from src.common.favorite_team_check import FavoriteTeamCheck` -- a
try/except with nothing behind it would only hide which module was
missing. On a 3.6.x core the guard already took the core branch, and on
origin/main the copies equalled core v3.6.1's module as ASTs (the old
guard script checked exactly that).

Timezone (those seven + soccer, ufc, f1): <sport>_timezone.py keeps its
name, its public functions and their signatures, so sports.py,
game_renderer.py, manager.py and the tests are unchanged; it drops the
~230-line fallback resolver and its guarded shim and becomes a binding of
core's src.common.sports_timezone: this plugin's label and write-back
release in _CORE_ARGS, and `log or logger`, so records still go to the
module's own logger ("<sport>_timezone") as on today's core path.
`system_timezone_name` stays as a name for core's. What leaves the
module: os, pytz, _from_config_manager, _validated, _HAD_WRITEBACK_BUG
and _WRITEBACK_FIXED_IN (only the module itself and the guard script read
them; the two constants become the one writeback_fixed_in value).

Tests:
- test_timezone_resolution.py (x10) stubs system_timezone_name on
  `<sport>_timezone._core` directly; there is no bundled branch left.
- hockey's test_favorite_check.py and football's
  test_schedule_note_uses_game_dates.py are deleted. They tested the
  bundled copy; core's test/test_favorite_team_check.py was ported from
  both (its docstring says so) and has every case but hockey's
  copies-are-identical one, which has nothing left to compare.
- scripts/test_timezone_and_favorite_check_copies.py is now a sunset
  guard, in the shape of test_espn_dates_copies.py: for FAVORITE_SUNSET no
  copy may come back (anywhere under plugins/), no bare *_favorite_check
  import, no guarded core import, and manager.py must import core's; for
  every timezone module, the core import is unguarded and its only
  functions are the two resolvers, each returning core's function of the
  same name. With a core checkout it runs each binding against core given
  the label / write-back release in its BINDINGS table and the module's
  logger, over the old guard's 972-scenario grid, comparing zones and
  every log record. An import-finder self-check plants four shapes.

No behaviour change: on core v3.6.1, versus origin/main, every harness
render is byte-identical (240 PNGs, 10 plugins); every plugin test gives
the same result (the two deleted ones aside); and each module's two
resolvers give identical zones and log records (logger, level, text,
exc_info) over the 972 scenarios x 2 resolvers, captured on the root
logger. FavoriteTeamCheck resolves to src.common.favorite_team_check in
all seven managers, before and after.

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

* docs: stage 2 sunset -- favourite check and timezone on core 3.6.1

docs 08: no favourite-check copies are left, and each <sport>_timezone.py
is a thin binding of core's resolver (label, write-back release, logger)
that the guard script pins; the convergence list moves both modules from
"adopted with a fallback" to converged at 3.6.1. CLAUDE.md non-negotiable
#7: the scoreboards floor on 3.6.1 and use both modules from core (soccer
and ufc have no favourite check on core's module).

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant