[Phase 2.8] Deterministic Replay Hashing & 1,000-Match Headless TCG Bot Soak Harness #26

Open
opened 2026-11-17 08:14:13 +00:00 by john4064 · 0 comments
Owner

Goal

Add canonical match state hashing (MatchState::state_hash()) and an automated headless 1,000-match TCG bot-vs-bot soak harness verifying determinism, zero panics, zero infinite loops, and clean game termination.

Metadata

  • Phase / Step: Phase 2.8
  • Depends On: #7, #8, #9, #10, #24, #25
  • Unlocks: #11, #18, #37
  • Target Crates / Paths: crates/chaotic_core/src/replay.rs, crates/chaotic_core/tests/tcg_soak.rs
  • Line Budget Plan: Production .rs <= 400 lines, test .rs <= 600 lines, mod.rs < 80 lines (AGENTS.md Section 2.3)

Acceptance Criteria

  • Implement seeded RNG + serializable MatchReplay { manifest_hash, seed, deck_a, deck_b, intents, expected_final_hash }.
  • Run 1,000 deterministic 3v3 and 6v6 bot-vs-bot matches across random valid decks in under CI time budgets.
  • Verify exact bitwise state_hash replay parity across repeated runs and platforms.
  • Assert every match terminates cleanly with zero negative Energy/stat leaks or stuck Priority states.
## Goal Add canonical match state hashing (`MatchState::state_hash()`) and an automated headless 1,000-match TCG bot-vs-bot soak harness verifying determinism, zero panics, zero infinite loops, and clean game termination. ## Metadata - **Phase / Step:** Phase 2.8 - **Depends On:** #7, #8, #9, #10, #24, #25 - **Unlocks:** #11, #18, #37 - **Target Crates / Paths:** `crates/chaotic_core/src/replay.rs`, `crates/chaotic_core/tests/tcg_soak.rs` - **Line Budget Plan:** Production `.rs` <= 400 lines, test `.rs` <= 600 lines, `mod.rs` < 80 lines (`AGENTS.md` Section 2.3) ## Acceptance Criteria - [ ] Implement seeded RNG + serializable `MatchReplay { manifest_hash, seed, deck_a, deck_b, intents, expected_final_hash }`. - [ ] Run 1,000 deterministic 3v3 and 6v6 bot-vs-bot matches across random valid decks in under CI time budgets. - [ ] Verify exact bitwise `state_hash` replay parity across repeated runs and platforms. - [ ] Assert every match terminates cleanly with zero negative Energy/stat leaks or stuck Priority states.
Sign in to join this conversation.
No description provided.