| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 7s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Successful in 32s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Failing after 1m54s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 4m14s
wai-ledger service / does this change touch it (push) Has been cancelled
wai-ledger service / service · linux (push) Has been cancelled
wai-ledger service / service · macos (push) Has been cancelled
packaging §7.9: a sound track beside the lead whose base is wai.audio.flac may carry one floor rung of wai.audio.opus, supplied in the CMAF form at 48 kHz: an existing ladder's Opus in ISOBMFF (<f>/init.mp4 with its dOps, and its media segments) beside the lead's floors, under the one listing the policy pins. The packer refuses, before it writes anything, an init that is not one Opus track at 48 000 of channel mapping family 0 in the source's channels, a segment whose samples are not sync samples or do not run on from the one before it, a packet that breaks RFC 6716 §3.4 (floor-opus-malformed, new), a sample that does not last its packet, packets that do not last the programme's samples and the pre-skip, and segments other than one per piece and a tail, the packet that carries the programme's last pre-skip samples past its end on the decode timeline. Each piece's floor object is the Ogg Opus stream (RFC 7845) that decodes alone to exactly the piece's samples: 80 ms of pre-roll and the encoder's delay in its OpusHead pre-skip, its last granule position the piece's end, every byte a function of the packets, its derived_from naming the piece's FLAC base. The package carries the ladder's CMAF files byte for byte; wai-pack verify reads them through floor.listing and writes every floor object again. wai-pack gains opus_floor (the init reader, the packet check, the Ogg writer); wai.audio.opus takes source = "supplied" (§3.3), in pack_verify.py and policy_diff.py too. pack-conformance/multi/multi-opus-01: a floor-only lead and a sound track with its Opus floor, floor/a/ written by supplied_opus.py (ffmpeg's libopus at 128 kb/s, its HLS muxer's fragments grouped a piece to a segment); multi_verify.py reads the floor and writes each object again with its own reader and Ogg writer, and finds a flipped object byte, a flipped segment byte and a floor.listing cut short. tests/multi.rs: the objects decode alone to their pieces, the floor out of its CMAF is refused, and what an Opus floor does not take is refused by name. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
| .. | ||
| catalogs | ||
| cmaf-mutations | ||
| conversions | ||
| delivery | ||
| encode | ||
| ladder-mutations | ||
| live | ||
| loudness | ||
| multi | ||
| mutations | ||
| package-mutations | ||
| packs | ||
| policy | ||
| qchoice | ||
| receipts | ||
| refusals | ||
| renditions | ||
| scenecut | ||
| staged-mutations | ||
| stills | ||
| .gitattributes | ||
| cmaf_diff.py | ||
| conversions.json | ||
| loudness_verify.py | ||
| multi_verify.py | ||
| pack_verify.py | ||
| png_diff.py | ||
| policy_diff.py | ||
| README.md | ||
| renditions_verify.py | ||
| requirements-verify.txt | ||
| segment_diff.py | ||
| source_diff.py | ||
| stage_diff.py | ||
| supplied_cmaf.py | ||
| supplied_floor.py | ||
| supplied_opus.py | ||
pack-conformance — the packaging corpus
Vectors for extensions/packaging.md: the policy, its
digest and what it may ask a packager to emit (§3), how a source is cut into pieces
(§4), the integer video payloads, refinement layers and stills a packager writes (§5),
packages (§6–§11), and their delivery over a simulated link (§8.9).
Provenance. Generated here: the wai-pack fixture generator (wai-pack/src/fixture.rs, wai-pack/src/conformance.rs) writes every frame from integer functions of the frame and pixel index; a package's bases, refinement layers and stills are codings of those frames, and its floor an AV1 coding of them by an encoder, as supplied_floor.py states. No footage. renditions/ and loudness/ are written by wai-rs's wai_audio_renditions_vectors gen and wai_loudness_vectors gen from fixed values and formulas of integers (their READMEs).
-
policy/— policies a packager accepts (every rung one it may emit, §3.6), andexpected.json: each policy's effective canonical JSON and digest (eq-defaults-a.tomlalso withroyalty_free_onlyforced on, the one way an override changes it, §3.2), and the pairseq-<name>-a.tomlandeq-<name>-b.toml, two spellings of one policy that must have one digest: every default omitted or written out; standard or inline tables, dotted keys, member order, string escapes, integer notation and comments; andmax-piece.toml, the longest piece a policy may allow (§4.4), at both bounds. -
refusals/—policy/*.toml, one fault each (the byte layer's among them: a byte-order mark, bytes that are not UTF-8, an integer at 2^63, nesting to depth 33 and 80), andsource/*(Y4M and WAV), andexpected.json: each one's reason (§13). Every file is read as bytes. A policy's reason is a packager's: the policy's own (§3.2–§3.4), or its first rung's capability refusal (§3.6), read from SPEC §5's registry. The source files are written by the generator. -
conversions.jsonandconversions/— milliseconds to a timebase (§4.4), a lead start to a component's timebase (§4.5), and Y4M to RGB8 (§4.7) by the SHA-256 of each frame, for 4:2:0 with odd dimensions and for 4:4:4. The Y4M files are written by the generator. -
scenecut/—policy.tomlandexpected.json: for each fixture, its SHA-256, the score of every frame, every piece (start, frames, flags, kind, and the statistics the kind is read from) and the plan digest (§4.2–§4.6). -
encode/—WIV1payloads of the integer video encoder (§5.5;wai-rsint_video_enc), written by the generator, andexpected.json: one for every piece of every fixture, coding the piece's first 12 frames, under a whole-pel and a half-pel parameter set; for each, the encoder's parameters, the payload's BLAKE3, the SSE of its reconstruction against the source, and the SHA-256 of every decoded frame. Identical content gives identical bytes:kinds-01's pieces 4 and 5 both start inside one static shot, so their first frames, and their payloads, are the same. -
renditions/— sets of audio rendition entries and the description records they name, with each set's HLS tags and DASH adaptation sets or its refusal (§8.10): written bywai_audio_renditions_vectors gen(wai-rs), checked byrenditions_verify.py(renditions/README.md). -
loudness/— programmes given as formulas of integers, their loudness measured in integers, and signed loudness statements, each verified or refused (§12): written bywai_loudness_vectors gen(wai-rs), checked byloudness_verify.py(loudness/README.md). -
qchoice/expected.json— the step the base encode chooses (§5.6) for every piece of every fixture (its first 12 frames), under two bounds: each candidate's SSE and SSE per sample in thousandths, the step chosen, and the chosen payload's BLAKE3. -
packs/video-base-01/— a golden package (§5–§11). Its inputs:policy.toml, the supplied floorfloor/v.obu(an AV1 stream with a key frame at each piece start of the plan, each piece coded alone, written by an AV1 encoder from the fixture; the policy pins its listing), andkey.hex(a test signing seed, never a production key).package/is every file the packer writes from them and the fixturevideo-base-01: objects, the stage index, the floor's objects and CMAF files, the catalogs, the receipt andLISTING. The fixture's bumper plays twice, so its pieces are one object each time. -
multi/— packages of several components (§4.5, §5.8), each with the lead and supplied floor ofvideo-base-01(its fixture,packs/video-base-01/floorandkey.hex):multi-av-01, the lead and a stereo audio component of FLAC pieces from a WAV written by a formula (multi_fixture::wav_sample, never committed);multi-titles-01, the lead, a vector-graphics title card, a timed-text component and a score with its FLAC floor;multi-feed-01, the lead and a scoreboard feed;multi-sting-01, the lead and a voiced score of two channels at 48 kHz (score §2.4: band-limited timbres, a sine, noise, pans, curved envelopes, low-pass sections, a glide and echoes) with its two-channel FLAC floor; andmulti-opus-01, whose lead isvideo-floor-only-01's two supplied CMAF floors (a piece per segment, §7.8) and whose sound track, the WAV of the formula at 48 kHz, carries its FLAC pieces and an Opus floor supplied in the CMAF form (§7.9):floor/a/, written bysupplied_opus.py(ffmpeg's libopus at 128 kb/s in 20 ms packets, its HLS muxer's 0.2 s fragments grouped a piece to a segment, and the tail), committed and pinned by the listing of the whole supplied floor.policy.tomland the committedsources/are each golden's inputs, andpackage/what the packer writes from them.multi_verify.py, written from the extension text and sharing no code with wai-pack, recomputes each component's pieces from the lead's, each base's decoded-output digest from the sources (the WAV's samples, each score's mixdown by score §3, voices and two channels included, the source document's frames bytools/wai_vector_check.py, the WebVTT segments it writes), each FLAC payload and caption segment byte for byte, each feed piece's seal, and an Opus floor's CMAF files throughfloor.listing(its init anddOps, each packet by RFC 6716 §3.4, the segments against the pieces) and each Opus floor object, the Ogg Opus stream §7.9 writes, byte for byte, by a reader and an Ogg writer of its own; and plants a flipped payload byte in each component, and in an Opus floor a flipped floor object byte, a flipped media segment byte and afloor.listingcut short, and requires each found.tests/multi.rspacks each again byte for byte, verifies it, and refuses a flipped byte, an altered payload sealed again, a piece's object in another's place and pieces off the lead's. The corpus check also packs the composing sink's reference package,../wai-web/compose/package/, again from../wai-web/compose/policy.tomland its sources and requires every file the same (multi_fixture::compose_check). -
packs/video-staged-01/— a staged golden package (§5.4, §5.7): a moving shot, the bumper, a still shot, the bumper again and a second moving shot, under a policy of anint_motionbase with twoint_refinelayers, a still for a static piece (a rule's ladder), three classes (one capped by rate, one floor only), a moment whose rule moves the last piece's layers to an 800 ms deadline, and layer lags. Its floor was written bysupplied_floor.py. The bumper's base, layers and floor are one object each; the still's piece is carried over HTTP by the floor (§8.3) and over MoQ on the base track. -
packs/video-ladder-01/— a golden package of two floor rungs over one base (§7.1): the fixture and base rung ofvideo-base-01, so its bases are that package's objects, and two supplied AV1 streams,floor/hi.obuat the fixture's size andfloor/lo.obuat half its width and height, each written bysupplied_floor.py(--scale lo=2). Each piece has its base and one floor object per floor rung; each floor has its own CMAF files under its floor name (floor/hi/,floor/lo/), its own floor playlist and MoQ track, and the classical master, every class's master anddash/classic.mpdlist both. -
packs/video-repack-01/— a re-pack golden (§11.5):video-ladder-01's policy under another asset id and its supplied floor, packed with every piece's base taken from the parent its fileparentnames,video-base-01, rather than coded. Its objects arevideo-ladder-01's; its receipt namesvideo-base-01's receipt as the package it re-packs (parent kindre-pack); and each piece's base entry is the parent's, field for field. Both verifiers check it against its parent. -
packs/video-cmaf-01/— a golden whose supplied floor is in the CMAF form (§7.7):video-ladder-01's policy withfloor.supplied_form = "cmaf", and its two streams as a media muxer wrote them,floor/<name>/init.mp4andfloor/<name>/seg_<k>.m4s, one segment per piece, bysupplied_cmaf.py(ffmpeg's HLS muxer,-c copy). The package's floor files are those files, byte for byte, under their SHA-256;floor.listingis the supplied floor's listing; and each floor object holds its piece's samples, which are the OBU form's temporal units of the same streams. -
cmaf-mutations/— the CMAF golden altered, inpackage-mutations/'s layout: itself (ok); a segment replaced by one of the same samples, afreebox before it, under its own SHA-256, which the catalogs name, so its one fault is its binding tofloor.listing;floor.listingaltered; and without it (eachfloor-cmaf-mismatch). -
packs/video-floor-only-01/andpacks/video-floor-only-02/— floor-only goldens (§7.8): a component ofprofile = "floor-only"with the ladder's two floor rungs and no base or source, the floor in the CMAF form (video-cmaf-01's files) and in the OBU form (video-ladder-01's streams). Their pieces are the first floor's segments or shown key frames, the ladder golden's plan; each piece is its two floor objects, which carry noderived_fromand hold the ladder golden's units, of kindnone; no class lists a WAI object. -
ladder-mutations/— packages a verifier must refuse or accept (§11.3), each the ladder golden altered (re-sealed with its key where the receipt orLISTINGalone would catch it), inpackage-mutations/'s layout: the golden itself (ok); piece 2's two floor objects swapped (floor-object-mismatch); the second floor's CMAF files under the component's name (floor-cmaf-mismatch); and a classical master listing one floor of two (catalog-mismatch). -
mutations/— stage indexes, objects and version-2 receipts, andexpected.json: each case's reason (§6.2–§6.4, §9.1), a well-formed case of each kind among them, and three receipts carrying a signature only a verifier that checks the equation alone accepts (a key of small order, that key spelled with y = p + 1, an R of small order), eachreceipt-signature(SPEC §7 Signatures). -
receipts/— version-1 package receipts as JSON (§9.3), with each one's receipt hash: the legacy receipt whose hashwai-rspins, an unmetered one, and the unmetered one carrying each of those three signatures, marked"signature": "refused". -
catalogs/— stage indexes no golden package has (refinements on more than one deadline), with the MoQ catalog each gives (§8.4). -
live/— the staged golden's source packed live (§9.2) with its key, in windows of two pieces: each window's stage index and receipt (windows/<n>/), andexpected.json: each window's first piece and entry, its pieces, its index digest and its receipt hash. Each window verifies against its receipt; the first starts the chain, and each later one names the receipt before it as itslive-windowparent, the index before it as itsprev_index_digest, and continues its pieces and entries. Its pieces, bases and refinements are the golden's, entry for entry (a live pack has no floor). -
stills/— PNG files a still's reader reads or refuses (§5.7: any PNG of 8-bit RGB without interlace), each a generated 5 × 3 picture written chunk by chunk, andexpected.json: each file's verdict and, read, the SHA-256 of its RGB8 samples. Read: the module's own still, and files with a suggested palette, ancillary chunks, and the image data split across two chunks. Refused: an interlace, bytes afterIEND, a short row, a palette after the image data, an unknown critical chunk, noIEND, a chunk between the image data, a chunk's CRC, a sixth filter, another colour type, a zlib window past 32 KiB, bytes after the zlib stream, and its Adler-32. And one dynamic block of literals twice: with a lone distance code of one bit, read (the one incomplete code set the zlib library takes), and of two bits, refused. -
staged-mutations/— the staged golden itself (ok: verified without its sources, every layer's prefix digest held to it), and the staged golden altered and re-sealed with its key, in the layout ofpackage-mutations/: a refinement on another deadline than its plan's, a piece missing its top layer, a still where the policy's rule now gives the piece the default ladder (eachindex-policy-mismatch), a top layer coded again at another step and a still's digest of its one frame rather than its frame held for the piece (eachprefix-digest), and a piece and a still each longer than the policy'smax_ms(index-policy-mismatch, refused before a frame is decoded, so a still's declared duration never sets what a verifier allocates); a policy past §4.4's longest piece (max_ms600001,policy-piece-bounds); and the still given the longest piece a policy allows (max_msten minutes), its manifest naming those frames, refused by its floor's unit count before any frame is decoded (floor-object-mismatch); a still whose manifest'stargetholds a member more, and a top layer whosetargetis not null (eachobject-manifest); and the still as a PNG §5.7 does not read, its one dynamic block's lone distance code two bits long (prefix-digest). -
delivery/—expected.json: the staged golden packed live and delivered to atvsubscriber over a simulated link (§8.9), under §8.5's priorities, without them, and capped at layer 1: each piece's presented layer, base arrival and dropped layers, and the byte counts. Labelled simulated. -
package-mutations/— packages a verifier must refuse (§11.3), each the golden altered and, where the receipt orLISTINGalone would catch the alteration, re-sealed with the golden's key: what a dishonest packager holding the key could publish. Each is an overlay on the golden (<name>/, the files that differ or are new;expected.json, the files it removes, the directories it adds that hold nothing or cannot be read, and its reason), written out as a directory and read strictly by each verifier: a receipt over no component, an index that is not its policy's, the policy's own refusals (apolicy.jsonthat turnsroyalty_free_onlyoff among them), a missing or corrupted object, a live window no catalog can be written for, floor objects that do not open on a key frame or are not §7.2's, files and directories a strict read finds, and a receipt file that is not its canonical form; and those the verifier must accept (an extra key frame the policy allows, and a metered package, §9.4: the golden re-sealed with a 500 mW model meter over one second and its measurement claim, every member fixed), with a claim about another figure (measurement-claim-invalid) and none (measurement-claim-missing).
The fixtures are not committed. wai-pack fixture gen <name> writes each from its
definition (wai-pack/src/fixture.rs), every byte an integer function of the frame
index and the pixel position, and the corpus pins its SHA-256:
cuts-01— hard cuts; a flash exactly as long as the lookahead, which is not cut; a fade, which is not cut; and two shots cut against each other, each return a cut.kinds-01— one shot of each kind, then a static shot longer than the longest piece, cut wheremaxforces it.video-base-01— 64 × 36: three shots with a one-second bumper between them, the bumper the same frames both times (its span reads time from its own start).video-staged-01— 64 × 36: a moving shot, the bumper, a shot that does not change, the bumper again, and a second moving shot.
Files are compared as bytes; .gitattributes turns off line-ending conversion.
Generation.
cd wai/wai-pack
cargo run --release -- conformance regen ../pack-conformance
Verifiers.
-
wai-pack conformance check ../pack-conformancerecomputes every expected file and every generated input and requires them to equal the committed ones, requires the digests of each equal pair to be equal, decodes every encode payload throughdecode_intto the encoder's reconstruction and recomputes its SSE. It packs each golden again and compares every file, verifies the committed package (wai-pack verify), gives every mutation and every package mutation its reason, reads every still to its verdict, and checks the live windows' chain.cargo testruns the same check, with the scene cuts of each fixture stated as tests (tests/scenecut.rs). -
pack_verify.py, Python standard library and, to sign what it re-derives,cryptography(TOML throughtomllib, so 3.11 or later) and sharing no code with wai-pack, written from the extension: its own policy schema, constraints, canonical JSON and digest; its own Y4M and WAV readers; the fixtures regenerated from their definition;wai.pack.scenecut/1in its on-demand form, every frame known, against the vectors of the streaming segmenter; the capability rules from the registry's published export (../registry/capabilities.json); and every encode payload decoded to its frames' SHA-256, with its SSE recomputed from the regenerated source. BLAKE3 comes from../claim-conformance/_blake3.py, and theWIV1parser and decoder from../int-payload-conformance/int_payload_verify.py. For the packages it has its own stage index reader and rules, object rules (each payload parsed as its pinned format, aWIR1reader included), version-1 and version-2 receipts (Ed25519 by WAI's strict rule, SPEC §7 Signatures, from../claim-conformance/_ed25519.py), an AV1 stream and sequence header reader, the CMAF files, and every catalog: it verifies each golden package in §11.3's order, rebuilding the floor's files and re-rendering the catalogs byte for byte, gives every mutation its reason, checks the version-1 receipts, and verifies every package mutation and staged mutation in the same order, refused with its reason. Every prefix is decoded: a still by its own PNG reader, and each refinement layer by theWIR1decoder of../staged-conformance/staged_verify.py(written from staged-delivery); and the MoQ catalog is checked by that file's moq-streaming-format §4.1 check. Every HTTP playlist of a golden is read by../http-conformance/http_verify.py's union, floor and adjacency checks (http-delivery §4.2), and every file ofstills/by its own PNG reader, to the corpus's verdict. Each window oflive/it reads as an index and a receipt, checks the chain, and compares with the golden's index. From the regenerated fixture it re-derives what only the source decides: the pieces, their rules, moments, ladders and class plan, each base's SSE and step and the encoder's choices, each still's bytes, and each refinement layer's bytes with its own rANS coder and table fit; and it checks the supplied floor against the policy's listing and the plan. The delivery cases it re-derives from the fixture's cut and the package's index by its own mapping onto the simulator of../staged-measure-conformance/sim_verify.py.python3 pack-conformance/pack_verify.py pack-conformance -
policy_diff.pyruns the policy reader differentially: byte-level cases (a byte-order mark, bytes that are not UTF-8, integers past 2^53 and 2^63, nesting at and past the cap, control characters, line endings) and seeded random policies with faults in every table, each one's verdict and digest fromwai-pack policy-verdictequal topack_verify.py's.python3 pack-conformance/policy_diff.py <wai-pack binary> 1 3000 -
segment_diff.pyrunswai.pack.scenecut/1differentially: seeded random clips under random parameters, every piece and score of the streaming segmenter (wai-pack segment-json) equal topack_verify.py's on-demand form, and every piece withinminandmax.python3 pack-conformance/segment_diff.py <wai-pack binary> 1 2000 -
stage_diff.pyruns the staged packer differentially: refinement layers over random frames and steps, stills of random pictures, piece plans under random policies (rules with ladder subsets, maximum layers and deadlines, classes with rates, layer lags) and deliveries of random publications over random links, each result ofwai-pack stage-jsonequal topack_verify.py's.python3 pack-conformance/stage_diff.py <wai-pack binary> 1 3000 -
png_diff.pyruns a still's reader differentially: streams the zlib library writes (every level and strategy, windows from 512 bytes to 32 KiB) and the packager's own stills; dynamic blocks built on each of RFC 1951's and zlib's code-set rules (complete codes, no distance code, a lone one-bit distance code used and misused, a lone longer one, over-subscribed and incomplete codes of each kind, repeats with nothing before them or past the code lengths, no end-of-block code, too many symbols, a distance past the bytes written, stored blocks with a wrong complement, fixed blocks with symbols they cannot use, several blocks of mixed kinds); and those altered. Each verdict, and each read picture's SHA-256, fromwai-pack stage-json'sread-pngmust bepack_verify.py's, which inflates with Python's zlib; and each construction must have the verdict the rules give it.python3 pack-conformance/png_diff.py <wai-pack binary> 1 4000 -
supplied_floor.pyis how a golden's supplied floor was written (an AV1 encoder over each piece of the generated fixture, the policy's listing set to it); it is not a step of verification, since an encoder's output is pinned by the listing, not re-derived. -
source_diff.pyruns the source readers differentially: seeded Y4M and WAV mutations (dimensions and channel counts at and past their range, every format field, truncations, single-byte changes), each file's verdict fromwai-pack source-verdictequal topack_verify.py's, and no reader panicking.python3 pack-conformance/source_diff.py <wai-pack binary> 1 3000