wai: one-way delivery — timeliness, rung price, cache authority and impression aggregates #633
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/one-way-delivery"
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
Four WAI extensions for one-way delivery: when an object is of use and whether it was held in time (timeliness), what delivering a rung costs (rung price), who served what a node holds and on whose authority (cache authority), and ad presentations counted with no return path (impression aggregates). They come in that order, the order they build on each other.
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. The pull request ofwai/ad-consent-supply-chainis stacked on this one.What it carries. One commit,
793ed1f2d: the change ofwai/one-way-delivery(f1258784d..987625394) in #632's layout. Its message lists the source commits. Compared with the source branch:wai/changes/, each holding the text the source branch added towai/CHANGELOG.md;wai-conformance.ymlare step files of.github/wai-conformance/verifiers/:timeliness.sh,rung-price.sh,cache-authority.shandimpression-aggregates.sh, each with its feature and the extension path it reads, and the takedown step's prose edit goes intotakedown.sh;codecs/registry.rsthe new rows sit beside the rows they build on instead of at the end: the rung-price wire rows above the route-record rows,IMPRESSIONSbesideTELEMETRY_AGGREGATIONandRUNG_PRICEjust beforeROUTE_RECORD. The rows are the same; only their place changed.Every other file is as the source branch has it.
Each part gets the same supporting changes:
codecs/registry.rs, withREGISTRY.md,registry/capabilities.jsonandvocab/v2.ttlregenerated bywai registry export;features:line puts the feature intoWAI_FEATURES, the--testlist and the features-alone lists, and itspaths:line puts the extension into the workflow's trigger, through #632's derivation.Each corpus is written from fixed seeds by its generator, and none is edited by hand.
1. Timeliness (
wai.delivery.timeliness,extensions/timeliness.md)What it defines. This is a publisher's signed statement, for each object of a group, of when the object is of use. It states:
The statement is a jwp-receipts claim of class
timeliness(§2.4.17), signed by the group's key beside the group receipt, one statement for every bearer.A verifier reads holdings records, which are a holder's signed word that it held an object at an instant. From them it judges each object for each holder as a sink deciding at the deadline would present it: on time, replaced by its fallback, held only after the deadline and at what value at least, or not shown. Every instant is an upper bound on arrival, so every value is a lower bound. An asker can also plan each object from an instant it states. It goes over its sources in its own order (a carousel's passes, a neighbour's holdings, the origin) and gets the first source that is on time, the fallback, or the best late source.
The deadline is mapped onto parameters the bearers already define, and WAI defines no transport. delivery-telemetry gains the switch reason
not-held-by-deadline. A layer of a stage set has no entry and is not a fallback, because staged-delivery alone decides whether a layer is late.The reference. The
timelinessmodule ofwai-rs, with the class's body inclaim_receipt::timeliness.wai_timeliness_vectors verifyandtests/timeliness.rscheck that:wai-rsgives every case its stated outcome;The independent verifier.
live-conformance/timeliness_verify.pyis written from the extension alone and shares no code withwai-rs. It uses the JWP, claim, carousel and holdings corpora's second implementations for what those texts define. It writes the rest itself: the checks against the group, the value function, the judging and the planning. It reads the reason codes and outcomes from the text. It requires every mutated copy of the corpus to fail. It drops each of its own checks in turn and requires the corpus to catch each weakened verifier. It also checks the arithmetic at its extremes directly.Beside it.
claim_verify.pyreads the new class. It also listsnot-held-by-deadline. Before, the two claim verifiers disagreed about a session that switches for that reason, and the claim corpus now holds such a session. It is appended after every other vector, and a test pins the corpus before it.http_receipts.pyholds a timeliness claim in a receipt index to its group, aswai-rsdoes. Before, it accepted one without checking.2. Rung price (
wai.delivery.rung_price,extensions/rung-price.md)What it defines. This is a seller's signed list of what it charges to deliver a rung. Each price is for:
The energy the seller states sits beside each price. A seller's latest list stands alone, and a list that lapses brings back none of the earlier ones. §2 is WAI's one definition of a region code. It lives in the ungated
regionmodule, and other extensions cite it.A comparer's request removes the options its limits remove and ranks the rest by cost or by energy per receiver. A shared transmission's cost is divided by the audience the comparer states, or by one, and never by an assumed audience. The plan states the audience at which sharing costs no more, and the neighbour order an asker of holdings takes from it. A list is a quote: a buyer is billed only at a tariff it signed, and §7 says which tariff field bills each unit.
Energy ranked by checked evidence. An earlier revision of this part ranked energy by the class a seller stated, and nothing tied the class to evidence. A seller that labelled its figure as calibrated outranked an honest model-based one, and the ranking ignored the declared uncertainty. Now:
Each candidate's evidence is then refuted, absent, outside its window, unconfirmed, or checked:
A plan names the evidence it read. §10 states that a record's age is only its room's word.
The reference. The
rung_pricemodule ofwai-rs.wai_rung_price_vectors verifyandtests/rung_price.rscheck that:Both implementations check the size bounds that no vector carries, and the evidence-text bound is tested on both sides of each of its edges.
The independent verifier.
live-conformance/rung_price_verify.pyis written from the extension alone and shares no code withwai-rs. It reads:It writes the region code, the list rules, the verdicts and the comparison itself, and requires every mutated copy of the corpus to fail. Its weakened verifiers include the defect fixed above, a stated class deciding the rank, and also key-only confirmation, each uncertainty ordering and each edge of the evidence window. The corpus holds the attack on an honest model-based figure in each of its forms.
3. Cache authority (
wai.delivery.cache,extensions/cache-authority.md)What it defines. A node's operator gives the caches and peers it runs two authorities in its key log: the role
cache/serveand the class authoritycache-transmission. Under the role, a key signs its holdings records and its declarations, and it is the upstream its receivers acknowledge. Neither authority lets the key author, transform or sign a publisher's statement.A relying party places a server key by the key-log heads it names, in jwp-receipts' three levels:
untilis refused;A placement labels a server and never changes a verdict.
The
cache-transmissionclaim (jwp-receipts §2.4.18) is a node's declaration that it sent, from what it held, objects of a group another key signed, over a multicast or unidirectional instance of its own. The claim carries a bitmap and a root under the publisher's tree, which are checked without the bytes. It is refused when the group's own key signs it, or when the instance is two-way. The bearer verdict credits a cache per instance, only for what it says it sent, and a cache's instance never makes a grouptransmitted.Held by a deadline. A relying party states a population of receiver keys for a region. The count is how many of those keys held an object by a deadline, on their own signed word: acknowledgements, counted reconciliations, or holdings records. The miss rate is in parts per million, rounded up, and every unknown is a miss. §9 derives timeliness lines from all three kinds of statement. Timeliness' own verdict still reads holdings records alone.
The reference. The
cache_authoritymodule ofwai-rs, with the class's body inclaim_receipt::bearer.wai_cache_authority_vectors verifyandtests/cache_authority.rscheck that:The independent verifier.
live-conformance/cache_authority_verify.pyis written from the extension alone and shares no code withwai-rs. It uses the JWP, claim, bearer, settlement, signer, timeliness and rung price corpora's second implementations for what those texts define. It writes the placement, the claim's checks against its group, the verdict and the count itself. It requires every mutated copy of the corpus to fail and the corpus to catch each weakened verifier, and it checks the population bound directly.claim_verify.py cache-authorityreads every claim through steps 1 to 4.Beside it.
takedown_verify.pynow does too. Before, it failed the committed takedown cases that carry such a claim.cache/serve.4. Impression aggregates (
wai.delivery.impressions,extensions/impression-aggregates.md)What it defines. This part counts ad presentations over a bearer with no return path, as measure 5,
impressions, of telemetry-aggregation. A receiver judges each shared stitched ad it presented by stitched-presentation's rules. It turns each presentation into one Prio3Histogram report of creative × region × quartile. It defines three formats:WIC1), which fixes which index is which, bound as the task's scope;WIT1), whose signer the receiver confirms under its pinned key log with the new pinned-only authorityaggregate/task, so a task key can be revoked over the bearer;WIU1), which relays forward unchanged.One-way delivery shapes the rest:
A reader verifies a receipt against its catalogue and recomputes a table of presentations and quartile counts per creative and region. The table is a lower bound on reported presentations. It is never an audience, and never billed as presented. Its totals are exact, and a receipt given twice counts as checked when either copy was. The shared changes to
telemetry_aggregatekeep every corpus they touch byte for byte.The reference. The
impression_aggregatemodule ofwai-rs.wai_impression_aggregate_vectors verifyandtests/impression_aggregate.rscheck that:The file size bounds are tested at exactly the bound and at one byte over it.
The independent verifier.
live-conformance/impression_aggregate_verify.pyis written from the extension alone and shares no code withwai-rs. It evaluates Prio3 and opens reports with the QoE corpus's second implementation. It judges claims with stitched-presentation's, verifies tokens with ad-presentation's, and confirms task-file signers with the signer corpus's. It re-runs each flow end to end:It also writes the catalogue, the files, the contribution, the plan, the settlement and the table itself.
telemetry_aggregate_verify.pynames measure 5, andstitched_presentation_verify.pycan judge through step 10. Both of those corpora verify unchanged.Across the parts
ClaimClass,ClaimBodyandReasonvariants of the two claim classes;takedown::Case::cache_transmissions;telemetry_aggregateitems the shared changes alter;WireKind::DapReportExtension.Item::with_authorityandCount::instance_receivedonly under the feature that calls each, so a build with another feature no longer warns that they are unused.How it was verified
This commit,
793ed1f2d.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 files give the workflow the same features, paths, steps and commands that the source branch's workflow edits gave it. The registry change is the same rows, reordered. That comparison was made on the conversion's first base, #632's earlier tip 14f1abb7c; rebasing onto946f3bedaleft every file's change the same.cargo check --locked --no-default-features --features <list> --testsinwai/wai-rs, for each oftimeliness,rung_price,cache_authority,impression_aggregate,bearer_receipts,carousel,takedown,telemetry_aggregate,key_discovery,route_record,stitched_presentation,http,receipt_claims, and the four new features together withtakedownandhttp. 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 source branch, at 987625394, before conversion. This ran on a Linux x86_64 build host, on a snapshot of the branch, with the toolchain
rust-toolchain.tomlpins (Rust 1.99.1, clippy 0.1.99), Python 3.11 andCARGO_BUILD_JOBS=12.cargo testlines of modules the branch does not change. Pass 3 below runs those of the modules that use one it changes, and the rest are left to CI.wai-live-web. No list warns in a file the branch changes.wai-rsunder the union of features with--all-targets, with no finding in a file the branch changes; theneural_intguard; and-D warningsforwai-key-proxy,wai-ledger,wai-audit,wai-fleet,wai-packandwai-studiocore.check-tests-in-ci,check-spec-refsandcheck-wai-section-refs, with their self-tests; the workflow-concurrency and wasmtime-pin checks;check-no-vanity-metrics.sh; the public-text self-test,check-comparative-prose.shandcheck-public-names.sh --maintainer-products-only.git statuswas empty, so every corpus that a step regenerates came out identical.wai registry export --check; the carriage, manifest-builder, CLI and corpus-provenance tests; the signer-id andwai_keys_clitests;key_logchecked for wasm32 withkey_discovery,http; the frozen-hash loop; and the HTTP corpus's differential and its shard list, aswai-http.ymlruns them.--testruns and those of every other module the branch changes; every library test under the union of features; the integration tests of the modules that use a module the branch changes; and the post-quantum signature tests.claim_verify.pyin its timeliness and cache-authority modes.with_authorityandinstance_receivedwere unused, and at 987625394 they do not.Earlier, on an arm64 build host with the toolchain pinned then (Rust 1.98.0), each of the four part tips passed the independent-verifiers job's verifier steps with the
--testand--libruns of the parts' modules, clippy with no finding in a file the part changes, and the features-alone loop for every feature that exists at that tip. The library job's command also ran at the first and the last part tips.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