# `wai.tensor.weft` conformance corpus The vectors of `wai.tensor.weft` (SPEC §5, *WFT1 tensor frames*): frames of the WeftCodec format 1.0 (WEFTCODEC-FORMAT v1.0.0; WEFT-AI-CODEC v1.3.0 for its tensor modes; as published with weftcodec 1.2.0), each with the outcome a sink that advertises the capability gives it: its plaintext's length and SHA-256, or the format's error class it is refused with, under the limits the vector names. **Provenance.** Two sources. The frames marked `third-party` in `vectors.json` are the format's own frozen conformance vectors (`conformance/v1/codec/` of its reference implementation, at weftcodec 1.2.0, commit d95fa78c805e, licensed Apache-2.0), copied unchanged by `tools/weft_import.py`: every one but the vectors a later vector supersedes and the one-mebibyte RAW vector. A frame of a mode the registration admits (`RAW`, `TENSOR`, `FLOAT_TENSOR`) keeps the format's expectation; any other is `UnsupportedMode` here. The frames marked `generated` are written by `wai-rs/src/codecs/weft/corpus.rs` from fixed integer sequences: five that decode (an i8 tensor, fp32 weights, bf16 NaNs, infinities, zeros and subnormals, an fp8 plane of one exponent, a RAW frame in three chunks) and frames with one planted defect each, every other field written to agree with it, so that only the rule the defect breaks refuses the frame (several are built so that a decoder without that rule would hand over a plaintext). `licences.json` records each vector's licence and source. | file | what it holds | |---|---| | `vectors.json` | every vector: its file, the SHA-256 of its frame, its limits, its outcome; a third-party vector also the format's own expectation, a generated one what it plants | | `licences.json` | each vector's licence, content and source (`scripts/check-wai-corpus-licences.py`) | | `vectors//frame.wft` | the frame | | `weft_verify.py` | the second implementation | Regenerate and check (from `wai/wai-rs/`): ``` cargo run --no-default-features --features weft --bin wai_weft_vectors -- gen ../tensor-conformance cargo run --no-default-features --features weft --bin wai_weft_vectors -- verify ../tensor-conformance ``` `weft_verify.py` is written from the format's text and SPEC §5 and shares no code with wai-rs: its own frame reader, CRC-32C, canonical structured-value reader, canonical Huffman decoder and plane join, and the BLAKE3 of `claim-conformance/_blake3.py`. It requires every frame to have the digest `vectors.json` states and every vector its outcome; the classes and modes `vectors.json` lists to be SPEC's; every frame it decodes to be refused once any one of several of its bytes is changed; and each of its own checks to refuse some vector and to be needed, by dropping each in turn and requiring some vector to change its outcome. A check that another always backs with the same class, for every frame of an admitted mode (a domain above 1, which the admitted modes' domain rule also refuses; a dependency, which no admitted mode names; a RAW frame's chunk extents and its chunk sums, each of which implies the other), is kept so that a frame with several defects is refused in the format's order, is listed with the check that backs it, and is required to change some vector's outcome when dropped together with that check. Standard library only: ``` python3 -I tensor-conformance/weft_verify.py tensor-conformance ```