open-standards/wai/extensions/provenance.md
Transaction Science d009db9087
Some checks failed
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m48s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m17s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m16s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m7s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m29s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 22s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m7s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 22s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 42s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 39s
wai formal verification (integer core) / kani (pull_request) Successful in 4m59s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 52s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m7s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 6m49s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 24s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m28s
standards workspaces build + test / aac-rs (pull_request) Successful in 3m25s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 3m46s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m22s
standards workspaces build + test / map-rs (pull_request) Successful in 2m16s
standards workspaces build + test / mesh-rs (pull_request) Successful in 2m3s
standards workspaces build + test / openpay (pull_request) Successful in 18m29s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 1m58s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Failing after 7s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Failing after 7s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Failing after 8s
standards workspaces build + test / arl-rs (pull_request) Successful in 3m49s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 3m19s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m45s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 3m17s
standards workspaces build + test / sense-rs (pull_request) Successful in 4m0s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 3m42s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 27s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m43s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 28s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m14s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · windows (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · windows (pull_request) Has been cancelled
wai: on-chip counters and calibrated instruments are separate energy classes, and every joule-carrying receipt can say which
The single `HwShunt` acquisition class covered both an on-chip vendor
counter (RAPL, NVML, SMC, IOReport) and an external calibrated shunt. They
are different evidence: a calibrated instrument's uncertainty is traceable to
a calibration, while a counter is a vendor's reading whose error the vendor
states (RAPL readings are deliberately noised when SGX or TDX is enabled,
per security advisory INTEL-SA-00389).

- extensions/energy-measurement.md §2 splits hardware evidence into
  `OnChipCounter` and `CalibratedInstrument`, each with a required declared
  uncertainty (relative error and integration window). IOReport is an
  on-chip counter, like RAPL and NVML. `HwShunt` stays readable as the legacy
  class, ranked below both, and is not sealed into a new WAI receipt.
- Every receipt family that carries joules — video, world, film, reel,
  haptic, score, splat4d, audio scene, ternary, provenance and the wai-quantum
  receipts — can carry its class. The label is additive: every committed
  signed vector still verifies, and the signed bytes of unlabelled and
  legacy-labelled receipts are pinned by tests. A sealed figure declares its
  1 µJ resolution, and the floor is stated as the rule verified (0.5/√3 µJ).
- The acquisition rules are scoped to the receipt profiles WAI defines, and
  the text says what enforces each one.
- Meters open their window from rest, report an all-zero power reader as
  unusable rather than clean, and state the running-window count model as
  conservative.
- oer-receipts.md maps OER's evidential grade onto the refined classes. The
  rule that a producer must not grade `measured` a figure whose class is
  `Estimator` is kept as settled on main.
- wai-quantum verifies a receipt in either form on every in-tree verify
  path, including wai-quantum-serve's POST /verify.
- CI: wai-energy-receipts.yml runs the energy-class, label and legacy-pin
  tests for wai-rs, wai-quantum and wai-quantum-serve, which no workflow
  enabled before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 01:27:37 -04:00

4.6 KiB

WAI Extension: Asset Provenance

Status: Draft. Lever 4 — content-addressing + receipts + measured energy for content that cannot be reduced to instructions. WAI does not reconstruct the asset; it carries the opaque bytes and a signed, energy-accounted lineage. Conformance is content-hash-equivalence (recompute, compare) + signature validity. Reference impl: the provenance feature of wai-rs; tooling: wai_prov; live sink: wai.transaction.science/provenance. Keywords MUST, MUST NOT, SHOULD, MAY are RFC 2119/8174.

1. Scope and model

A wai.asset.provenance object is not a content capability — it is a JWP receipt profile about a carried asset, the way jwp-receipts is. The asset itself declares an ordinary capability (wai.image.jpeg, wai.audio.flac, …) and WAI carries it unchanged; the provenance receipt adds three things the carried bytes do not have on their own:

  1. Tamper-evidence — the asset is content-addressed (asset_content_hash, BLAKE3 over the complete WAI envelope); a verifier recomputes it and compares.
  2. Lineage — an ordered chain of processing steps, each binding its input and output content hashes, signed as one group.
  3. Energy accounting — each step carries its measured/declared microjoules; the receipt totals them.

This is the "verifies whatever it carries" half of the thesis, for the content the reconstruct half cannot touch. WAI never decodes the asset — a sink hands the bytes to whatever native element renders that media.

In scope: the step model, the AssetReceipt group, the verification obligations. Out of scope: a transport; a capture device; the asset's own codec (it is opaque here).

2. The step

A ProvStep is one transformation in the asset's lineage:

field meaning
op operation, e.g. "origin.synthesize", "encode.jpeg", "derive.thumbnail"
input_hash content hash of the input (all-zero for an originating step)
output_hash content hash of the output
work exact deterministic work (pixels, samples)
joules_micro measured/carried microjoules (0 = unmetered)

Step content hash: BLAKE3("wai:prov-step\x01" || op_len | op | input | output | work | joules).

3. The receipt (AssetReceipt)

A JWP group: the asset's content hash is the identity, the per-step hashes are the Merkle leaves (JWP's exact moq-jwp:merkle-{leaf,node} domains), and one Ed25519 signature covers a profile payload carrying the asset hash, the declared media + capability, the Merkle root, the step chain, and the total joules. It chains across edits via parent_receipt_hash, like the worlds / audio / haptic / splat receipts.

4. Conformance

A conforming verifier MUST: (a) recompute the asset's content hash and require it equal the receipt's asset_hash; (b) require the step chain be linked — each step's input_hash equals the previous step's output_hash, and the final output_hash equals asset_hash; (c) recompute the Merkle root from the step hashes; (d) verify the Ed25519 signature. A failure at any point is a failure — the asset is reported unverified, never "probably fine".

There is no tolerance parameter: the content hash matches or it does not.

5. Energy is measured, never invented

joules_micro per step is carried from a meter, exactly as the other receipts carry it: wai_prov measures the real CPU energy of each encode (IOReport via macmon, no sudo) and signs the figure. An unmetered step carries 0. The receipt never derives energy it did not measure.

Each step's figure carries its acquisition class as an optional label (energy-measurement §2.8), because the steps of one lineage can be metered by different parties in different ways. A labelled step binds its class into its leaf hash; a step with no label keeps its legacy leaf and its figure is unlabelled. wai_prov labels each encode it measures OnChipCounter, with its declared uncertainty, and records an encode whose measurement fails the §4 ratio as unmetered. total_joules_micro carries no class of its own.

Appendix

The reconstruct classes prove WAI can ship a world, a sound, a body, a volume as instructions and have every sink rebuild them identically. Provenance proves the complement: for the photograph that is just a photograph, WAI still adds something a bare file cannot — a tamper-evident identity, a signed lineage, and an honest energy ledger — without ever pretending to understand the pixels. Carries whatever it can reconstruct; verifies whatever it carries.