Skip to content

No match score data and no way to correct a mistaken result #102

Description

@Dejmenek

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions