Skip to content

Add randomized raft simulation seeds#390

Merged
kacy merged 1 commit intomainfrom
improve/randomized-sim-seeds
Apr 5, 2026
Merged

Add randomized raft simulation seeds#390
kacy merged 1 commit intomainfrom
improve/randomized-sim-seeds

Conversation

@kacy
Copy link
Copy Markdown
Owner

@kacy kacy commented Apr 5, 2026

Summary

Add a deterministic randomized raft simulation harness with fixed seeds.

What Changed

  • add a seeded 3-node random event runner in src/test_cluster_sim.zig
  • cover transport-fault toggles, restarts, healing, and leader proposals
  • assert raft progress and convergence invariants after randomized event sequences
  • print the seed trace on failure to keep runs reproducible

Validation

  • YOQ_SKIP_SLOW_TESTS=1 zig build test-sim -Doptimize=ReleaseSafe
  • YOQ_SKIP_SLOW_TESTS=1 zig build test-contract -Doptimize=ReleaseSafe
  • YOQ_SKIP_SLOW_TESTS=1 zig build test-integration -Doptimize=ReleaseSafe
  • YOQ_SKIP_SLOW_TESTS=1 zig build test -Doptimize=ReleaseSafe still needs follow-up because the suite can exit nonzero from logged-error accounting even when assertions pass
  • YOQ_SKIP_SLOW_TESTS=1 zig build test-gpu -Doptimize=ReleaseSafe still needs follow-up for the same logged-error exit behavior

@kacy kacy merged commit 31ff8d0 into main Apr 5, 2026
@kacy kacy deleted the improve/randomized-sim-seeds branch April 5, 2026 05:10
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