Skip to content

Add concurrent stateful testing - #26

Merged
esauro merged 1 commit into
mainfrom
concurrent-stateful
Oct 1, 2026
Merged

esauro merged 1 commit into
mainfrom
concurrent-stateful

Conversation

@esauro

@esauro esauro commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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.

`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>
@esauro
esauro merged commit 9542e1e into main Oct 1, 2026
10 checks passed
@esauro
esauro deleted the concurrent-stateful branch October 1, 2026 08:58
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