Problem / motivation
There's no Score/Player1Score/Player2Score concept anywhere in the codebase. Play only validates that winnerId is one of the two participants — there's no corroborating data and no audit trail. ValidateMatchNotPlayed then permanently locks the match once a winner is set, and there's no "undo"/"correct result" mutation anywhere in Brackets/ or Matches/.
Failure scenario: The tournament owner mis-clicks and records the wrong participant as the winner. Because there's nothing to cross-check against and no correction mutation, the mistake is only fixable via direct database/admin intervention.
What should happen
- Add score fields to
Match and accept them in Play.
- Add a mutation to correct a recorded result (owner-only), with some record of the correction for audit purposes.
- Handle the case where a corrected match already has next-round matches generated from its (now-wrong) winner: correcting a result needs to detect and address any downstream matches/brackets already built on the old winner, rather than leaving them silently stale.
Affected files
Data/Models/Match.cs, Matches/MatchType.cs, Matches/MatchMutations.cs (Play), Matches/MatchValidations.cs
Problem / motivation
There's no
Score/Player1Score/Player2Scoreconcept anywhere in the codebase.Playonly validates thatwinnerIdis one of the two participants — there's no corroborating data and no audit trail.ValidateMatchNotPlayedthen permanently locks the match once a winner is set, and there's no "undo"/"correct result" mutation anywhere inBrackets/orMatches/.Failure scenario: The tournament owner mis-clicks and records the wrong participant as the winner. Because there's nothing to cross-check against and no correction mutation, the mistake is only fixable via direct database/admin intervention.
What should happen
Matchand accept them inPlay.Affected files
Data/Models/Match.cs,Matches/MatchType.cs,Matches/MatchMutations.cs(Play),Matches/MatchValidations.cs