# `Insider.Scenario`
[🔗](https://github.com/hiivemarkets/insider/blob/v0.1.0/tools/insider_lab/lib/insider/scenario.ex#L1)

A bounded, portable sequence of declared semantic contract operations.

Scenario documents contain data, never callbacks, module names, commands, or
ambient authority. A live contract must be resolved from an explicit module
allowlist before execution.

# `t`

```elixir
@type t() :: %Insider.Scenario{
  contract: term(),
  expected_incident_fingerprints: term(),
  id: term(),
  integrity: term(),
  limits: term(),
  reset: term(),
  schema: term(),
  seed: term(),
  steps: term()
}
```

# `canonical_binary`

```elixir
@spec canonical_binary(term()) ::
  {:ok, binary()} | {:error, Insider.Protocol.Error.t()}
```

# `decode`

```elixir
@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `decode_map`

```elixir
@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `descriptor`

```elixir
@spec descriptor(term()) :: {:ok, map()} | {:error, Insider.Protocol.Error.t()}
```

# `new`

```elixir
@spec new(map(), keyword()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `resolve`

```elixir
@spec resolve(term(), term(), atom()) ::
  {:ok, module()} | {:error, Insider.Protocol.Error.t()}
```

Resolves the pinned contract from an explicit bounded module allowlist.

# `retain_steps`

```elixir
@spec retain_steps(term(), term()) ::
  {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

Builds a canonical scenario from an ordered, nonempty subset of existing step IDs.

# `to_wire_map`

```elixir
@spec to_wire_map(t()) :: map()
```

# `validate`

```elixir
@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

---

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