Replayable port for decision-relevant clock, UUID, and random values.
capture/2 installs a process-local source while a runtime boundary is
evaluated and returns the ordered samples beside the boundary result. Those
samples can be placed in a portable receipt. Passing them back through
:determinism_replay makes every sampled call fail closed on a kind, request,
or ordering mismatch.
Monotonic time is intentionally sourceable but not recorded: it measures local durations and mailbox liveness rather than canonical decisions.
Summary
Functions
Installs capture for a long-lived OTP process such as a stream session.
Runs a boundary with deterministic capture or replay enabled.
Returns sourceable monotonic time without adding receipt evidence.
Returns receipt-recorded cryptographic random bytes.
Returns samples captured so far without ending the process-local port.
Returns a sourceable, receipt-recorded wall-clock value.
Types
@type monotonic_time_unit() :: System.time_unit() | :native
@type sample() :: %{ sequence: pos_integer(), kind: atom(), request: map(), value: term() }
Functions
@spec begin_capture(keyword()) :: :ok
Installs capture for a long-lived OTP process such as a stream session.
Runs a boundary with deterministic capture or replay enabled.
@spec monotonic_time(monotonic_time_unit()) :: integer()
Returns sourceable monotonic time without adding receipt evidence.
@spec random_bytes(non_neg_integer()) :: binary()
Returns receipt-recorded cryptographic random bytes.
@spec samples() :: [sample()]
Returns samples captured so far without ending the process-local port.
@spec system_time(System.time_unit()) :: integer()
Returns a sourceable, receipt-recorded wall-clock value.