Skip to content

What replay means

Replay in Xratu is three different operations, each answering a different question about a run that has already happened. Each works because everything that could vary was fixed before the original run executed: the code pinned, the flow compiled, the policy frozen. A replay therefore runs the same document again, and never re-resolves it. This page covers the three kinds of replay and what each is for.

Three kinds

Replay Question it answers Typical use
Recorded-output replay Can this run's account be reproduced exactly from its record? An auditor reproducing what happened, without executing anything
Pinned re-execution and compare Given the same code, law and input, does it still produce the same results? Detecting drift in a model or an external dependency; regression checks
Decision and graph replay Would the same rule decide the same way on the recorded input? Does the evidence graph rebuild to the same result? Verifying a single decision, or the integrity of a run's evidence

Run replay

A run replay starts a new Run from a terminal one. Run authority admits it from the source's immutable terminal seal and requires REPLAY authority. The new Run has its own run_id, required replay origin and records, and points back to its source; the source is never changed. It keeps the same fingerprint when its exact code and law are unchanged because run_id is not part of that hash. Which mode it runs in is fixed by the source's sealed replay profile:

  • strict_recorded_output: the replay is built from the source's recorded state and results. Nothing is executed. The replay reproduces the source's account without dispatching a provider, repeating an effect or recreating a live handle.
  • reexec_pinned_compare: the replay executes again, with the same flow, the same block versions, the same bindings and the same policy, and each step's result is compared with the source's through the ordinary authority, effect and receipt path. A step that produced a different result is recorded as drift.

Governance chooses the mode per class of run, so whether a replay may execute anything again is policy, recorded on the replay. The caller cannot select a different mode, and a missing or unknown mode is refused rather than defaulted.

Decision replay

Every public PolicyDecision projects an ACE command-formation or settlement receipt. With the effective policy named by the Run fingerprint, Assurance can reproduce the decision from retained inputs and receipts. Assurance reports an exact result, not-applicable state or typed failure; it does not create the replay Run or invoke a separate policy evaluator. See Determinism replay.

Graph replay

The kernel's telemetry journal is sealed at the end of the Run. Assurance rebuilds the evidence graph as a deterministic derived view over its exact journal ranges, in journal order. A rebuilt graph that differs from the one the kernel built, or a journal that no longer hashes to its sealed head, shows the record was altered. Assurance owns this verification, not source/replay lineage, replay mode or the root replay manifest.

For how each is performed, see Replay mechanics and Replay a run and compare.