The packer writes refinement layers, chooses each piece's representation by its ladder, packs live, and simulates delivery over MoQ; the corpus gains a staged golden that the independent verifier re-derives byte for byte. - Refinements (packaging §5.4): for each refinement rung of a piece's ladder, a wai.video.int_refine object over the int_motion base, written by wai-rs's refinement encoder (staged::wir1::encode) with the manifest `wai stage refine` writes; every layer applied to the decoded base by the reference sink before it is kept. The index states each prefix's tier, digest, SSE and deadline. - A piece's ladder and stills (§5.7, plan::piece_ladder): a rule's then.ladder, or the component's first base rung, its refinement chain and its floors. §3.4 item 10 now requires a rule's ladder to name exactly one base, every refinement over a rung it names and every floor. A wai.image.png base is a still, the piece's first frame held for the piece, written as a PNG whose every byte is stated (png.rs; the verifier's reader inflates with miniz_oxide, the one new dependency). - One coder (pack::Coder) for the on-demand and the live packer; the verifier holds each piece to its ladder and its plan's deadline, and decodes every prefix (a still held, each layer through the sink). - Catalogs: the MoQ catalog is a stage set of moq-streaming-format §4.1, written by staged::moq (wai_staged, a receipts track and an alias per media track, depends on a track of every layer below); `priority` (MOQT's, §8.5) and `wai_layer` leave it, and the registry drops `wai_layer`. HTTP views carry the component's default base capability only: a still's piece plays from the floor there (http-delivery §4.2), and its stage view and MoQ tracks list it. - Live (§9.2, live.rs, `wai-pack live`): frames pushed one at a time, pieces coded as the segmenter closes them, windows sealed by version-2 receipts chained live-window; its plan, bases and refinements are the on-demand package's byte for byte (`wai-pack listing --primary`). - Delivery (§8.9, delivery.rs, `wai-pack sim`): a thin consumer of stage_measure::sim — per-track timeouts, §8.5's priorities, the subscriber's cap, group receipts on each track's chain; delivered objects accepted by Merkle proof, dropped ones held by inclusion only. - Corpus: the golden video-staged-01 (fixture, policy, supplied floor and supplied_floor.py, which states how it was written), staged-mutations/, delivery/; video-base-01 keeps its objects, index and receipt (its MoQ catalog and LISTING change). - pack_verify.py re-derives every layer and still from the source (its own rANS coder and deflate), decodes every prefix (staged_verify.py's WIR1 and PNG readers), checks the MoQ catalog with staged_verify.py's §4.1 check, renders every catalog, and re-derives each delivery case through sim_verify.py's simulator. stage_diff.py runs layers, stills, piece plans and deliveries differentially. - Tests 5, 7, 12 and 13 over the staged golden (tests/staged.rs). Co-Authored-By: Claude Opus 5.5 <[email protected]>
321 lines
7.1 KiB
JSON
321 lines
7.1 KiB
JSON
{
|
|
"pack": "video-staged-01",
|
|
"class": "tv",
|
|
"label": "simulated",
|
|
"cases": [
|
|
{
|
|
"name": "strict",
|
|
"plan": {
|
|
"rtt_us": 0,
|
|
"bytes_per_ms": 40,
|
|
"chunk_bytes": 1200,
|
|
"enc_us": 0,
|
|
"startup_us": 3200000,
|
|
"layer_cap": null,
|
|
"fifo": false
|
|
},
|
|
"sim_plan": {
|
|
"plan": "wai-sim/1",
|
|
"mode": "live",
|
|
"link": {
|
|
"rtt_us": 0,
|
|
"bytes_per_ms": 40,
|
|
"chunk_bytes": 1200
|
|
},
|
|
"sender": {
|
|
"schedule": "strict-priority",
|
|
"carriage": "subgroup",
|
|
"layer_cap": null,
|
|
"delivery_timeout_us": {
|
|
"base": null,
|
|
"refinement": null
|
|
},
|
|
"vod_window_us": null
|
|
},
|
|
"sink": {
|
|
"workers": 1,
|
|
"decode_order": "base-first",
|
|
"decode_us": {
|
|
"base": 1,
|
|
"refinement": 1
|
|
},
|
|
"playout_start_us": 3200000,
|
|
"late_refinement": "discard"
|
|
}
|
|
},
|
|
"presented": [
|
|
0,
|
|
1,
|
|
0,
|
|
1,
|
|
0
|
|
],
|
|
"outcome": {
|
|
"label": "simulated",
|
|
"never_sent_capped": 0,
|
|
"pieces": [
|
|
{
|
|
"piece": 0,
|
|
"due_us": 3200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 2890750,
|
|
"dropped": [
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"piece": 1,
|
|
"due_us": 5200000,
|
|
"presented": 1,
|
|
"floor_only": false,
|
|
"base_arrival_us": 3493200,
|
|
"dropped": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"piece": 2,
|
|
"due_us": 6200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 4864350,
|
|
"dropped": []
|
|
},
|
|
{
|
|
"piece": 3,
|
|
"due_us": 7800000,
|
|
"presented": 1,
|
|
"floor_only": false,
|
|
"base_arrival_us": 6082450,
|
|
"dropped": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"piece": 4,
|
|
"due_us": 8800000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 8750250,
|
|
"dropped": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
],
|
|
"delivered": 139408,
|
|
"dropped": 275887,
|
|
"abandoned": 55200
|
|
}
|
|
},
|
|
{
|
|
"name": "fifo",
|
|
"plan": {
|
|
"rtt_us": 0,
|
|
"bytes_per_ms": 40,
|
|
"chunk_bytes": 1200,
|
|
"enc_us": 0,
|
|
"startup_us": 3200000,
|
|
"layer_cap": null,
|
|
"fifo": true
|
|
},
|
|
"sim_plan": {
|
|
"plan": "wai-sim/1",
|
|
"mode": "live",
|
|
"link": {
|
|
"rtt_us": 0,
|
|
"bytes_per_ms": 40,
|
|
"chunk_bytes": 1200
|
|
},
|
|
"sender": {
|
|
"schedule": "fifo",
|
|
"carriage": "subgroup",
|
|
"layer_cap": null,
|
|
"delivery_timeout_us": {
|
|
"base": null,
|
|
"refinement": null
|
|
},
|
|
"vod_window_us": null
|
|
},
|
|
"sink": {
|
|
"workers": 1,
|
|
"decode_order": "base-first",
|
|
"decode_us": {
|
|
"base": 1,
|
|
"refinement": 1
|
|
},
|
|
"playout_start_us": 3200000,
|
|
"late_refinement": "discard"
|
|
}
|
|
},
|
|
"presented": [
|
|
0,
|
|
0,
|
|
0,
|
|
1,
|
|
0
|
|
],
|
|
"outcome": {
|
|
"label": "simulated",
|
|
"never_sent_capped": 0,
|
|
"pieces": [
|
|
{
|
|
"piece": 0,
|
|
"due_us": 3200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 2890750,
|
|
"dropped": [
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"piece": 1,
|
|
"due_us": 5200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 4003200,
|
|
"dropped": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"piece": 2,
|
|
"due_us": 6200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 4864350,
|
|
"dropped": []
|
|
},
|
|
{
|
|
"piece": 3,
|
|
"due_us": 7800000,
|
|
"presented": 1,
|
|
"floor_only": false,
|
|
"base_arrival_us": 6082450,
|
|
"dropped": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"piece": 4,
|
|
"due_us": 8800000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 8750250,
|
|
"dropped": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
],
|
|
"delivered": 108709,
|
|
"dropped": 275386,
|
|
"abandoned": 86400
|
|
}
|
|
},
|
|
{
|
|
"name": "capped",
|
|
"plan": {
|
|
"rtt_us": 0,
|
|
"bytes_per_ms": 40,
|
|
"chunk_bytes": 1200,
|
|
"enc_us": 0,
|
|
"startup_us": 3200000,
|
|
"layer_cap": 1,
|
|
"fifo": false
|
|
},
|
|
"sim_plan": {
|
|
"plan": "wai-sim/1",
|
|
"mode": "live",
|
|
"link": {
|
|
"rtt_us": 0,
|
|
"bytes_per_ms": 40,
|
|
"chunk_bytes": 1200
|
|
},
|
|
"sender": {
|
|
"schedule": "strict-priority",
|
|
"carriage": "subgroup",
|
|
"layer_cap": 1,
|
|
"delivery_timeout_us": {
|
|
"base": null,
|
|
"refinement": null
|
|
},
|
|
"vod_window_us": null
|
|
},
|
|
"sink": {
|
|
"workers": 1,
|
|
"decode_order": "base-first",
|
|
"decode_us": {
|
|
"base": 1,
|
|
"refinement": 1
|
|
},
|
|
"playout_start_us": 3200000,
|
|
"late_refinement": "discard"
|
|
}
|
|
},
|
|
"presented": [
|
|
0,
|
|
1,
|
|
0,
|
|
1,
|
|
0
|
|
],
|
|
"outcome": {
|
|
"label": "simulated",
|
|
"never_sent_capped": 181901,
|
|
"pieces": [
|
|
{
|
|
"piece": 0,
|
|
"due_us": 3200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 2890750,
|
|
"dropped": [
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"piece": 1,
|
|
"due_us": 5200000,
|
|
"presented": 1,
|
|
"floor_only": false,
|
|
"base_arrival_us": 3493200,
|
|
"dropped": []
|
|
},
|
|
{
|
|
"piece": 2,
|
|
"due_us": 6200000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 4864350,
|
|
"dropped": []
|
|
},
|
|
{
|
|
"piece": 3,
|
|
"due_us": 7800000,
|
|
"presented": 1,
|
|
"floor_only": false,
|
|
"base_arrival_us": 6082450,
|
|
"dropped": []
|
|
},
|
|
{
|
|
"piece": 4,
|
|
"due_us": 8800000,
|
|
"presented": 0,
|
|
"floor_only": false,
|
|
"base_arrival_us": 8750250,
|
|
"dropped": [
|
|
1
|
|
]
|
|
}
|
|
],
|
|
"delivered": 139408,
|
|
"dropped": 122786,
|
|
"abandoned": 26400
|
|
}
|
|
}
|
|
]
|
|
}
|