Skip to main content

What is Decision Replay?

Decision Replay takes a real past execution — identified by its trace ID — and re-evaluates its exact input facts against a candidate version. The stored decision is the baseline and is never re-evaluated; only the candidate runs, and nothing fires twice: rule actions have no outward effects to fire in the first place. The result is a decision diff: whether the decision changed, which rules fired on each side, and how the resulting effects differ.
Dry Run vs Simulation vs Replay — Dry Run evaluates facts you type by hand. Impact Simulation runs a dataset or a slice of history in bulk and reports aggregate statistics. Decision Replay answers the sharpest question of the three: what would this exact production decision have been under the new version?

When to Use

  • Before deploying a fix — a customer was priced wrong last Tuesday. Replay that trace against the fixed version and confirm the decision now comes out right.
  • Incident forensics — pair with Decision Provenance to understand why a decision happened, then verify the fix with a replay.
  • Blast radius before rollout — replay a whole date window against the candidate and count how many past decisions would change.

Two Modes

Replaying a Single Decision

Console

Open a past execution under Executions, expand Single Decision Replay in its Execution Detail, pick a candidate version, and run. The rules that fired under Baseline (stored) and Candidate appear side by side, with the effect changes below them.

CLI

API

Response

decisionChanged is the headline. baselineFired and candidateFired list the rules that fired on each side, and effectChanges details how the resulting effects differ. determinism is a property of the candidate version itself: whether identical inputs are guaranteed to produce identical decisions.
Replaying a trace against the same version it originally ran on must yield decisionChanged: false. If it does not, the version is non-deterministic — worth knowing before you trust any diff produced from it.

Window Replay — Blast Radius

Window replay re-evaluates every execution in a date range against the candidate and measures how many decisions would change.

Submit

Poll

While the job is RUNNING, progress climbs to 100. On COMPLETED, the response carries a summary of how many decisions changed and changedSamples, some of the changed decisions for inspection. changedSamples holds a limited number of decisions, so it may not list every change; summary has the full counts. If the window held more executions than maxRecords, capped is true — the result is a sample, not the full window. lexq replay list shows job history, and lexq replay cancel --id <jobId> cancels a PENDING or RUNNING job.

Record Limits

The 1000 in the examples above is that default spelled out, not a required argument. A maxRecords above the hard cap is rejected with 400 rather than clamped down to it. The window is read newest first, so a capped job measures your most recent executions in the range rather than a spread across it. capped: true in the response says the window held more than maxRecords.
Window replay is billed per replayed record on the REPLAY metric. Neither mode has outward effects: the 3 action primitives read and write facts, and nothing else.
The candidate must be a version you haven’t deleted. A published version you delete is kept as ARCHIVED. The console doesn’t offer it as a candidate, and passing its ID through the CLI or API is rejected (P-008). Its traces stay, so you can replay them against another version of the same group. See Deleting a Version.

Next Steps

Decision Provenance

Trace who authored, published, and deployed the rules behind a decision.

Impact Simulation

Bulk what-if analysis with aggregate statistics before you deploy.