fix: make final4 pick counting tolerant to id drift#45
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves Final Four pick counting in Bracket::Model::DBIC so it remains correct even when Final Four game IDs drift due to bracket topology/round assignment changes.
Changes:
- Updates
count_final4_picksto count Final Four picks bygame.round >= 5. - When structure-derived Final Four game IDs are available, counts picks that match either the derived IDs or
round >= 5(union), preventing undercounts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make
count_final4_picksresilient when final-four game IDs drift from historical numbering.Why
A full-suite run exposed a regression: if topology/round assignments shift, ID-only matching can undercount valid final-four picks even though the games are semis/championship by round.
How
Use a joined
gamequery that always accepts round-based final-four picks (round >= 5) and, when available, also accepts structure-derived final-four game IDs.Testing
script/test-env.sh prove -lv t/model_round_based_final4_counts.tscript/test-env.sh prove -lr tQuality Report
Changes: 1 file changed, 16 insertions(+), 11 deletions(-)
Code scan: clean
Tests: skipped
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline