Expand description
Deterministic simulation testing for Fusee.
The real shard runtime, journal machines and Rust SDK run inside one thread under a seeded scheduler. The disk tears writes, loses unflushed data at crashes and fails flushes; messages between shards are delayed and lost with the process. A mock external service logs every call. A seed reproduces a run exactly.
The checkers, after every recovery and at the end:
- every acknowledged start and signal exists;
- a result once reported never changes;
- no external call was made with inputs the recovered journal contradicts (one idempotency key, two different inputs);
- once faults stop, every workflow finishes.
scenario runs your own workflows the same way.
Re-exports§
pub use scenario::Scenario;pub use world::Failure;pub use world::Report;pub use world::SimConfig;pub use world::run_seed;
Modules§
- disk
- A simulated disk.
- env
SimEnv: the shard runtime’s I/O on a simulated disk and clock.- rng
- A small seeded generator (SplitMix64). Every random choice in a simulation comes from one of these, so a seed reproduces a run exactly.
- scenario
- Your workflows under the simulator.
- world
- The simulated world: shards on one machine, a client, an external service, a seeded scheduler and fault injection.
Functions§
- sleep
- Waits
dof simulated time, inside a step body under the simulator.