open-standards/wai/live-conformance/peer-delivery/README.md
Transaction Science 71676f8457
All checks were successful
wai-app and Create / wai-app · does this change touch it (push) Successful in 21s
joule-moq-remote host agent / joule-moq-remote · does this change touch it (push) Successful in 22s
wai-audit collector and player integration / does this change touch it (push) Successful in 21s
joule-moq-web browser client / joule-moq-web · does this change touch it (push) Successful in 12s
WAI operation catalogue / does this change touch it (push) Successful in 20s
wai-fleet service / does this change touch it (push) Successful in 26s
joule-moq-room room service / joule-moq-room · does this change touch it (push) Successful in 36s
wai-key-proxy / does this change touch it (push) Successful in 32s
wai-ledger service / does this change touch it (push) Successful in 36s
wai-sink-android native sink library / does this change touch it (push) Successful in 41s
wai-quantum for JavaScript / does this change touch it (push) Successful in 43s
wai-quantum studio and desktop / does this change touch it (push) Successful in 42s
wai-sink-swift native sink package / does this change touch it (push) Successful in 32s
WAI Studio / does this change touch it (push) Successful in 1m26s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (push) Successful in 3m9s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 4m33s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 4m25s
joule-moq-room room service / joule-moq-room, every target (push) Successful in 7m26s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 9s
wai-quantum energy-landscape jobs / does this change touch it (push) Successful in 8s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (push) Successful in 55s
wai-key-proxy / proxy · linux (push) Successful in 1m39s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 58s
wai-fleet service / service · linux (push) Successful in 2m23s
wai-audit collector and player integration / collector · linux (push) Successful in 4m16s
wai-ledger service / service · linux (push) Successful in 4m44s
wai-quantum for JavaScript / javascript · linux (push) Successful in 6m3s
wai-quantum studio and desktop / studio · browser (push) Successful in 6m52s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 11m4s
wai-quantum energy-landscape jobs / the same bits · linux-arm64 (push) Successful in 12m34s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 13m8s
WAI Studio / Studio in WebKit · linux (push) Successful in 21m51s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Successful in 3m17s
wai-quantum energy-landscape jobs / native against WebAssembly, over many seeds (push) Successful in 4m57s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 5m41s
wai-quantum energy-landscape jobs / reader, kernels, answers and the stated result · linux, release (push) Successful in 8m57s
wai-quantum energy-landscape jobs / the module under wasm32-wasip2 (wasmtime) (push) Successful in 20m35s
wai-quantum studio and desktop / desktop app · windows (push) Successful in 9m58s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (push) Successful in 1m17s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 2m13s
wai-fleet service / service · macos (push) Successful in 50s
wai-ledger service / service · macos (push) Successful in 1m12s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (push) Successful in 7m48s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 4m7s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 6m40s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (push) Successful in 14m55s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 10m22s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 15m8s
wai-quantum energy-landscape jobs / the same bits · macos (push) Successful in 7m7s
Peer delivery: a sink fetches objects from the neighbours that hold them, verified and acknowledged
Holdings said who holds what; nothing fetched from them. extensions/peer-delivery.md is the
exchange, over records WAI already had: a neighbour's holdings record says where to ask, the
publisher's receipts say what the answer must be, and the asker's settlement acknowledgement
says what was served. It registers no capability and no record, and is in the delivery profile.

Joining is the sink's choice: asking a peer and serving one are each off unless the operator's
policy and the viewer's setting both allow it, and the setting is off until the person using
the sink turns it on. The exchange is eight frames over a link that keeps message boundaries (a
data channel among them) and three HTTP requests for a neighbour reached that way.

Peers are not trusted. An asker asks only for an object whose object receipt it holds, never
names to a holder an object that holder has not listed, and takes nothing before the bytes
verify. A holder that served other bytes is asked nothing more (peer_bytes_refused); a record
that listed what its holder then said it lacks is set aside (holdings_overstated); a record that
misstates a group's size was already refused whole. The asker signs one acknowledgement a holder
a window for exactly what it verified, of class 2 with no grant, and the holder checks it
against what it served. That settles what cache-authority §9 left open. §9 of the new text says
what a peer learns of a viewer: an address, which of the objects it listed were asked for and
when, and a session key where the asker acknowledges; and nothing else.

wai-rs: feature peer_delivery (the gate, the frames, the asker, a holder's answer and its check
of an acknowledgement), the corpus live-conformance/peer-delivery/ (92 cases) and its second
implementation peer_delivery_verify.py, which rebuilds every acknowledgement byte for byte:
92 cases agree, 18 of 18 mutated copies and 22 of 22 weakened verifiers caught.

wai-web: the peer bundle (src/peer.rs) and peer/: the client over data channels and fetch,
objects kept in the Cache API, and two runs with faults planted on the holders' side. Under
node, 33 checks (wai-web-wasm.yml runs it and has the Python verifier recompute the session
from its signed acknowledgements). In a browser, 23 checks over seven pages: altered bytes
refused and never acknowledged, an overstating record never asked, a peer that lists what it
lacks set aside, and pages whose setting is off opening no connection.

Co-Authored-By: Claude <[email protected]>
2026-11-10 18:21:55 -05:00

49 lines
3.3 KiB
Markdown

# live-conformance/peer-delivery — objects from the neighbours that hold them
The corpus of [`extensions/peer-delivery.md`](../../extensions/peer-delivery.md) §10, in one
file, `vectors.json`.
**Provenance.** Generated here by `wai_peer_delivery_vectors gen` (`wai-rs`, feature
`peer_delivery`), from Ed25519 keys on fixed 32-byte seeds, constant instants, and envelopes
whose payloads are opaque test bytes written by the generator; no media and no input from
outside this repository.
`keys` names every key by its role, as 64 lowercase hexadecimal digits: the publisher's
(`did:web:publisher.example#d1`), five holders' (`h1` to `h5`) and the asker's.
- `world.groups` are two groups: each its `link` hash, its group `receipt`, and its `objects`,
each an object `receipt` and the `envelope` in hexadecimal. The first has six objects; the
second three, its second past one `data` frame.
- `frames` (§4.2) are each a message's `bytes` and its `outcome`: `read`, with the frame's name
and fields; or `refuse` and its `reason`.
- `transfers` (§4.4) are each what was `asked`, the asker's `max_object_bytes`, the `head` and
the lengths of the `data` frames that follow; `outcome` is `complete` or the reason.
- `gates` (§3) are each a `policy` and a `setting`; `outcome` says whether the sink may `ask`
and may `serve`.
- `sessions` (§5, §6.1) are each an asker's session: its test `asker_seed`, the `policy` and
`setting`, the `groups` and `objects` (by index into the world) whose receipts it holds, what
each holder's link answers for an object (`links`, by holder key and `<group>/<index>`:
`serve` the object named, `bytes` given, or `miss` with its code; a link with no answer
failed), and `rounds`, each the records offered before it, its instant, the `wanted` objects
and its `window`. `outcome.rounds` gives, for each round, the records' labels, each wanted
object's `route`, `attempts` and source (`from`: a holder's key, or `origin`), and the
acknowledgements signed, each its `upstream`, `record` and `items`; `outcome.asks` counts the
objects each holder was asked for, and `outcome.records` gives the labels after the last
round.
- `answers` (§4.3) are each a holder's record, an object and whether it is permitted and holds
the bytes; `outcome` is `serve` or `miss code=…`.
- `acks` (§6.3) are each a holder (`me`), the item list of what it `served` over a link, and an
acknowledgement `record` with its `items`; `outcome` is `taken` with what the record states,
or `refuse` and its `reason`.
Everything is synthetic: keys attest nothing, and the publisher's origin is a reserved example
domain. Each case states the outcome it was written to have, declared in the generator: a
session's attempts, sources and labels are written out by hand there, and its acknowledgements
are sealed from the objects the case says each holder served, never copied from the client.
`wai_peer_delivery_vectors verify` and `tests/peer_delivery.rs` check that the file regenerates
byte for byte and that `wai-rs` reaches every stated outcome. `../peer_delivery_verify.py` is
the second implementation, written from the extension's text, which rebuilds every
acknowledgement byte for byte, mutates copies of the corpus and drops each of its own checks in
turn and requires each to be caught. The page client's runs over this world are
[`wai-web/peer/`](../../wai-web/peer/).