# `Portals.Conformance.Runner`
[🔗](https://github.com/Ziinc/portals/blob/v0.1.0/lib/portals/conformance/runner.ex#L1)

Black-box protocol conformance runner (FR-7 / Phase 1 exit criteria).

Tests a codec purely through the `Portals.Codec` behaviour — encode a
frame envelope, decode it back, and check the fixed-shape golden vectors
and malformed fixtures shared by every SDK. A worker SDK's own codec can
be exercised by this runner over a language-neutral bridge (e.g. driving
the SDK's binary through stdin/stdout) as long as that bridge exposes
the same `encode/2` and `decode/2` contract; no Elixir-internal
knowledge of the codec under test is required.

Vectors live in `protocol/vectors/golden.exs`; malformed fixtures live
in `protocol/malformed/fixtures.exs`. Both are plain data files (no
macros, no codec-specific syntax) so every SDK's test suite can load
and replay them independently.

# `codec_module`

```elixir
@type codec_module() :: module()
```

# `failure`

```elixir
@type failure() :: %{name: binary(), reason: term()}
```

# `result`

```elixir
@type result() :: %{passed: non_neg_integer(), failed: [failure()]}
```

# `golden_vectors`

```elixir
@spec golden_vectors() :: [{binary(), list()}]
```

# `malformed_fixtures`

```elixir
@spec malformed_fixtures() :: [{binary(), binary(), atom()}]
```

# `run`

```elixir
@spec run(codec_module(), Portals.Protocol.limits()) :: result()
```

Run every golden vector and malformed fixture against `codec` (a module implementing `Portals.Codec`).

---

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