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

Resolves workflow retry configuration into concrete runtime decisions.

This module turns declarative workflow retry definitions into explicit retry
outcomes that a step executor can consume without needing to re-interpret the
workflow contract on every failure.

# `delay_ms`

```elixir
@type delay_ms() :: non_neg_integer()
```

# `resolution`

```elixir
@type resolution() ::
  {:retry, pos_integer(), delay_ms()} | {:exhausted, pos_integer()} | :no_retry
```

# `backoff`

```elixir
@spec backoff(module(), atom()) :: {:ok, keyword()} | :no_backoff
```

Returns the configured retry backoff policy for a workflow step.

# `backoff_delay`

```elixir
@spec backoff_delay(module(), atom(), pos_integer()) :: delay_ms()
```

Returns the configured backoff delay in milliseconds for the next retry
attempt after the given failed attempt number.

# `max_attempts`

```elixir
@spec max_attempts(module(), atom()) :: {:ok, pos_integer()} | :no_retry
```

Returns the configured maximum attempt count for a workflow step.

# `resolve`

```elixir
@spec resolve(module(), atom(), pos_integer()) :: resolution()
```

Resolves the retry outcome after a failed attempt for the given workflow step.

---

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