wai: bearer-receipts §13, reconciliations and holdings records over a return path of a few bytes #637
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/compact-return-profile"
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
The compact return profile (bearer-receipts §13) is a binary form of a reconciliation (§5) and of a holdings record (holdings §4), for a return path whose messages hold few bytes, with fragments for messages longer than a frame.
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,
f0dc0b8d6: the change ofwai/compact-return-profile(98192fe63..9a8353be8) in #632's layout. Its message lists the source commits. The branch's changelog entry is a file ofwai/changes/. Its edits towai-conformance.ymlare a new step file,.github/wai-conformance/verifiers/compact-return-profile.sh, at order 535. It names the featuresbearer_receipts,holdings, which also puts that list into the features-alone check, and the pathwai/extensions/bearer-receipts.md, with the reason the branch gave for it. Every other file is as the source branch has it.What it defines
References, not copies. A compact record names by reference what the receiver already holds:
bearer_id;It writes integers in LEB128 and
issued_atas seconds. A reference that resolves to no value, or to more than one, is refused, never resolved by choosing. A whole reconciliation carries no bitmap, and its root is the group's. A partial one carries its bitmap, and its root is derived from the object receipts the receiver holds.Exact both ways. A compact record expands, against the receiver's context, to the record's own bytes: a claim's canonical form, or a holdings record's
WHD1. Those bytes are then verified by their own text, under the signature the compact record carried, so the compact form states nothing of its own. A record has one compact form against a context. A record with none is refusedcompact_not_encodableand travels in its own form. That covers:issued_atwith a fraction or an offset;leaf_countthat is not the group's;Nothing is sized by a claim's own
leaf_countbefore it is found to be the group's.Fragments. A message is the compact record and a 4-byte check, the first bytes of SHA-256 over the record, cut into frames under a 3-byte header: the sender's number for the message, the index and the count. Reassembly places fragments by index, in any order of arrival, and holds a fragment delivered twice, byte for byte, once. It refuses a fragment that is malformed, foreign (another number or count), repeated (other data at its index) or missing. By the check, it also refuses one reordered or mixed in under the same header.
DAP reports are never fragmented. A task's floor is the length of its longest report. A path whose frame is below it carries none of the task's reports; a sink holds them, or gives them to a node with a path that carries them, which uploads them unchanged. The floors of telemetry-aggregation's measures 1 to 4 are stated and checked against the reports of its corpus.
Beside it. jwp-receipts §2.7 and holdings §1 point to the profile.
The reference and the independent verifier
The reference. The
compact_returnmodule ofwai-rs(featuresbearer_receiptsandholdings). Its unit tests cover a uint's one spelling, an instant's, the whole bitmap, a message reassembled in any order with each defect refused, and the bounds.tests/compact_return.rschecks that:vectors.jsonregenerates byte for byte from its fixed seeds, and no other file is there;wai-rsgives every case its stated outcome, with every round trip holding both ways;The corpus.
live-conformance/compact-return/holds:signer_ids;The independent verifier.
live-conformance/compact_return_verify.pyis written from the extension's text and shares no code withwai-rs. It uses other corpora's second implementations:jwp_verify.pyfor groups and objects,claim_verify.pyfor claims,bearer_verify.pyfor §5.3,holdings_verify.pyfor holdings records andtelemetry_aggregate_verify.pyfor DAP reports. It writes the references, the compact records, their expansion and writing, the fragments and reassembly itself. It checks the floors against telemetry-aggregation's table and corpus. It requires every mutated copy of the corpus to fail, and drops each of its own checks in turn.How it was verified
This commit,
f0dc0b8d6.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. Rebasing from the conversion's first base, #632's earlier tip 14f1abb7c, onto946f3bedaleft every file's change the same.wai/wai-rs,cargo check --locked --no-default-features --testswithbearer_receipts,holdings, and withbearer_receipts,holdings,telemetry_aggregate. Both 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
tests/cli_studio.rs failed on every run on one macOS runner and passed on every other runner, 3 of 3 against 19 of 19 on 5 November, with "the room service's clock on the relay: not within 30 s". The stand-in room service starts an HTTPServer, whose server_bind calls socket.getfqdn before the server listens. On that host, under the runner's Python 3.15.2, getfqdn("127.0.0.1") takes 35 s, past the 30 s wai dev waits, and a stack dump of the stalled stand-in shows it there. The stand-in relay opens a plain socket and answers in 0.1 s. Nothing here reads the name, so the fixture no longer asks for it. On that host and Python the room stand-in took 35.5 s and now takes 0.12 s. A socket.getfqdn planted to stall for 40 s fails the test without this change, with the same message, and passes with it. Changelog: none Co-Authored-By: Claude Opus 5.5 <[email protected]>