Skip to content

feat(game): CAS append for offers and claims (CV-173) - #22

Merged
Leo-Galli merged 1 commit into
mainfrom
feat/cv-173-cas-append-offers
Nov 25, 2026
Merged

Leo-Galli merged 1 commit into
mainfrom
feat/cv-173-cas-append-offers

Conversation

@Leo-Galli

Copy link
Copy Markdown
Contributor

Summary

  • Add commit_append_cas (shared Lua with apply) so offer/claim/resign/abort atomically SET meta + RPUSH 1–2 events under LLEN CAS
  • Make bare append_game_event use event-only Lua CAS (no meta rewrite) with Conflict retry
  • Tests: tests/atomic_append.rs concurrent resign, offer-vs-resign, dual draw offers, bare append seq uniqueness

Task

CV-173 — CAS append_game_event for offers/claims

Test plan

  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked (local; Redis-gated suites skip without REDIS_URL)
  • node scripts/verify-readme.mjs
  • CI verify with Redis 7 (concurrent CAS tests must run green)

Verification notes

  • Engine SPRT: not applicable
  • Secret scan: clean; no fair-play thresholds
  • Bugbot: fixed stale-meta overwrite on bare append

Wire resign/abort/offer/claim and bare append through Redis Lua CAS so concurrent non-move writers cannot race LLEN/RPUSH seq.
@Leo-Galli
Leo-Galli merged commit e5b4611 into main Nov 25, 2026
1 check passed
@Leo-Galli
Leo-Galli deleted the feat/cv-173-cas-append-offers branch November 25, 2026 18:14
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