ReplayOptions class
Strictness flags that control the replay engine's behaviour when the replayed state diverges from the recorded state.
When to use
The default is strict for everything. This is deliberate: a divergence means the receptor, test rule, or graph topology has changed since the recording was taken, and continuing past it would silently produce a state that no ledger entry explains. A caller who wants lenient replay (e.g. for a "best-effort" what-if) opts in explicitly, which is the correct ergonomic for a forensic tool.
How it works
failOnDivergence decides throw-vs-continue, verifyReceipts gates the back-filled receipt checks, settleAfterDispatch drains one event-loop turn per dispatch, and maxEntries bounds the replay length.
See also:
- ReplayEngine.replay — consumes these options.
- ReplayResult — the outcome a lenient replay returns.
Constructors
- ReplayOptions({bool failOnDivergence = true, bool verifyReceipts = true, bool settleAfterDispatch = true, int? maxEntries})
-
Creates a ReplayOptions set.
const
Properties
- failOnDivergence → bool
-
If
true(default), throw ReplayDivergenceException on the first divergence. Iffalse, record the divergence in ReplayResult and continue replaying.final - hashCode → int
-
The hash code for this object.
no setterinherited
- maxEntries → int?
-
Maximum number of entries to replay.
nullmeans unlimited. Used by the CLI's--limitflag; also useful for property tests that want to explore a prefix of a ledger.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settleAfterDispatch → bool
-
If
true(default), the engine settles the event-loop microtask queue after each dispatch before checking the journal and deltas. Asynchronous receptor continuations (asyncMap mappers, deferred timer fires) complete in microtasks; without the settle the engine would assert exhaustion before the receptor had consumed its effects. (The engine design called this flagreseedCycleChecker; the cycle-checker reseed itself is a governance concern, so the flag carries the settle behaviour that is actually load-bearing for the engine's acceptance criteria.)final - verifyReceipts → bool
-
If
true(default), verify each entry'sreceipt.ledgerSeqandreceipt.pulseDigestagainst the entry itself. A ledger constructed by hand (not byLedger.appendInternal) has these fieldsnull, which this check rejects as a divergence.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- diff → const ReplayOptions
-
Lenient preset for the CLI's
replay diffmode. - strict → const ReplayOptions
- Strict preset for production verification (the default).