fix(tournament): sync native-server participants and route start #78

Merged
Janis merged 1 commits from fix/tournament-native-sync into main 2026-06-23 20:34:32 +02:00
Member

Bots joining a published tournament directly on the native server were not
reflected in NowChess (0 players) and the tournament could not be started,
because create() kept a local copy plus a separate native copy whose id was
discarded — leaving the two records disconnected.

  • Capture the native tournament id: createNative/publishNative now return the
    id instead of Boolean; persist it on Tournament.nativeTournamentId.
  • Reverse-sync on read: get()/list() overlay nbPlayers/standing/status/round/
    winner from the native twin (with a fullName backfill for tournaments created
    before the id was captured).
  • start(): proxy to the native twin (director token via authFor) so the native
    participants are used; mirror the started status locally.
  • Skip the native server in the replicate loop (it has no /replicate endpoint),
    removing the per-create "Failed to replicate" warning.
  • Isolate native integration in tournament unit tests (native-server-url no
    longer defaults to the live server).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Bots joining a published tournament directly on the native server were not reflected in NowChess (0 players) and the tournament could not be started, because create() kept a local copy plus a separate native copy whose id was discarded — leaving the two records disconnected. - Capture the native tournament id: createNative/publishNative now return the id instead of Boolean; persist it on Tournament.nativeTournamentId. - Reverse-sync on read: get()/list() overlay nbPlayers/standing/status/round/ winner from the native twin (with a fullName backfill for tournaments created before the id was captured). - start(): proxy to the native twin (director token via authFor) so the native participants are used; mirror the started status locally. - Skip the native server in the replicate loop (it has no /replicate endpoint), removing the per-create "Failed to replicate" warning. - Isolate native integration in tournament unit tests (native-server-url no longer defaults to the live server). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Janis added 1 commit 2026-06-23 20:34:22 +02:00
fix(tournament): sync native-server participants and route start
Build & Test (NowChessSystems) TeamCity build failed
4ed7cd5691
Bots joining a published tournament directly on the native server were not
reflected in NowChess (0 players) and the tournament could not be started,
because create() kept a local copy plus a separate native copy whose id was
discarded — leaving the two records disconnected.

- Capture the native tournament id: createNative/publishNative now return the
  id instead of Boolean; persist it on Tournament.nativeTournamentId.
- Reverse-sync on read: get()/list() overlay nbPlayers/standing/status/round/
  winner from the native twin (with a fullName backfill for tournaments created
  before the id was captured).
- start(): proxy to the native twin (director token via authFor) so the native
  participants are used; mirror the started status locally.
- Skip the native server in the replicate loop (it has no /replicate endpoint),
  removing the per-create "Failed to replicate" warning.
- Isolate native integration in tournament unit tests (native-server-url no
  longer defaults to the live server).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Janis merged commit 1f4e9c8498 into main 2026-06-23 20:34:32 +02:00
Janis deleted branch fix/tournament-native-sync 2026-06-23 20:34:34 +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#78