wai: parameter sets — where a set is fetched, a successor coded against its predecessor, when a set is worth holding, who may read it, and a set verified piece by piece #638
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/prior-carriage-spec"
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
Rules for carrying a parameter set (a prior) to a sink, in http-delivery and prior-carriage:
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,
6c8eb07af: the change ofwai/prior-carriage-spec(98192fe63..26834bb4c) in #632's layout. Its message lists the source commits. Compared with the source branch:wai/changes/;wai-conformance.ymlare a new step file,.github/wai-conformance/verifiers/prior-carriage.sh, at order 335, with the featureprior_carriage;wai/.gitattributesline sits just before the integer-payload block, and its row of the corpus table inwai/live-conformance/README.mdsits beside the upscale row, instead of at the end of each.Every other file is as the source branch has it.
What it defines
Set roots (http-delivery §8.5, §8.7). A set is served at
<root><sha256>below a set root, an absolutehttpsURI whose path ends in/. §8.5 named the place<base>/<sha256>and never said what<base>was; the word also collided with §2's term Base. An origin serves its sets below/.well-known/wai-sets/, so a sink that holds an object can always name where to ask.Location hints. A
wai_priorsentry's memberlocations(moq-streaming-format §4.2) lists roots to ask, read in order, at most eight. So does a WAI multivariant playlist's oneEXT-X-SESSION-DATAline ofDATA-IDscience.transaction.wai.sets. An element that holds no root is passed over (set_location_malformed) and never refuses a track. A sink asks, each once:It holds a response's bytes only when their SHA-256 is the digest it asked for, and otherwise asks the next root. The pin stays identity-only: no member of a pin is read as a location. prior-carriage §15 says where a set is fetched and why the pin carries no location.
Sets as compression dictionaries (http-delivery §8.8, prior-carriage §16). RFC 9842's
Available-Dictionarynames a dictionary by its SHA-256, which is the digest a pin states for a set in a one-file form, so a held set is a dictionary under its own name. A server may offer a set as one, and answer a request that names a held set with the requested set coded against it,dczordcb.A client checks, in order:
dictionary_unrequested);dictionary_coding_malformed);dictionary_mismatch);dictionary_window_too_large);It then holds the decoded bytes only by the pin's digest. A refused coded response sends it to the same root again, without a dictionary. The coded bytes are a transfer and never a form: no pin names them. Caches store a coded response under its
Varyand never code a set themselves. The reference decodesdcz.When a set is worth holding (prior-carriage §17). The break-even rule that exact-upscale §5 stated for per-title priors is now prior-carriage's, for every set, and exact-upscale §5 points to it. A generation's saving to a sink, over the titles it is expected to fetch within a stated span, must exceed its cost to that sink. That cost is nothing when the sink holds the set, the coded bytes of §16 when it holds the predecessor, and the set's bytes otherwise. The cost is charged per sink, never divided among the sinks a publisher serves. A sink holds at most a stated number of generations, the largest net first and, at an equal net, the later. Every other title takes its classical rendition. A re-tuned set begins the next catalog epoch as a new generation whose pin names its predecessor in
supersedes. A plan that does not read is refused (plan_malformed).Usage, access and leakage (prior-carriage §18).
wai-set-usage) gives an SPDX licence expression, a terms URI, whether the set was fitted to content, whether a holder may serve it to others, and an ai-usage statement. It is bound to a set only inside the bytes its pin covers.wai.prior.sealed(WSK1), are registered: a one-file set under AES-128 in counter mode, its key named by a 16-byte identifier and released by its origin. The pin covers the sealed bytes, so any server may serve them. A sink without the key does not hold the set. Opened, the plaintext is checked against the SHA-256 the header states.What a sink discloses of the sets it holds (http-delivery §12.5). Sets are kept per top-level site.
held_setsis off unless it is turned on for a site, and then lists only the held sets that site's content pins, never a revoked one. Nothing is sent or named across sites,Available-Dictionaryincluded. Clearing a site's data clears its sets.SECURITY.mdno longer says these rules are not written.The chunk-tree form,
wai.prior.tree(WTR1, prior-carriage §19), registered. A head names a one-file set by its length, SHA-256 and BLAKE3 hash. It lists the BLAKE3 chaining value of each piece of 1024 · 2^g bytes, each a subtree of BLAKE3's tree over the set. The pin covers the head. The set is served under its own SHA-256 and fetched by range from any peers. Each piece is checked as it arrives; a changed piece is refused at that piece (tree_piece_mismatch) and fetched elsewhere. The whole set is then checked against its SHA-256 (tree_digest_mismatch). Its inner form may be a sealed set.The registry lists the new wire identifiers of http-delivery §8.7 and prior-carriage §18 and §19, and
wai.prior.sealedandwai.prior.treeas established exact.The reference and the independent verifier
The reference. The
prior_carriagemodule ofwai-rs. Its unit tests cover:tests/prior_carriage.rschecks that:The corpus.
live-conformance/prior-carriage/reads the priors of the prior-forms corpus and a listing of the pin corpus. It holds:generic, fetches over it, field values, and the check a stock client makes;titleandgenericsealed under a published test key with openings of each kind, and held sets per site;The independent verifier.
live-conformance/prior_carriage_verify.pyis written from the texts and shares no code withwai-rs. It decodes Zstandard with its own decoder written from RFC 8878 (_rfc8878_zstd.py), and opens sealed sets with its own AES-128 written from FIPS 197 (_fips197_aes.py). It reads ai-usage statements withai_usage_verify.py, and hashes with the corpora's shared BLAKE3. It runs the stock-tool check where the Zstandard tool is on the PATH. It requires every mutated copy of the corpus to fail, and drops each of its own checks in turn. It uses the standard library only and runs isolated (-I).How it was verified
This commit,
6c8eb07af.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.wai/CHANGELOG.md. By #632'sdry-run, the step file gives the workflow what the source branch's workflow edits gave it. The.gitattributesand README changes are the same lines, moved. That comparison was made on the conversion's first base, #632's earlier tip 14f1abb7c; rebasing onto946f3bedaleft every file's change the same.wai/wai-rs,cargo check --locked --no-default-features --testswith each ofprior_carriage,prior_wire,prior_wire,neural_intandprior_carriage,prior_wire. 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 module's tests, the corpus's regeneration and the Python verifier did not run on this commit here; their results come from this pull request's CI, in the new step.
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