# `Macaw.Live.Specs.Batch`
[🔗](https://github.com/dcoai/macaw_live/blob/v0.1.0/specs/batch.ex#L1)

The contained cell's batch protocol (spec/02 §3), modeled so every ordering it reaches is
checked (spec/00 §3). The page holds the latest input (`arrived`, newer inputs numbered
in order) and sends it to the cell as a batch only when none is in flight; the cell
takes its mailbox in order and answers each batch with its sequence; the page takes an
answer only for the sequence in flight. The cell may crash at any point: its mailbox is
lost, its `:DOWN` follows its answers on the one channel to the page (the BEAM's order
between a pair of processes), and the page restarts it with the latest input as its
first batch, sequence 1 again (spec/02 §5).

The invariants: the cell's mailbox never holds more than one batch; the value the page
draws never goes back to an older input; and a page with nothing in flight, nothing
waiting and nothing in transit draws the newest input. With `one_in_flight: false` the
page sends whenever it has something newer, and the mailbox invariant breaks, so the
model is shown to find the broken protocol, not only to pass.

# `__tla_spec__`

The compiled specification (`ExTLA.Spec.Compiled`).

---

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