Repository navigation
Add concurrent stateful testing - #26
Merged
Merged
Conversation
`Stateful.run(machine, tc, Stateful.options().maxConcurrency(n))` runs a state machine on engine-drawn worker threads, following hegel-rust's concurrent runner: rounds are driven on the root handle, each worker pulls rules through a fresh per-round clone, invariants run at the join points, and a round's outcome is resolved in Rust's precedence (control error, then overrun/invalid, then the lowest worker's failure). `@Rule(group)` assigns concurrency groups; `ConcurrentPool` is the thread-safe pool for concurrent rules. Worker output is buffered per round and reported under the round header stamped `[worker N +X.XXXms]`. The sequential path is unchanged, so existing stateful tests and their stored failures are unaffected. `Libhegel` gains `testCaseClone` (a draw: it can report `E_STOP_TEST` on a shorter replay, hence the raw-rc convention) and `testCaseSetWorker`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stateful.run(machine, tc, Stateful.options().maxConcurrency(n))runs a state machine on engine-drawn worker threads, following hegel-rust's concurrent runner: rounds are driven on the root handle, each worker pulls rules through a fresh per-round clone, invariants run at the join points, and a round's outcome is resolved in Rust's precedence (control error, then overrun/invalid, then the lowest worker's failure).@Rule(group)assigns concurrency groups;ConcurrentPoolis the thread-safe pool for concurrent rules. Worker output is buffered per round and reported under the round header stamped[worker N +X.XXXms].The sequential path is unchanged, so existing stateful tests and their stored failures are unaffected.
LibhegelgainstestCaseClone(a draw: it can reportE_STOP_TESTon a shorter replay, hence the raw-rc convention) andtestCaseSetWorker.