Dead function gw1Fixture() in app.js hardcodes a gameweek #15
Labels
No labels
architecture
cleanup
dependencies
performance
priority: high
priority: medium
reliability
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
solvreven/FPL#15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
frontend/app.jscontains:gw1Fixturehas zero callers — it was superseded by the arbitrary-gameweekversion and left behind. Harmless today, and exactly the shape that gets picked
up by the next person grepping for a fixture helper: it returns plausible data
for a gameweek that has already been played.
The same hardcoded-gameweek pattern was found in six places in
/api/matchesand in
resolve_market.pyon 2026-08-27; this is the last known instance.Suggested fix. Delete it.
Deleted in
91bc231(2026-08-29). Zero callers, confirmed by grep acrossfrontend/,backend/andtests/before removal. The surviving comment abovefixtureForrecords what was removed and why, worded so it does not read as thefunction returning.
One correction to this issue: it was not the last known instance. Two more
turned up this week, and both were live rather than dead:
FX_START = 1in the fixtures grid — a module-level literal moved only by thepager, so the grid opened on GW1-6 for the rest of the season unless the user
paged past it by hand (
e433040).GW1literals inindex.html— three panel headings on Matches, twoon Fixtures, a clean-sheet hint, an accuracy kicker, and two paragraphs. The
tab printed "Match predictions · GW1" above gameweek 3's fixtures, reported by
the user with a screenshot (
281c7a9).The second is the one worth carrying forward: every previous fix and every grep
for this family, including
test_no_backend_module_hardcodes_a_gameweek_in_an_odds_path, was globbed to.pyand.js. They all passed, honestly, while the label a reader actuallylooks at was wrong. A mechanical check is only as wide as its glob, and the
glob is part of the assertion.
tests/web/test_no_hardcoded_gameweek_in_markup.pynow covers the markup.