# `Squidie.Runtime.Journal.Replay`
[🔗](https://github.com/dark-trench/squidie/blob/main/lib/squidie/runtime/journal/replay.ex#L1)

Journal-backed workflow replay.

Replay rebuilds the source run from its durable run thread, checks completed
steps against the recovery policy persisted with each runnable, then starts a
fresh journal run through the normal journal starter. The replayed run stores
the source run id as lineage metadata on its `:run_started` fact.

# `replay_error`

```elixir
@type replay_error() ::
  :not_found
  | :invalid_run_id
  | {:invalid_option, term()}
  | {:incompatible_workflow_definition, :replay, map()}
  | {:invalid_replay_source,
     :workflow
     | :trigger
     | :runtime_spec
     | :missing_input
     | {:missing_recovery, term()}}
  | {:invalid_replay_source, :workflow, term()}
  | {:unsafe_replay, map()}
  | Squidie.Runtime.Journal.Starter.start_error()
```

# `replay`

```elixir
@spec replay(String.t(), keyword(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, replay_error()}
```

Starts a new journal run from a prior journal run.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
