Skip to content

feat: implement match lifecycle with deterministic replay - #9

Merged
nosam1998 merged 4 commits into
mainfrom
feat/match-lifecycle
Sep 30, 2026
Merged

nosam1998 merged 4 commits into
mainfrom
feat/match-lifecycle

Conversation

@nosam1998

@nosam1998 nosam1998 commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

External players can create a match, submit moves against an expected turn, retrieve their view, and replay every accepted action. State is rebuilt from the original engine version, configuration, seed, custom position, and canonical actions; mismatched transition events or completion records fail explicitly.

Moves persist atomically with optional idempotency receipts. Duplicate retries return their original response, stale writes include current retry context, and rejected moves or storage failures leave no partial events. A declared game-length cap records a replayable truncation.

Depends on #8. This is a trusted in-process service; network authorization, SQL adapters, opponent scheduling, and transport endpoints are separate units.

Validation: all GitHub Actions checks pass at d864f3c95e6b63a8f17407b44f20101929720f0c, including 21 Rust tests, fmt, clippy, dependency boundaries, cargo-deny, core API compatibility, web checks, and game benchmarks. Eight new lifecycle tests cover complete games, all action encodings, stochastic replay, viewer projections, custom starts, idempotency races, storage failure, truncation, and corrupt logs.

@nosam1998
nosam1998 marked this pull request as ready for review September 30, 2026 03:23
@nosam1998
nosam1998 changed the base branch from feat/match-contracts to main September 30, 2026 04:15
@nosam1998
nosam1998 merged commit da84e99 into main Sep 30, 2026
6 checks passed
@nosam1998
nosam1998 deleted the feat/match-lifecycle branch September 30, 2026 08:27
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