Skip to content

feat: persist match events and idempotency receipts in SQLite - #10

Merged
nosam1998 merged 5 commits into
mainfrom
feat/sqlite-match-store
Sep 30, 2026
Merged

nosam1998 merged 5 commits into
mainfrom
feat/sqlite-match-store

Conversation

@nosam1998

@nosam1998 nosam1998 commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Match events and successful command receipts persist across process restarts through a SQLx SQLite adapter for MatchStore. Embedded migrations create the match, ordered event, and receipt tables. WAL connections with full synchronous durability and immediate write transactions serialize concurrent appends; read transactions return consistent snapshots.

Production queries are checked at compile time. Committed offline metadata supports builds without a database, while CI recompiles against a fresh migration-derived schema and checks for metadata drift. The lockfile adds storage dependencies without changing existing package versions.

Depends on #8. This PR covers SQLite persistence; PostgreSQL, searchable metadata, snapshots, retention, and server wiring remain separate units.

Validation: all GitHub Actions checks pass at 30a16dbe1dcad0af16365d905c0c3adc3cae5271, including 20 Rust tests, query/schema consistency, fmt, clippy with offline SQLx metadata, dependency boundaries, cargo-deny, core API compatibility, web checks, and game benchmarks. Seven new database tests cover restart recovery, retry ordering and key scope, competing writers through independent pools, rollback after partial writes, and corrupt event sequences.

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