latent.wire.testing.contracts¶
Canonical wire-contract scenario, normalization, and golden loader.
The contract is a single representative run (:func:canonical_events) covering
the spread that matters across the wire: reasoning + text, labelled step
boundaries, a tool call and its result, and a data-latent-only event (Usage).
:func:normalize_wire strips the per-run-random bits (nanoid block/message ids,
ISO timestamps) so the golden is byte-stable; :func:load_contract returns the
stored golden for a protocol.
Functions¶
canonical_events¶
The fixed run every wire contract is pinned against.
load_contract¶
Return the normalized golden SSE a protocol emits for canonical_events.
Raises FileNotFoundError if the protocol has no recorded contract.
normalize_wire¶
Replace per-run-random ids/timestamps with stable placeholders.