fix: enable official bots to connect to external tournament server #71

Merged
Janis merged 2 commits from fix-bot-communication into main 2026-06-17 09:10:15 +02:00
Owner

Two bugs prevented official bots from joining the external tournament-server:

  1. JWT claim mismatch — bot tokens lacked the isBot: true claim the
    tournament server requires. Added the claim to generateBotToken() in
    AccountService, which covers both user-owned bots and official bots.

  2. Broken join flow — TournamentBotGamePlayer.joinTournament() called
    registerBot() which hit POST /api/auth/register on the tournament server,
    an endpoint that does not exist. Removed registerBot() and updated
    JoinTournamentRequest to accept a botToken field so the caller supplies
    the pre-existing NowChessSystems token directly.

Two bugs prevented official bots from joining the external tournament-server: 1. JWT claim mismatch — bot tokens lacked the `isBot: true` claim the tournament server requires. Added the claim to generateBotToken() in AccountService, which covers both user-owned bots and official bots. 2. Broken join flow — TournamentBotGamePlayer.joinTournament() called registerBot() which hit POST /api/auth/register on the tournament server, an endpoint that does not exist. Removed registerBot() and updated JoinTournamentRequest to accept a botToken field so the caller supplies the pre-existing NowChessSystems token directly.
lq64 added 1 commit 2026-06-17 02:06:27 +02:00
fix: enable official bots to connect to external tournament server
Build & Test (NowChessSystems) TeamCity build failed
a80b235bc3
Two bugs prevented official bots from joining the external tournament-server:

1. JWT claim mismatch — bot tokens lacked the `isBot: true` claim the
   tournament server requires. Added the claim to generateBotToken() in
   AccountService, which covers both user-owned bots and official bots.

2. Broken join flow — TournamentBotGamePlayer.joinTournament() called
   registerBot() which hit POST /api/auth/register on the tournament server,
   an endpoint that does not exist. Removed registerBot() and updated
   JoinTournamentRequest to accept a botToken field so the caller supplies
   the pre-existing NowChessSystems token directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lq64 added 1 commit 2026-06-17 08:45:01 +02:00
style: fix spotless formatting on joinTournament signature
Build & Test (NowChessSystems) TeamCity build failed
35158bfeea
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Janis merged commit 688d30e2b1 into main 2026-06-17 09:10:15 +02:00
Janis deleted branch fix-bot-communication 2026-06-17 09:10:16 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NowChess/NowChessSystems#71