Skip to content

feat(replay): implement replay recording and playback engine - #57

Open
Xaxxoo wants to merge 1 commit into
MindFlowInteractive:mainfrom
Xaxxoo:feature/replay-engine-47
Open

feat(replay): implement replay recording and playback engine#57
Xaxxoo wants to merge 1 commit into
MindFlowInteractive:mainfrom
Xaxxoo:feature/replay-engine-47

Conversation

@Xaxxoo

@Xaxxoo Xaxxoo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a replay module (src/replay/mod.rs) with ReplayRecorder and ReplayPlayer for recording and replaying session events
  • ReplayEvent enum covers SessionStart, HintReveal, AnswerAttempt, SessionEnd with microsecond timestamps
  • Replays serialize to compact .qreplay binary files via bincode
  • --playback <file> and --speed <1|2|4> CLI flags for replay playback
  • Puzzle content hash stored in replay header for integrity cross-checking
  • Replay summary prints total time, hints used, attempt count, and final score
  • Fixes pre-existing build errors (duplicate module declarations, missing time module, clippy warnings, formatting)

Test plan

  • 15 unit tests covering event recording, serialization roundtrip, file save/load, deterministic playback at all speeds, replay summary, integrity match/mismatch detection, edge cases (empty replay, invalid file, nonexistent file, nested directory creation, live timestamps)
  • All 201 tests pass (cargo test)
  • cargo clippy -- -D warnings passes clean
  • cargo fmt --check passes clean

Closes #47

🤖 Generated with Claude Code

…wInteractive#47)

Add a replay system that records player actions during sessions as
timestamped event logs and supports deterministic playback. Includes
ReplayRecorder, ReplayPlayer, .qreplay binary serialization via bincode,
--playback/--speed CLI flags, puzzle content hash integrity verification,
and replay summary output. Fixes pre-existing build errors (duplicate
module declarations, missing time module, clippy warnings).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Implement Replay Recording and Playback Engine

1 participant