Skip to content

ci(cu-caterpillar): add determinism record/resim test#774

Merged
gbin merged 2 commits into
masterfrom
yang/feat/determinism_CI
Feb 9, 2026
Merged

ci(cu-caterpillar): add determinism record/resim test#774
gbin merged 2 commits into
masterfrom
yang/feat/determinism_CI

Conversation

@makeecat

Copy link
Copy Markdown
Collaborator

Summary

  • Add a determinism contract test for the cu-caterpillar example, gated behind a new determinism_ci feature.
  • Wire the determinism test into CI (debug workspace only) and into just std-ci for local runs.

Related issues

Changes

  • New determinism test builds a sim-mode app, records two runs, replays copperlists, and compares bincode-encoded streams to enforce record/resim equality; it writes under target/determinism_tests and cleans up on success.
  • examples/cu_caterpillar/Cargo.toml adds determinism_ci, and examples/cu_caterpillar/src/main.rs conditionally includes the test module under #[cfg(all(test, feature = "determinism_ci"))].
  • CI and justfile run the test single-threaded with fixed env (RAYON_NUM_THREADS=1, COPPER_DETERMINISM_ITERS=256,COPPER_DETERMINISM_DT_TICKS=1000) for stability.

Testing

  • just std-ci
  • just lint
  • cargo +stable nextest run --workspace --all-targets
  • RAYON_NUM_THREADS=1 COPPER_DETERMINISM_ITERS=32 COPPER_DETERMINISM_DT_TICKS=1000 cargo test -p cu-caterpillar --features determinism_ci -- determinism_record_and_resim --test-threads=1

Checklist

  • I have updated docs or examples where needed
  • I have added or updated tests where needed
  • I have considered platform impact (Linux/macOS/Windows/embedded)
  • I have considered config/logging changes (if applicable)
  • This change is not a breaking change (or I documented it below)

@makeecat makeecat requested a review from gbin January 31, 2026 21:44
@makeecat makeecat self-assigned this Jan 31, 2026
@makeecat makeecat force-pushed the yang/feat/determinism_CI branch from 4975d46 to 30675f9 Compare January 31, 2026 22:31
@makeecat makeecat added the enhancement New feature or request label Jan 31, 2026
@makeecat makeecat force-pushed the yang/feat/determinism_CI branch from 30675f9 to b9ae11a Compare February 3, 2026 13:08
@makeecat makeecat force-pushed the yang/feat/determinism_CI branch from b9ae11a to 858b16a Compare February 5, 2026 11:46
Comment thread examples/cu_caterpillar/src/determinism_test.rs
@makeecat makeecat requested a review from gbin February 6, 2026 16:14
@gbin gbin merged commit ac7ce55 into master Feb 9, 2026
23 checks passed
@gbin gbin deleted the yang/feat/determinism_CI branch February 9, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add a deterministic non-regression test in CI

2 participants