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 every external effect (webhooks, notifications, events) is mocked, so nothing fires twice. 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 ReplayDry 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 Decision Replay in the console, pick a past execution and a candidate version, and run. The diff view shows fired rules and effect changes side by side.

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 for inspection. 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> cooperatively cancels a PENDING or RUNNING job.
Window replay is billed per replayed record on the REPLAY metric, with a hard cap of 50,000 records per job. External effects are always mocked in both modes — a replay never sends a webhook, notification, or event.
A trace can only be replayed while its version still exists. LexQ’s audit retention refuses to delete a version that has recorded executions (AN-028), so this holds for any trace produced after retention was enabled.

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.