wai: a channel's breaks marked in its HLS Media Playlist, and why a delivery took the route it took #636
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/hls-cues-delivery-decision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this is
Two additions to existing extensions:
Merge order. This branch sits on #632's commit,
946f3beda, which moves changelog entries intowai/changes/and the conformance workflow's lists into step files. Merge #632 first; until it merges, this pull request's diff also shows #632's change.What it carries. One commit,
5bdb727e9: the change ofwai/hls-cues-delivery-decision(98192fe63..c42fa8c9c) in #632's layout. Its message lists the source commits. The branch's changelog entry is a file ofwai/changes/. Its registry row stays where the source branch put it, beside route-record §6.2. The existing channel-lineup and route-record steps already run both corpora, so it adds no step file. Every other file is as the source branch has it.1. The cue tags (channel-lineup §7.4, §8.4)
What it defines. A packager that writes a channel's segments marks each break of the
wai.video.channelreceipt's schedule, in two forms:EXT-X-CUE-OUTwith the break's duration on its first segment,EXT-X-CUE-OUT-CONTwith the time elapsed and the duration on each later one, andEXT-X-CUE-INon its return;EXT-X-DATERANGEpair of RFC 8216 §4.3.2.7.1 as well.SCTE35-OUTandPLANNED-DURATIONgo with the last segment before the break, kept while the window holds a segment of it, thenDURATIONgoes on its return. A date range'sIDis the break's id and its start, so a break id a schedule repeats on another day names another range.A segment carries the same cue lines in every window that holds it. A break whose start or end falls inside a segment is refused
cue_unaligned. A break whose id holds a double quote, a line feed or a carriage return, which no quoted-string can hold, is refusedcue_unwritable. A window's last segment ends before the year 10000, so every date the playlist writes has four digits of year.Its verification (§8.4) takes a receipt, the cues its import wrote (
cues.json) and a playlist. Each cue is held to its break's id, start and duration, and through its cue id to asplice_insert()'ssplice_event_id(cues_malformed,cues_mismatch). The playlist's window is read back (playlist_malformed), and its tags are rendered again and compared byte for byte (playlist_mismatch). The receipt signs each break's id, start and duration, which every tag is written from. It does not sign the section a date range carries, and §12 says so.The reference.
channel_lineup::cue_tags(render,read_playlist,verify_playlist), andchannel_lineup::import::break_cue, the cue §4.8 yields for a break.The corpus.
live-conformance/channels/gains the sample's cues and the receipts or cues of further channels: the JSON form with a section left out, the three characters no quoted-string holds, and a channel scheduled at the end of the year 9999. It gains playlist windows and playlist verifications. Among the windows are one that begins inside a break, one at a return, one with no section, and segments of 6.006 seconds. Others sit at each bound of §7.4. The refused windows are a control of each refusal of §7.4 and one past each bound. Each verification that is not accepted is a control of one step.The independent verifier.
channel_lineup_verify.pyis written from the extension's text and shares no code withwai-rs. It renders and reads the playlists itself. It catches each of its new checks when that check is dropped, among them one for each bound and one for each character no quoted-string holds, and it requires every new mutated copy of the corpus to fail.Breaking: six new
channel_lineup::Reasonvariants, which an exhaustive match overReasonneeds.2. The delivery-decision record (route-record §6.3, §7.2 step 10)
What it defines.
wai-route-delivery-decisionrecords why a delivery of a job's output took the route it took. A delivery is routed as a job is, from its own request, price book of version 2 and policy. Its candidates are the routes that could carry it (an origin, a cache, a bearer), with every limit that removed one. The record:passedthe key by which each other surviving route was passed over;parent, the job's route record, whose served hop's output it carries by count and root.The job's router signs it under its own domain. Decisions are chained: each one after a job's first names the one before it by
prev, so a decision left out before a later one, moved, or out of order is refused. The list proves nothing of decisions after its last, since a verifier is not told how many there were.Its verification. A verification document may have
deliveries: each one is a delivery's three documents and its decision, and they hold the job's decisions from the first. The checks run in this order:request_mismatch,policy_mismatch,pricebook_mismatch);candidate_mismatch,removal_mismatch,rank_mismatch,decision_mismatch);delivery_route_mismatch);delivery_parent_mismatch);delivery_chain_broken).A form that breaks §6.3 is
delivery_invalid. No route record changes, and a document withoutdeliveriesreads exactly as before.The reference.
route_record::delivery(seal,passed,delivered_by,form). The route record's candidate form and step 6 are shared with it, unchanged.The corpus.
live-conformance/routes/gains accepted deliveries and controls, each a control of one defect, refused at its own place. Each member that binds a decision to its documents has a control of its own. The accepted ones are:deliveries.The independent verifier.
route_record_verify.pyis written from the extension's text and shares no code withwai-rs. It verifies each vector from the text, catches each of its new checks when that check is dropped, and requires every mutated copy of the corpus to fail.The registry lists
wai-route-delivery-decisionas a document kind of route-record §6.3.Breaking:
route_record::Accepted::deliveriesandroute_record::Document::deliveries, which a struct literal needs; four newroute_record::Reasonvariants; andReason::ALL, which holds them.How it was verified
This commit,
5bdb727e9.scripts/wai-conformance-lists.py selftestandcheck,scripts/wai-conformance-lists-selftest.sh,scripts/check-changelog-fragment.pyagainst main,scripts/changelog-assemble.py --checkandscripts/changelog-fragments-selftest.shall pass. Rebasing from the conversion's first base, #632's earlier tip 14f1abb7c, onto946f3bedaleft every file's change the same.wai/wai-rs,cargo check --locked --no-default-features --testswithchannel_lineup, withroute_record, and with both together. All pass.git merge-tree). Merging all of them in forward, reverse and a mixed order gives one tree. On the build host, that tree passes these runs:cargo check --testsunder the derivedWAI_FEATURESand underWAI_PQ_FEATURES;cargo check --testsofquickstart,app; the catalogue's library tests; and thewaibinary's unit tests.The modules' tests, the corpora's regeneration and the two Python verifiers did not run on this commit here; their results come from this pull request's CI.
On the CI hosts. Results on the CI runners come from this pull request's own CI run. None of the runs above is a CI result.
🤖 Generated with Claude Code