Skip to content

feat: resume automatic matches through a bounded background runner - #36

Merged
nosam1998 merged 6 commits into
mainfrom
feat/automatic-match-runner
Sep 30, 2026
Merged

nosam1998 merged 6 commits into
mainfrom
feat/automatic-match-runner

Conversation

@nosam1998

Copy link
Copy Markdown
Member

All-opponent matches now return their initial state immediately and advance through the server's background runner. The service discovers pending turns from persisted records, commits bounded batches with revision checks, and isolates unavailable records so healthy matches can continue. Restart resumes unfinished play without requiring a client or an in-memory notification.

The host bounds queued IDs, concurrent scheduler tasks, and search workers. Shutdown cancels pending jobs; cancellation stops in-process searches through their injected clock while retaining the worker permit until CPU work ends. Private observations still enter players only through the existing seat-scoped path.

Tests cover bounded cursor discovery, competing commits without duplicate turns, unavailable records, a real restarted bot-vs-bot game observed through WebSocket, durable completion, and worker capacity recovery after cancellation. Paid providers still require durable spending claims before installation; this runner uses the installed in-process opponents.

@nosam1998
nosam1998 changed the base branch from feat/opponent-seat-replies to main September 30, 2026 21:57
@nosam1998
nosam1998 marked this pull request as ready for review September 30, 2026 22:17
@nosam1998
nosam1998 merged commit 9f30f16 into main Sep 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant