require_measured_rates_in_xi has no production caller — the optimiser can start a position-prior-rated player #32
Labels
No labels
architecture
cleanup
dependencies
enhancement
needs-info
needs-triage
performance
priority: high
priority: medium
ready-for-agent
ready-for-human
reliability
security
testing
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
solvreven/FPL#32
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?
Found 2026-09-13 while running the optimiser for a GW7 wildcard.
backend/web/optimize.pydefinesrequire_measured_rates_in_xi(xi, by_id)with a docstring explaining why rate priors must be refused in the XI ("an invented rate inside a maximisation objective steers selection toward the players whose numbers were invented"). It is unit-tested intests/web/test_provenance.pyand called by nothing: not byautocomplete, not by_solve, not by/api/autocomplete. The candidate dicts the route builds do not even carryrates_source, so a caller could not apply it._require_trusted_poolchecks AVAILABILITY provenance only. So a player whose start is trusted but whose xG/xA are the position anchor can be placed in the XI by "Complete my squad".The pool today contains 0 such players with start_prob >= 0.05, so this does not bite on the current cache — which is exactly why it has stayed invisible.
Suggested direction: carry
rates_sourceinto the candidates and constrain the MILP so a prior-rated player can hold a bench slot but never an XI place (y_i = 0), rather than refusing the whole solve after the fact. A wiring test that fails when the route stops passing the field.Fixed in #40, merged into
feat/captaincy-board, so it reachesmainwith #31. The fix follows the suggested direction:_solvebounds a prior-rated candidate's XI variable at zero, so he can hold a bench slot but not an XI place.rates_source.autocompletechecks every XI it returns withrequire_measured_rates_in_xi.There are three tests, one per connection, and cutting any one connection turns its own test red. Leaving this open until it's on
main.🤖 Generated with Claude Code