Allow deferred tournament rounds and live participant counts #3

Merged
n-popescu merged 1 commit from codex/tournament-registration-updates into main 2026-10-21 18:23:47 +00:00
n-popescu commented 2026-10-21 18:23:29 +00:00 (Migrated from github.com)

Tournament creation no longer requires guessed round windows. It stores a planned date; choosing 1v1/2v2 after registration derives the bracket and required round count. Operators can supply windows during format selection or afterward, and known opponents are scheduled as each applicable window becomes available.

The original announcement now shows participant count, state and format. Edits are coalesced on the existing five-second worker, persist their message ID/last content across restarts, avoid unchanged edits, back off on failures and replace deleted messages. Pending invitations do not add entrants until accepted. Channel moves create a newly tracked announcement in the destination.

Every creation field has a corresponding modify control. An explicit format rebuild:true can replace an entirely unstarted bracket, withdraw old bookings and publish fresh match IDs without reusing any old IDs. Started games, recorded results and forfeits prevent rebuilding.

Validation: go test ./..., go test -race ./..., go vet ./..., build and git diff --check. New isolated tests cover create/format/restart without times, incremental scheduling, original-message counter edits, accepted invites/withdrawals, unchanged restart behavior, failed-edit backoff, deleted-message replacement, Discord content limits, safe rebuilding and complete creation-option editing coverage. No real tournament/messages were created for testing; the production state currently has no tournaments requiring announcement migration.

Tournament creation no longer requires guessed round windows. It stores a planned date; choosing 1v1/2v2 after registration derives the bracket and required round count. Operators can supply windows during format selection or afterward, and known opponents are scheduled as each applicable window becomes available. The original announcement now shows participant count, state and format. Edits are coalesced on the existing five-second worker, persist their message ID/last content across restarts, avoid unchanged edits, back off on failures and replace deleted messages. Pending invitations do not add entrants until accepted. Channel moves create a newly tracked announcement in the destination. Every creation field has a corresponding modify control. An explicit `format rebuild:true` can replace an entirely unstarted bracket, withdraw old bookings and publish fresh match IDs without reusing any old IDs. Started games, recorded results and forfeits prevent rebuilding. Validation: `go test ./...`, `go test -race ./...`, `go vet ./...`, build and `git diff --check`. New isolated tests cover create/format/restart without times, incremental scheduling, original-message counter edits, accepted invites/withdrawals, unchanged restart behavior, failed-edit backoff, deleted-message replacement, Discord content limits, safe rebuilding and complete creation-option editing coverage. No real tournament/messages were created for testing; the production state currently has no tournaments requiring announcement migration.
Sign in to join this conversation.
No description provided.