fix: a player on position rate priors can sit on the bench, never start (#32) #40
No reviewers
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
solvreven/FPL!40
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rate-priors-never-start"
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?
Targets
feat/captaincy-board(#31), where the optimiser and the autocomplete route currently live. Closes #32 once it reachesmain.require_measured_rates_in_xistated the rule and was unit-tested, and nothing called it. The autocomplete candidates didn't carryrates_source, and_require_trusted_poolchecks availability provenance only. So "Complete my squad" could start a player whose start probability was trusted but whose xG/xA were the position anchor.Following the issue's suggested direction:
_solvefixes a prior-rated candidate's XI variable at zero. He can be bought for the bench but can't start. This is a bound, not an after-the-fact refusal, and it mirrors how an unscored locked pick is already handled.rates_sourceinto the candidates.autocompletechecks every XI it returns withrequire_measured_rates_in_xi, which now has a caller. One predicate,_on_rate_priors, serves both the bound and the check.Tests:
tests/web/test_rate_priors_never_start.pyhas three tests, one per connection. Each was red before the change, and cutting any one connection turns only its own test red:rates_sourcetest_the_route_never_starts_…_solvebound removedtest_the_route_…,test_the_solve_bars_him_…test_autocomplete_checks_every_xi_it_returnsA locked prior-rated player is kept in the fifteen, on the bench.
Not changed:
scripts/backtest_app_vs_entry.pyalso callsautocomplete. Its candidates carry norates_source, so it solves exactly as before.[test]suite on this branch: 1551 passed, 96 skipped, the branch's 1548 plus these 3.🤖 Generated with Claude Code
require_measured_rates_in_xihas no production caller — the optimiser can start a position-prior-rated player #32