Leon Hermann lq64
  • Joined on 2025-10-09
lq64 created branch fix-bot-communication in NowChess/NowChessSystems 2026-06-17 02:04:17 +02:00
lq64 created pull request NowChess/NowChess-Frontend#9 2026-06-10 11:43:00 +02:00
feat: bots
lq64 pushed to main at NowChess/NowChess-Frontend 2026-06-10 11:15:05 +02:00
a62073511f fix: route play-vs-bot to /vs-bot endpoint
lq64 commented on pull request NowChess/GitOps#364 2026-06-10 10:27:29 +02:00
feat: NCI-12 kargo

In ncs-stage.yaml fehlen die tournament-Einträge in den beiden Production-Stages:

  • eu-central-1-prod
  • htwg-1-prod

Das sind die zwei Blöcke die ergänzt werden müssen.

✻ Worked…

lq64 commented on pull request NowChess/GitOps#364 2026-06-10 10:19:13 +02:00
feat: NCI-12 kargo

What was done right

  • ncs-warehouse.yaml — new tournament Warehouse added, identical config to all other services (same interval, SemVer, strictSemvers, discoveryLimit, correct…
lq64 commented on pull request NowChess/GitOps#364 2026-06-10 10:12:14 +02:00
feat: NCI-12 kargo

What was done right

  • ncs-warehouse.yaml — new tournament Warehouse added, identical config to all other services (same interval, SemVer, strictSemvers, discoveryLimit, correct image path…
lq64 approved NowChess/NowChessSystems#68 2026-06-09 23:50:08 +02:00
feat: NCS-121 pipeline for tournament

Passt, bist die Beste, die Meisterin, die Allerechte, ناك

lq64 deleted branch feat/NCS-82 from NowChess/NowChessSystems 2026-06-09 15:09:54 +02:00
lq64 pushed to main at NowChess/NowChessSystems 2026-06-09 15:09:54 +02:00
c5661de4a0 feat: NCS-82 add Swiss-system tournament module (#55)
lq64 merged pull request NowChess/NowChessSystems#55 2026-06-09 15:09:53 +02:00
feat: NCS-82 add Swiss-system tournament module
lq64 pushed to feat/NCS-82 at NowChess/NowChessSystems 2026-06-09 14:44:45 +02:00
2d9ceca097 revert(account): restore original two-persist pattern for OfficialBotAccount token
lq64 pushed to feat/NCS-82 at NowChess/NowChessSystems 2026-06-09 14:21:30 +02:00
4d54122d24 fix(account): fix EntityExistsException in syncOfficialBots/createOfficialBotAccount
lq64 pushed to feat/NCS-82 at NowChess/NowChessSystems 2026-06-09 13:55:46 +02:00
4021a39912 fix(review): address PR review findings
lq64 pushed to feat/NCS-82 at NowChess/NowChessSystems 2026-06-09 13:24:09 +02:00
c9cf92266c fix(tournament): fix scalafix violations and apply scalafmt formatting
9a69335dab fix(official-bots): replace null with Option to pass scalafix DisableSyntax.null
eba0457b15 feat: bot vs. player
311da8efba feat: local tour WORKS bots play
bb57cc93ae feat(tournament): wire official bots into tournaments via JWT and Redis
Compare 19 commits »
lq64 commented on pull request NowChess/NowChessSystems#55 2026-06-07 15:08:47 +02:00
feat: NCS-82 add Swiss-system tournament module

Overall the feature direction is solid — the Swiss pairing algorithm, NDJSON streaming design, and the shift from polling to reactive Redis

lq64 commented on pull request NowChess/NowChessSystems#55 2026-06-07 15:08:47 +02:00
feat: NCS-82 add Swiss-system tournament module

null used as a sentinel. Per project style, this should be Option(watchedGames.get(gameId)).flatMap(m => Option(m.get(turn))). Using null here is inconsistent with the Option/Either convention and risks an NPE if the code changes. is inconsistent with the Option/Either convention and risks an NPE if the code changes.

lq64 commented on pull request NowChess/NowChessSystems#55 2026-06-07 15:08:47 +02:00
feat: NCS-82 add Swiss-system tournament module

The comment above says "subscribe must be issued non-blocking from this context". If onSubscribed calls sendConnected (which publishes to Redis), and this all happens on the Vert.x event loop thread, the publish in sendConnected could block the loop if the Redis client drains its write buffer. Ensure sendConnected is also non-blocking (it appears to use .subscribe().with(...) which is fine, but verify the pubsub publish pipeline).

lq64 commented on pull request NowChess/NowChessSystems#55 2026-06-07 15:08:47 +02:00
feat: NCS-82 add Swiss-system tournament module

There is a TOCTOU race: two gameStart events for the same game (one white, one black) can arrive concurrently. Both may see existing == null and call subscribeAndConnect twice, resulting in duplicate subscriptions and duplicate moves. The putIfAbsent + null-check pattern is correct in principle, but subscribeAndConnect must be inside the same atomic block, or a separate AtomicBoolean guard should be used.

lq64 commented on pull request NowChess/NowChessSystems#55 2026-06-07 15:08:47 +02:00
feat: NCS-82 add Swiss-system tournament module

Every replica of the official-bots service will receive every bot event. As bot and game counts grow, this is a hot fan-out path with no deduplication. If two replicas are running, both will try to compute a move and publish it — the second publish wins non-deterministically. Add a distributed lock (e.g., Redis SET NX) per (gameId, turn) before computing a move.

lq64 commented on pull request NowChess/NowChessSystems#55 2026-06-07 15:08:47 +02:00
feat: NCS-82 add Swiss-system tournament module

The engine name is hardcoded but the engine instance (ClassicalBot) is also hardcoded at class init. If another difficulty is injected in the future this will be invisible. Either derive the name from the Bot instance (if Bot exposes a name), or at least make it a constant rather than a method.