wai-pack: staged packages — refinement layers, stills, a piece's ladder, live windows and simulated delivery (W4-4) #199
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/w4-4-staged-packages"
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?
Staged packages in wai-pack: refinement layers, stills, a ladder chosen per piece, live windows written as they seal, and simulated delivery. Every new byte is re-derived by the independent verifier.
Packaging.
wai.video.int_refineobject over the piece'sint_motionbase, using the shared refinement encoder. The reference sink applies each layer before it is kept. The index records each prefix's tier, digest, SSE and deadline.wai.image.pngbase is a still. It is written as a PNG whose every byte is stated (Subfilter, one fixed-Huffman block with its matches stated), so an independent implementation writes the same file.dependson every layer below.priorityandwai_layerare gone.pack_verify.pyruns the HTTP verifier's union, floor and adjacency checks over every golden playlist.Live and delivery.
wai-pack livepacks a stream from standard input in windows sealed by version-2 receipts chainedlive-window. It writes each object when it is published and each window when it is sealed, as whole files, and keeps no object's bytes once written. The result is the on-demand package, byte for byte. A source that fails mid-stream keeps every sealed window and exits 1, saying what it kept.wai-pack simruns the staged-measurement simulator over what a live packer publishes, with per-track timeouts, §8.5's priorities, a subscriber's layer cap and group receipts. The simulator gains a refinement's own timeout. There is now one stall bound,stall_bound_for, and wai-web prints the same bound as the native tool.max_msbefore decoding it, and hashes a held still without repeating its frame.Corpus and checks.
video-staged-01,staged-mutations/,delivery/,stills/andlive/(the golden packed live in windows, with its chain checked).stage_diff.py: refinement layers, and stills wide enough to use every deflate distance code;sim_diff.py: per-object timeouts, in CI.staged_resourcesnow counts allocations per thread, so a test harness's own allocation can no longer fail it.Checked locally on macOS arm64:
cargo deny;pack_verify.py(891 checks);The forge CI runs on this pull request.
🤖 Generated with Claude Code
The new max_ms check bounded nothing, because a policy could set max_ms up to 2^53 − 1. A still's piece could then state 2^32 − 1 frames. Rust hashed once per stated frame (about 29 minutes), and Python built a list of n references (about 34 GB). - **§3.4 item 5 and §4.4.** max_ms is at most 600000, and at most 2^24 units on every component's timebase. Both are policy-piece-bounds, in both readers. §4.4 gives the reason: a verifier takes a piece whole, so the longest piece bounds its work. Ten minutes is far past any piece a delivery cuts, and 2^24 units bounds the work on any timebase, which may have up to 2^32 − 1 units a second. - **§11.3, before any frame is decoded.** Each piece's floor object, where its framing reads, must hold one unit per frame of its piece (floor-object-mismatch). Both verifiers make this check first. - **Held stills.** Python holds a still's frame and its count (Held) and hashes the digest a block at a time. Rust's held_digest also feeds a block at a time. - **Corpus.** - refusals: max_ms 600001; and the default max_ms on a timebase of 2^32 − 1 units a second. - policy/max-piece.toml: accepted at both bounds. - staged-mutations max-ms-past-cap (policy-piece-bounds). - staged-mutations still-at-cap: the still given the longest piece the policy allows, its manifest naming the frames, refused by the floor count in both verifiers. - **policy_diff.** Its random policies now reach both bounds. Co-Authored-By: Claude Opus 5.5 <[email protected]>The union-no-layer patch was written against the described() that this branch rewrote in round 2 (a repeated object described once, a layer joining every occurrence of its base), so CI could not apply it ("patch failed: codecs.rs:326"). It is regenerated from the branch's codecs.rs, still a plain patch file: the layer joins no alt. Its must-fail list adds the two cases that pin the repeated-object rule: union_O10_repeated_layer_after_first and union_O10_repeated_layer_after_second. With the patch applied, verify fails all three and two multivariant playlists. The receipt-surrogates mutation is left to #200's sharded runner, which owns it. Co-Authored-By: Claude Opus 5.5 <[email protected]>wai generateandwai score build|render, with native pins a sink checks against a220d16a48Form v0 names the model inside the payload by the SHA-256 of one file, and SPEC §5 never said how that relates to §3.1's parameter-set pin, which governs every GenerativeDeterministic capability: whether a generate envelope carries a pin, or which wins when a pin and `model` disagree. The library registers the set as several files, so a form-less pin over the very file `model` names would be refused form_required. SPEC §5 now states the relation: the model file is the parameter set and `model` its identity; an envelope that names the generator carries no `prior` and a sink refuses one that does, whatever it names. §3.1 says so beside the pin rules, the non-conforming list names it, and prior-carriage §7's row says the set is never pinned and names the file. No library source changes. `wai inspect` and `wai unwrap` reported a generate envelope with a corrupt payload as conforming ("component roles ✓", no payload line). They now report the payload (form v0, with the reader's reason), the intent and any pin of every envelope or WAI2 component that names the generator, ✓ or ✗; inspect's verdict says the envelope does not conform. inspect_and_unwrap_report_the_generators_envelope covers a prompt byte changed in place, the intent improve, a pin over the model file itself, and a WAI2 component with and without a pin. Co-Authored-By: Claude Opus 5.5 <[email protected]>