# `SquidMesh.Runtime.StepExecutor.Preparation`
[🔗](https://github.com/ccarvalho-eng/squid_mesh/blob/main/lib/squid_mesh/runtime/step_executor/preparation.ex#L1)

Prepares a runnable workflow step for execution.

This phase resolves which step a worker is allowed to execute, ensures the
run is in the correct lifecycle state, claims durable step-run state, and
builds the normalized input that execution will consume.

# `prepare_result`

```elixir
@type prepare_result() ::
  {:execute, SquidMesh.Runtime.StepExecutor.PreparedStep.t()}
  | {:reconcile, SquidMesh.Runtime.StepExecutor.PreparedStep.t()}
  | {:skip, SquidMesh.Runtime.StepExecutor.PreparedStep.t()}
  | {:cancel, SquidMesh.Run.t()}
  | :skip
  | {:error, term()}
```

# `prepare`

```elixir
@spec prepare(
  SquidMesh.Config.t(),
  SquidMesh.Workflow.Definition.t(),
  SquidMesh.Run.t(),
  atom() | nil
) ::
  prepare_result()
```

---

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