# `mix ankusa.conformance.gen`
[🔗](https://github.com/jamescarr/ankusa/blob/ankusa-v0.7.0/packages/ankusa/lib/mix/tasks/ankusa.conformance.gen.ex#L1)

Writes `conformance/cases/producer.json`: the queue messages
`Ankusa.Sink.Message.encode/3` produces for a fixed set of hooks, each paired
with what an SDK's `decode_message` must return for it (feature
`message.producer`).

    mix ankusa.conformance.gen [--out PATH]

The SDKs' own vectors are decoder-only: they prove an SDK reads the messages
somebody wrote by hand. These prove it reads the messages core writes. The
file is generated, never edited: `mise run check:conformance` (`check.mjs`)
runs this task into a temporary file and fails when the result differs from
the checked-in one, so a field added to, removed from or changed in `encode/3`
fails the build until the vectors are regenerated and every SDK decodes them.

`--out` defaults to `conformance/cases/producer.json` of the repository (run
the task from `packages/ankusa`). The output is deterministic: fixed ids,
times and bodies, keys in a fixed order.

# `render`

```elixir
@spec render() :: String.t()
```

The file's text: the cases `{"cases": [...]}` as pretty JSON with a trailing
newline.

---

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