fix: standings entries store final match W/D/L for every round#7648
Open
Rathoz wants to merge 1 commit into
Open
fix: standings entries store final match W/D/L for every round#7648Rathoz wants to merge 1 commit into
Rathoz wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9894aed to
29640fc
Compare
hjpalpha
approved these changes
Jun 12, 2026
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.
Summary
carryData.matchinStandingsParser.parsewas a single shared table that every per-round entry stored by reference (match = carryData.match). This meant (a) everystandingsentryrow carried the final cumulative W/D/L regardless ofroundindex, and (b) since placements are computed after all entries are built, match-based tiebreakers (matchdiff— the default Swiss tiebreaker —matchwins,matchwinrate, Buchholz) computed intermediate-round placements from end-of-tournament records.Table.copy(carryData.match)at the point the entry is constructed.carryData.matchitself continues to accumulate as before; only the stored snapshot per entry is now independent.definitestatusand final standings are untouched. Intermediate-round stored rows and mid-tournament placements decided by match-based tiebreakers will change on re-render — that is the fix. This PR is based onstandings-tests-ai(PR test: add integration tests for standings #7647); the test that asserted the old shared-table behaviour is updated here.How did you test this change?
605 successes / 0 failures / 0 errors / 0 pending) against the updated code.luacheckon both changed files with 0 warnings / 0 errors.accumulates match scoreboard across roundsinlua/spec/standings_parser_spec.lua: round 1 entry now asserts{w = 1, d = 0, l = 0}(snapshot at end of round 1) and round 2 asserts{w = 1, d = 1, l = 1}(cumulative after round 2); the obsolete comment describing the shared-table behaviour was removed.🤖 Generated with Claude Code