live-http-egress §3.5 said an egress that joins inside a group takes no run for it, and not how a reader holding only the records it was sent tells that from a group whose run skips an object. wai-rs's egress had no rule: it refused the first receipt it read of a group it joined inside running_skips_object. An events track's group is a minute of the room clock, and the gateway joins it with a fill of its latest group, so in a room older than a minute every join refused a receipt of the media group that began before that minute. - §3.5, *Joining inside a group*: a track's first group read is the group of the first running receipt the reader read; a group whose run is empty was joined inside when a receipt of it states no object 0 and it is the first group read or one before it. That receipt and every later one of the group are ignored, none refused, and the group's objects wait for its receipts; past the first group read such a receipt skips an object. Decision D96 records the reading and the candidates refused (the events Location, every group a join, a run taken from the first position read, a run taken later from a fetch). §12 names the new traces. - wai-rs live_egress:🏃:Join, which the egress applies; Egress::joined. - Corpus http-egress: running-joined (video and sound joined inside group 3, the sound's at a compact receipt; the video's first two records fetched after, ignored) and running-joined-skips; faults joined-served-before-receipts (served_before_held) and joined-run-trusted (status_mismatch). Every earlier trace and case keeps its bytes and outcome. - http_egress_verify.py applies the rule; three more weakened checks, each caught. - The web players' core (core.test.mjs): a part of a group joined inside verifies by its receipt index, is refused with neither index nor run, and is refused beside a run taken from inside its group (running_location_mismatch); the next group's parts verify by their runs. Planted and caught: the egress's join taken out, tests/live_egress.rs fails (running-joined and running-joined-skips get running_skips_object refusals the corpus does not state); a client's check that trusts a run taken from inside its group, core.test.mjs fails. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6.2 KiB
live-conformance/http-egress — a live HTTP egress's traces
The corpus of extensions/live-http-egress.md §12, in
one file, vectors.json.
Provenance. Generated here by wai_live_egress_vectors gen (wai-rs, feature
live_egress), from an Ed25519 key on a fixed 32-byte seed (0x17 thirty-two times; one case
signs a group with another, 0x71 thirty-two times, and one a running receipt), a constant clock, and synthetic CMAF: headers
and chunks that hold the boxes an egress reads (§3.1) and a few payload bytes written by the
generator. No media and no input from outside this repository; nothing in it decodes.
tracesare the base traces by name, each in §10.1's form: a room's video (12,800 ticks a second, five objects of 200 ms to a group) and audio (48,000, the same cut), what arrived of them, and a client's requests with what the reference egress answered.casesname a trace, or abaseand theeditsthat plant a fault in it (§12), andexpect:ok, or the reason of §11 a checker refuses it with. A case with nobasealso stateswithheld, each object the egress withheld with its reason of §3.3, andreanchored, how often a receipt chain was anchored again; and, where its trace takes running receipts (it has aroom),running_refused, each running receipt refused with its reason of §3.5.
The base traces plant what a room can send: receipts after their objects, a changed byte, a proof that does not reach its root, receipts missing, signed by another key and unreadable, a skipped group, a missing object, a group that does not start at a sync sample, one that starts early, an object that is not CMAF, a long part, a long group, a short group (off the grid), unlinked receipts, and a room's breaks; and, for a publisher that signs running receipts (§3.5), a run that serves each part as it arrives, receipts that contradict their run, a running receipt that skips an object, one of another group, one that continues another group's leaves, a wrong root, an object stated twice, records that are not the owner's word about the track, a changed byte, and a group whose receipts never come. The fault cases plant what an egress can do wrong: a part listed before it was held, a blocking reload answered early, a withheld object served and listed, a part served before its receipts, a part served that its group's run does not cover, a segment sent ahead and ended while open, and changed playlists, MPDs, bytes and sidecars.
digests is live with every response recorded by the SHA-256 and the length of its body in
place of the body (§10.1). Its fault cases plant digests that are not the state's bodies' (a
playlist's, an MPD's, a receipt index's and a part's), a length that is not the body's, the
hinted part answered by its object's digest before the object arrived, a digest that does not
read, and a response that records both its body and a digest.
running-compact is a publisher that states its objects in running receipts of the compact form
(§3.5, WRR2): the video's one object a receipt, the sound's two, a group's last alone, so the
sound's first of two is held a part later. Beside it: the sound's receipt of objects 2 and 3
never sent (the next skips), one whose root is not over its leaves, one that restates an object
the run holds and one past it, three that do not read (no object, more objects than the group
has to its anchor, a byte short), and a group's receipts over another object than the compact
run stated; and, as fault cases, a part served before the receipt that states it, and a part's
run left without that receipt.
running-joined is an egress that joins a running room inside its video's and its sound's group 3
(§3.5, Joining inside a group): the tracks' fill brings each group's first two objects, the
events track's latest group the running receipts from object 2 on (the video's one object each,
the sound's two in the compact form), and a fetch of the events track's earlier group the video's
first two after. Both groups take no run and refuse no receipt, and their parts are held once the
groups' receipts come; later groups' parts are held on their runs. Beside it, the same with a
later group whose first receipt skips object 0; and, as fault cases, a part of the group joined
inside served before its receipts, and a run taken from inside that group served beside it.
Eleven traces carry a track of WAI envelopes (§4.4) beside the sound: small WAI1 envelopes
the generator writes, of capabilities whose payloads are a few bytes and decode to nothing. One
is served as Mode F; the others plant an envelope changed after signing, half an envelope, a
capability the catalog does not list, another media class, two objects in a group, a track that
states no time (alone and beside a served one), a frame stream and a layer track. Their fault
cases plant a sample that is not the held envelope, an mdat with more than it, and a header,
a playlist and an MPD that are not the state's.
Eight traces carry a protected track (§4.5): headers the generator writes whose sample entry
is encv or enca with a scheme and a KID, and the clear tracks' own chunks, since an egress
reads nothing of a sample. They plant a room under cbcs with a key period every three groups,
the same under cenc at an egress that keeps few segments, clear sound beside protected video,
a header that states protection its catalog does not, a catalog that states another scheme, a
first key period that starts late, key periods an egress refuses (each reason of §4.5), and a
key period that begins off another track's grid. A case with a track that states protection
also states key_periods_refused. Their fault cases plant what an egress can state wrongly: a
playlist and an MPD that omit the protection, key lines and descriptors that are not the
catalog's (another period's KID, another scheme, another licence URI, a system left out), a key
period's first segment without its header, one Period for two key periods, a clear track stated
as protected, and a header served that the state does not have.
cargo run --no-default-features --features live_egress --bin wai_live_egress_vectors -- verify live-conformance/http-egress
python3 -I live-conformance/http_egress_verify.py live-conformance/http-egress