Skip to content

Remove turnstile#157

Merged
jaeheonshim merged 2 commits into
stagingfrom
remove-turnstile
Jul 24, 2026
Merged

Remove turnstile#157
jaeheonshim merged 2 commits into
stagingfrom
remove-turnstile

Conversation

@jaeheonshim

Copy link
Copy Markdown
Member

No description provided.

RoopjeetSingh and others added 2 commits July 18, 2026 17:36
Fixes #154
Specifically the hardcoded maps part of it
Turnstile creates unnecessary friction for competitors. It has been shown that Turnstile can be bypassed with little effort, so it only harms the good guys. We should remove it and rely on monitoring to detect automation.
Copilot AI review requested due to automatic review settings July 24, 2026 04:31
@jaeheonshim
jaeheonshim merged commit 9770795 into staging Jul 24, 2026
1 check passed
@jaeheonshim
jaeheonshim deleted the remove-turnstile branch July 24, 2026 04:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the Turnstile requirement from the private game-match creation endpoint, and adjusts tournament series map selection to be driven by a per-competition settings.tournamentMaps configuration (with integration tests updated to provide that setting and to re-enable coverage around unique map selection).

Changes:

  • Removed @RequireTurnstile from POST /api/v1/game-match.
  • Updated tournament series map selection to read from Competition.settings["tournamentMaps"] instead of a hard-coded list.
  • Updated/re-enabled tournament integration tests to set tournamentMaps in competition settings and validate unique-map behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/org/bytefight/webserver/gamematch/infra/PrivateGameMatchController.java Removes Turnstile enforcement on private match creation endpoint.
src/main/java/org/bytefight/webserver/tournament/application/TournamentMatchScheduler.java Switches series map pool source from hard-coded list to Competition.settings.tournamentMaps.
src/test/java/org/bytefight/webserver/tournament/TournamentServiceIntegrationTest.java Ensures competition test fixtures include tournamentMaps in settings.
src/test/java/org/bytefight/webserver/tournament/TournamentResultHandlerIntegrationTest.java Ensures competition test fixtures include tournamentMaps in settings.
src/test/java/org/bytefight/webserver/tournament/TournamentMatchSchedulerIntegrationTest.java Re-enables and updates series map uniqueness test; adds tournamentMaps to fixture settings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 43 to 46
private final GameMatchService gameMatchService;

@PostMapping
@RequireTurnstile
public ResponseEntity<List<GameMatchDto>> createGameMatch(
Comment on lines +271 to +284
@SuppressWarnings("unchecked")
private List<String> getTournamentMaps(Competition competition) {
Map<String, Object> settings = competition.getSettings();
Object value = settings == null ? null : settings.get(TOURNAMENT_MAPS_SETTING_KEY);
if (!(value instanceof List)) {
throw new IllegalStateException(
"Competition '"
+ competition.getSlug()
+ "' is missing the required '"
+ TOURNAMENT_MAPS_SETTING_KEY
+ "' setting.");
}
return (List<String>) value;
}
Comment on lines 233 to +237

// Determine the next game number (1-based).
int nextGameNumber = existingGames.size() + 1;
Map<String, Object> matchSettings = buildSeriesMatchSettings(existingGames);
List<String> tournamentMaps = getTournamentMaps(match.getTournament().getCompetition());
Map<String, Object> matchSettings = buildSeriesMatchSettings(existingGames, tournamentMaps);
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.

3 participants