Skip to content

Refactor final4 paths to graph-derived structure#24

Closed
mateu wants to merge 1 commit intomasterfrom
koan/derive-bracket-paths-from-graph-v2
Closed

Refactor final4 paths to graph-derived structure#24
mateu wants to merge 1 commit intomasterfrom
koan/derive-bracket-paths-from-graph-v2

Conversation

@mateu
Copy link
Copy Markdown
Owner

@mateu mateu commented Mar 25, 2026

What

Derive Final Four and region-winner bracket paths from game-graph data instead of fixed game IDs.

Why

Hardcoded path IDs make bracket-year maintenance brittle and force structural assumptions into controller/validation code.

How

Added a Bracket::Service::BracketStructure service that infers championship, semifinal, and region-winner paths from game_graph + game_team_graph ancestry.
Wired Final4 controller stash loading and BracketValidator final-four scope checks to this service.
Added structure-focused tests and updated validator tests to assert behavior via derived game IDs.

Testing

  • script/test-env.sh prove -lv t/bracket_structure.t t/bracket_validator.t
  • script/test-env.sh prove -lr t

Quality Report

Changes: 5 files changed, 215 insertions(+), 27 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

@mateu
Copy link
Copy Markdown
Owner Author

mateu commented Mar 26, 2026

Superseded by #29, which has now been squashed and merged. Closing this predecessor PR to keep the active history clean.

@mateu
Copy link
Copy Markdown
Owner Author

mateu commented Mar 26, 2026

Superseded by merged #29.

@mateu mateu closed this Mar 26, 2026
@mateu mateu deleted the koan/derive-bracket-paths-from-graph-v2 branch March 26, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant