Skip to content

test: guard client demo record/playback invariants#237

Draft
cursor[bot] wants to merge 2 commits into
next-gen-5from
cursor/missing-test-coverage-68b3
Draft

test: guard client demo record/playback invariants#237
cursor[bot] wants to merge 2 commits into
next-gen-5from
cursor/missing-test-coverage-68b3

Conversation

@cursor

@cursor cursor Bot commented Jun 3, 2026

Copy link
Copy Markdown

Summary

  • Adds test_client_demo_regressions to guard the recent cl_demo.c extraction and client demo record/playback behavior.
  • Registers the script in CTest and documents it in tests/README.md.

Risky behavior now covered

  • Demo parser EOF/truncation/oversize checks before payload reads.
  • Record/stop-record filename, overwrite, collision, and protocol-selection invariants.
  • Demo playback protocol fallback/custom protocol handling, pure-server bypass/restore ordering, and state/compat setup before priming.
  • Client demo module wiring and command add/remove lifecycle.

Test files added/updated

  • Added tests/scripts/test_client_demo_regressions.sh
  • Updated CMakeLists.txt
  • Updated tests/README.md

Why this reduces regression risk

The recent demo-module extraction moved a core client flow with file parsing and protocol edge cases. This deterministic source-level test prevents future edits from weakening bounds checks, fallback behavior, or lifecycle wiring without requiring display, GPU, or game data.

Validation

  • ./tests/scripts/test_client_demo_regressions.sh /workspace
  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=OFF
  • ctest --test-dir build-coverage-tests -R test_client_demo_regressions --output-on-failure
Open in Web View Automation 

cursoragent and others added 2 commits June 3, 2026 10:03
Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.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.

1 participant