### `wai.live.metering`: a room session's units and joules per hop

- **The extension** ([live-metering](extensions/live-metering.md)) registers the record
  `wai.live.metering`. Every hop that carried a room session, a relay, a compositor or an
  ingest gateway, signs one **per-hop session record**, `WMH1`: per track and direction the
  objects and bytes it carried and the objects it dropped by reason (delivery timeout,
  refused at the door, duplicate, queued at the end) with those whose receipts it
  forwarded; its subscriber sessions' time by layer class; the events it delivered; its own
  energy with the acquisition class of energy-measurement, or the unmetered marker; and the
  root of a **ledger**, one entry for each grant its sessions ran under, with that grant's
  joule and funds ceilings. Media tracks are counted one by one, events tracks and every
  other track of the room together, subscribers by layer class, so a record is at most
  552 + 180 × (*M* + 2) bytes, *M* the media tracks the room published, whatever the
  audience; a record past that is refused before it is read.
- **The room-session receipt**, `WMR1`, signed by the room authority or by a key the
  origin's key log lists with the new authority `live/meter` (and `energy/<class>` for each
  class it totals): a key-log authority rather than a grant power, since a receipt states
  every principal's consumption and a grant's powers are live-rooms' closed set. It names
  the per-hop records, the takes and the composition receipts it aggregates and states
  publisher-seconds, subscriber-seconds by layer class, composition-seconds, events sent
  and delivered and recorded-seconds (the capture each device committed while capturing),
  every hop's joules with its class, one total per class and never one across classes
  (refused `classes_summed`), and each grant's consumption: its units, a share of each
  metered hop's figure by the bytes it moved, labelled with that figure's class, its funds
  under a stated tariff, and its verdicts against its ceilings, committed by a consumption
  root and every grant past a ceiling named. A verifier recomputes every number from the
  records it names; eighteen refusal reasons.
- **QoE.** Clients' delivery-telemetry observations, as CMCD version 2 Event-mode reports,
  ride the CMCD event timeline of `draft-wilaw-moq-cmcd-event-timeline-00` (`T` the
  report's `ts`, values as strings, `sf` and the custom keys not carried), or CTA-5004-B's
  `application/cmcd` batch, whose line syntax the reports already have. Only a cell of at
  least fifty sessions enters the receipt, suppressed below that; the observations never
  leave the session and the room's service.
- **C2PA.** `c2pa_emit` (with `live_metering`) writes a receipt into a real signed manifest:
  `c2pa.environmental-sustainability` with `energy_kwh` only where one class covers the
  session whole, GHG and water only when the caller supplies them with their method, and
  always the companion `science.transaction.wai.live.metering` with the totals by class.
- **The reference relay** signs the per-hop record of a room from its session summaries
  (joule-code's CHANGELOG), and the corpus holds a record it signed in its test.
- **Reference and corpus.** `wai-rs` feature `live_metering` (`src/live_metering.rs`;
  `capture_take::find_take` exposes capture-binding §9.2 to it); `live-conformance/metering/`,
  written from fixed seeds and the relay's recorded record by `wai_live_metering_vectors`, and
  checked by `tests/live_metering.rs` and by `live-conformance/live_metering_verify.py`, a
  second implementation that shares no code with `wai-rs`, verifies rooms, takes and
  composition receipts with their corpora's own second implementations, recomputes every
  unit, total and consumption entry, and requires every mutated copy of the corpus to fail.
  The registry lists the record and the magics `WMH1` and `WMR1`.

