Repository navigation
Seed knockout round-1 games from group-stage standings - #52
Merged
Merged
Conversation
Phase 3 of World Cup style advancement. A knockout stage with entrant descriptors can now pull its real teams from the previous grouped stage's standings — auto-resolved, admin-confirmed: - SeedStageFromGroups action: preview() resolves every slot (group position via the per-group standings calculator, best_placed rank via the cross-group ranking) without writing; execute() fills round-1 home/away in a transaction - Idempotent re-seeding after result corrections, refused once any round-1 game has kicked off - Stage page gains a "Seed from <stage>" review card for admins: every resolved matchup, an incomplete-source warning, unresolvable-slot errors inline, and an Apply/Re-apply confirm button - Stage::previousGroupedStage() extracted and shared with the entrant builder's sourceStage lookup Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Phase ③ of World Cup–style advancement (follows #48, #49). Answers "how do teams carry over from the group stage": the knockout stage page gains a Seed from group stage card for admins.
(Reopened as a fresh PR: the original #50 auto-closed when its stacked base branch
knockout-entrant-slotswas deleted on merge of #49. Same commit, now targeting main.)SeedStageFromGroupsaction — the stage-to-stage analog ofAdvanceBracketWinner:preview()resolves every entrant slot against the source stage's current standings (group positions via the per-group calculator with all in-group tiebreakers;best_placedranks via the cross-group ranking) — read-only.execute()re-resolves and fills round-1 home/away in a transaction. Idempotent: re-running after a result correction overwrites the qualifiers — refused once any round-1 game has kicked off.stages.seed-from-groupsroute.Stage::previousGroupedStage()extracted to the model, shared by the seeder and the entrant builder'ssourceStageprop.Verified read-only against the real 2026 World Cup dev data: all 32 slots of the configured R32 resolve correctly.
Testing
🤖 Generated with Claude Code