feat(registry): match/find for ranked against bots, match/create for listed player games, short idle exit #28

Merged
kblack0610 merged 1 commit from feat/match-find into main 2026-11-06 17:45:02 +00:00
Owner

Three match routes for game clients, and ranked bot matches that move rating.

  • POST /api/v1/match/find?game=&ladder=: Ranked. Answers the fullest ready ranked server of the ladder with room, one still starting, or starts one on Edgegap with SERVER_RANKED=<ladder>. 409 at EDGEGAP_MAX.
  • POST /api/v1/match/create?game= {game_id, name}: Create game. Starts a listed server on the chosen map and mode under the player's name.
  • GET /api/v1/match/{id}: starting, ready (address, port, join code), failed or ended.
  • Both starts pass SERVER_IDLE_EXIT_SECONDS=MATCH_IDLE_EXIT_SEC (default 60), so the server quits a minute after its last player leaves and its entrypoint ends the deployment.
  • Starts share one lock (deployOnline, also used by the fleet page), so two cannot both pass the cap.
  • A botmatch the server token posts with ranked: true moves each human's rating against every bot at BOT_RATING (default 1000) and counts it in bot_matches, shown on the board. Host-token or unranked botmatches still move nothing.
  • Migration 0011 adds launches.game/purpose/ladder and ratings.bot_matches.

assumed: ranked bot matches move rating, against a fixed bot rating, per the plan's Risks line (the human can reverse it).
assumed: match/find and match/create take the host or server token, like the other start routes, so a signed-out client can play ranked.

Tests: go vet ./... && go test -count=1 ./... in golang:1.24, all ok; 6 new tests in match_test.go (find, skip other ladders and full servers, auth and ladder, create, bad input, ranked botmatch rating).

Item: dbm-online-ranked
Task: ucp-1157

https://claude.ai/code/session_01KbJcEgFWr2HcJWg5zUcHyK

Three match routes for game clients, and ranked bot matches that move rating. - `POST /api/v1/match/find?game=&ladder=`: Ranked. Answers the fullest ready ranked server of the ladder with room, one still starting, or starts one on Edgegap with `SERVER_RANKED=<ladder>`. 409 at `EDGEGAP_MAX`. - `POST /api/v1/match/create?game=` `{game_id, name}`: Create game. Starts a listed server on the chosen map and mode under the player's name. - `GET /api/v1/match/{id}`: starting, ready (address, port, join code), failed or ended. - Both starts pass `SERVER_IDLE_EXIT_SECONDS=MATCH_IDLE_EXIT_SEC` (default 60), so the server quits a minute after its last player leaves and its entrypoint ends the deployment. - Starts share one lock (`deployOnline`, also used by the fleet page), so two cannot both pass the cap. - A botmatch the server token posts with `ranked: true` moves each human's rating against every bot at `BOT_RATING` (default 1000) and counts it in `bot_matches`, shown on the board. Host-token or unranked botmatches still move nothing. - Migration 0011 adds `launches.game/purpose/ladder` and `ratings.bot_matches`. assumed: ranked bot matches move rating, against a fixed bot rating, per the plan's Risks line (the human can reverse it). assumed: match/find and match/create take the host or server token, like the other start routes, so a signed-out client can play ranked. Tests: `go vet ./... && go test -count=1 ./...` in golang:1.24, all ok; 6 new tests in match_test.go (find, skip other ladders and full servers, auth and ladder, create, bad input, ranked botmatch rating). Item: dbm-online-ranked Task: ucp-1157 https://claude.ai/code/session_01KbJcEgFWr2HcJWg5zUcHyK
Ranked botmatches posted by a ranked server move rating against a fixed BOT_RATING and count as bot_matches on the board.

Item: dbm-online-ranked
Task: ucp-1157

Claude-Session: https://claude.ai/code/session_01KbJcEgFWr2HcJWg5zUcHyK
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kblack0610/bnb-game-servers!28
No description provided.