Replay mechanics¶
A replay answers one of three questions about a finished run. Can the run's account be reproduced exactly from its record? Does the same code under the same law, given the same input, produce the same results today? Does the evidence graph rebuilt from the sealed journal match the one the kernel built live? Xratu answers each with its own mechanism, and each replay is itself a recorded, audited object with its own identity, so the original and the replay both exist afterwards. This page covers run replay in its two modes, the replay contract, node-by-node comparison, graph rebuild, and what a replay records.
Three kinds of replay¶
| Replay | Question | Mechanism |
|---|---|---|
| Recorded-output replay | Can this run's account be reproduced exactly? | A new run built from the source's recorded snapshots, state and results, with nothing re-executed |
| Pinned re-execution | Does it still produce the same results? | A new run of the same pinned code, law and input, compared node by node with the source |
| Graph rebuild | Is the evidence graph what the kernel built? | The graph reconstructed from the sealed telemetry journal, deterministically |
A policy decision is also reproducible on its own. The public PolicyDecision
is projected from ACE command-formation and settlement receipts, while the
effective policy is named by the fingerprint. Assurance replays those retained
ACE inputs and receipts; it does not invoke a second policy evaluator. See
Determinism replay.
Run replay¶
A run replay is admitted by the kernel's existing Run authority from an
immutable terminal source seal. The caller needs an independently attenuated
REPLAY right; knowing a run_id grants nothing. The replay creates a new Run
with its own run_id, a required replay origin and a root replay manifest. It
keeps everything the source was fixed to:
flow_id, flow_version the project and version
manifest_snapshot the reusable capability block manifest
bindings_snapshot the bindings, including model bindings
policy_snapshot the effective policy
execution_composition the compiled project execution composition
input_payload the source input, unless overridden
Nothing is re-resolved. The replay runs the same document as the source, so a
comparison between the two compares two executions of one document. The new
Run carries the source fingerprint when exact code and law are unchanged,
because run_id is not a fingerprint input.
The replay mode is policy¶
Which mode a replay uses is fixed by the source Run's sealed replay profile, compiled from effective policy, and recorded on the replay. The caller cannot select it:
replay_mode |
Does |
|---|---|
strict_recorded_output |
Builds the new Run from the source's recorded state and results. The source must have a canonical terminal outcome. Nothing is dispatched, and no handle or live resource is recreated |
reexec_pinned_compare |
Queues the new run for execution with the pinned document, and compares each step's result with the source's |
A missing or unknown mode is refused. It is never silently converted to
strict_recorded_output. Governance decides whether replaying a run of a class
may re-execute it, while Run authority admits and owns the new Run.
flowchart TB
SRC[("Source run<br/>snapshots, plan, input,<br/>state, results")]
MODE{{"llm_determinism.replay_mode<br/>from the source's policy"}}
subgraph STR["strict_recorded_output"]
direction TB
S1["New run from the<br/>recorded state and results"]
S2(["Terminal at once<br/>execution_mode recorded_output"])
S1 --> S2
end
subgraph REX["reexec_pinned_compare"]
direction TB
R1["New run queued<br/>same document"]
R2["Each step executes"]
R3{{"Compare each step's result<br/>with the source's"}}
R4(["match, drift or source_missing"])
R1 --> R2 --> R3 --> R4
end
SRC --> MODE
MODE --> S1
MODE --> R1
The replay source seal and manifest¶
The source Run's terminal transition commits RunReplaySourceSealV1. It binds
the source fingerprint and environment fingerprint to its sealed execution,
input and prompt snapshots, state and results, task and effect receipts,
telemetry-journal ranges and chain anchors, Assurance replay references, and
terminal outcome. A historical Run without this seal and a required replay
profile is not natively replayable.
After an authorised request, Run authority creates RunReplayManifestV1. The
root manifest binds that source seal to the new run_id, the admitted mode and
the replay's explicit input and environment bindings. Its input section retains
the product fields previously exposed by replay.contract.v1:
| Field | Holds |
|---|---|
input_payload_hash, source_input_payload_hash |
SHA-256 of the canonical replay input and source input |
prompt_hash, source_prompt_hash |
SHA-256 of the prompt snapshot the replay and the source used |
prompt_snapshot_present, source_prompt_snapshot_present |
Whether each had one |
prompt_snapshot_signature |
Optionally, the algorithm, signature, signer and time of a signed prompt snapshot |
Assurance verifies the sealed source account before Run authority commits this manifest and activates the new Run. Comparisons produced by the new Run are append-only records; they do not rewrite the source seal or admission manifest.
Equal input hashes show the replay was given what the source was given. A
reexec_pinned_compare replay may override parts of the input to test a
variation only when the sealed replay profile permits it; strict recorded
output never accepts an override. The differing hash then records the
variation, and the comparison cannot claim an exact-input match.
When the policy enables LLM determinism, a replay without a prompt snapshot is
refused, because the prompt is part of what must be pinned for a model's
behaviour to be compared. A signature on the prompt snapshot must be complete:
algorithm, signature, signer and time.
Node-by-node comparison¶
Under reexec_pinned_compare, when each step of the replay completes, existing
Run, result and evidence owners produce typed comparison inputs. Run authority
binds the comparison to the source and replay Runs. The control plane may index
and expose the result, but does not compute or own it:
source_result_hash sha256 of the source step's canonical result
observed_result_hash sha256 of the replay step's canonical result
source_missing the source has no successful result for the step
drift_detected source_missing, or the two hashes differ
Each comparison remains projected as a
policy.determinism.replay_compare Run event and as a history event of kind
policy.determinism.replay_compare_match or
policy.determinism.replay_drift_detected. The native comparison contract also
covers final response, state, effects, evidence graph, scores, ACE decisions
and settlements, terminal outcome, and environment. The replay's product
verdict remains:
| Verdict | Means |
|---|---|
match |
Every compared step produced the source's result |
drift |
At least one step produced a different result |
source_missing |
A step has no source result to compare with |
unknown |
Nothing has been compared yet |
The native comparison and evidence are always retained when required for replay authority. Product-facing drift-event projection follows the sealed policy; suppressing an optional projection cannot erase the comparison.
replay run lists the replays of a source run; replay compare returns the
source, the mode, the verdict, and each step's comparison.
What a replay records¶
Every replay, in either mode, writes:
| Record | Holds |
|---|---|
run.replayed_from run event |
The source run, the mode, the execution mode, the source's policy digest, and the replay contract's hashes |
policy.determinism.replay_mode_applied history event |
The same, attributed to the actor who asked |
run.replay audit record |
The actor, the source and new run ids, and the mode |
RunOriginV1::Replay |
The source Run, root manifest and admitted mode |
RunReplayManifestV1 |
The immutable source seal, new Run and exact replay bindings |
A replay never alters its source. The source run, its events and its evidence stay exactly as recorded, and the replay is a separate run whose records point back to it.
Graph rebuild¶
The kernel's telemetry journal is the ordered, append-only and hash-chained
source record. The evidence graph is a deterministic derived view over sealed
journal ranges, not another journal and not the journal itself. Rebuilding
those ranges reconstructs the same graph and completeness report: order comes
from journal sequence, never from timestamps. Unknown event types and optional
fields are preserved through the rebuild. A journal written under a schema
version the reader cannot interpret produces an explicit unsupported_schema
record, and never a silently partial graph. Migrations run through materialized
views and never rewrite a sealed journal, so a rebuilt graph can always be
checked against the journal_hash it was sealed with. See
The execution evidence graph.
What a replay does not reproduce¶
A model's output is a recorded fact, and a re-executed model call is a new
call. Under strict_recorded_output the recorded output is the replay's
output. Under reexec_pinned_compare the model is called again, on the model
version pinned by the sealed replay document, subject to current live authority
and containment admission. Any difference in the result is
reported as drift at that step. Which model version the replay called is on its own model
route contract, beside the source's. See
What replay reproduces, and what it records.
A replay is also distinct from resuming a suspended run. Resume continues the same run from its suspend point after re-validating its run-plan; replay starts a new run from a finished one. See Suspend, approval, and resume.