specs: a vendor counter is a hardware reading only while it is demonstrably live #119

Merged
dcharlot merged 5 commits from energy/liveness-must-specs into main 2026-10-01 05:51:28 -04:00

2026-10-01

Transaction Science
l3-jouleclaw README: leave the example's energy text to #117
All checks were successful
smart-byte conformance gate / Validate conformance JSON files (pull_request) Successful in 4s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 1m56s
smart-byte conformance gate / Second implementation reproduces every vector (pull_request) Successful in 4s
smart-byte conformance gate / Spec changes require vector-pack updates (pull_request) Successful in 3s
smart-byte conformance gate / VERSIONS.md and README.md must exist (pull_request) Successful in 3s
standards workspaces build + test / aac-rs (pull_request) Successful in 1m2s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m30s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 42s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 42s
standards workspaces build + test / map-rs (pull_request) Successful in 31s
standards workspaces build + test / mesh-rs (pull_request) Successful in 27s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m51s
standards workspaces build + test / openpay (pull_request) Successful in 1m28s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m22s
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 3m8s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m10s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m37s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m37s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m36s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m36s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 2m9s
#117 rewrites this paragraph to say which counter the example reads on
each host and when its figure is measured. That already states the
liveness rule in full. This PR's edit of the same lines made the two
PRs conflict, whichever merged second. Drop it, so the two merge in
either order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 01:22:30 -04:00
Transaction Science
smart-byte: record the §8.6 liveness change as editorial
Some checks failed
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 1m42s
standards workspaces build + test / aac-rs (pull_request) Successful in 56s
smart-byte conformance gate / Validate conformance JSON files (pull_request) Successful in 4s
smart-byte conformance gate / Second implementation reproduces every vector (pull_request) Successful in 4s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 36s
smart-byte conformance gate / Spec changes require vector-pack updates (pull_request) Successful in 4s
smart-byte conformance gate / VERSIONS.md and README.md must exist (pull_request) Successful in 3s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 34s
standards workspaces build + test / map-rs (pull_request) Successful in 32s
standards workspaces build + test / mesh-rs (pull_request) Successful in 26s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m28s
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 1m0s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / openpay (pull_request) Successful in 1m35s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m53s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m18s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m16s
standards workspaces build + test / arl-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (pull_request) Has been cancelled
The spec/vector coupling gate failed #119: it changes
smart-byte/spec/ (treatise §8.6) without touching
smart-byte/conformance/. The change is editorial for the pack. It
narrows when a node may report a non-zero measured_microjoules, but
leaves the field, its encoding and every vector unchanged. Record that
in regeneration.md, as the gate asks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 01:10:52 -04:00
Transaction Science
mesh: §3 grades a vendor counter HwShunt only while it is live
Adds the shared liveness MUST to mesh SPEC §3, where Energy's provenance
coupling is defined. mesh/1 has no coverage field, so the section also
says a figure from a counter that does not cover the whole request, such
as a GPU counter on a host with no CPU counter, MUST NOT be graded HwShunt.
Text only. No vector changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 01:10:36 -04:00
Transaction Science
map-receipt: HwShunt's doc says a vendor counter counts only while live
The doc comment on Provenance::HwShunt still read "RAPL/SMC/shunt", with no
liveness condition. The map spec in the previous commit now says a counter
counts only while it is demonstrably live (receipt.md §2). This brings the
doc comment into line. Doc comment only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 01:10:36 -04:00
Transaction Science
specs: a vendor counter is a hardware reading only while it is demonstrably live
The monorepo's IOReport energy backends now decline unless the CPU energy
rail keeps advancing: on macOS 27 an unprivileged reader sees the CPU rails
frozen or republished only in rare lumps, so a meter that trusted a present
counter reported CPU work as GPU-only energy, or as zero, while tagging it a
reading. The owner's decision is that a vendor energy counter is a real
reading (the trust gap is provenance, not accuracy), so a LIVE reading is
graded as a hardware reading, and every spec that grades vendor counters now
carries the same rule:

  A reading from a vendor energy counter (RAPL, NVML, Apple IOReport, ...)
  MAY be graded as a hardware reading only while the counter is demonstrably
  live for the domain the figure claims: the implementation MUST have
  observed the counter covering that domain advance under load (for Apple
  IOReport: the CPU energy rail itself advancing in at least 5 sample
  intervals, in at least 4 of every 5, over at least 300 ms while the probing
  thread burns CPU). A counter that is present but not live - frozen, or
  republished in lumps - MUST NOT produce a hardware-graded figure; the
  implementation falls back to its estimator or reports the work unmetered,
  and SHOULD record why. A figure MUST NOT claim coverage of a domain its
  counter does not read; where the format has a coverage field, such a
  figure is Partial.

Joule Code
- spec/receipt.md §2 (REQUIRED): HwShunt now reads "an external shunt, or a
  vendor energy counter (RAPL, NVML, Apple SMC/IOReport) while that counter
  is live"; the rule above is added verbatim, and in this receipt the
  hardware grade is a present measured_uj and the HwShunt tag, so a counter
  that is not live supplies neither. The §1 comment and §5 say "live".
- SPEC.md §6: the provenance definition now names IOReport and NVML beside
  RAPL/SMC, measured_uj comes only from an interface live for the domain it
  claims, and a paragraph states the MAY/MUST NOT, pointing to receipt.md §2
  for the test. The §9 readiness row says "live" and "not live".
- ROADMAP.md v0.2 "Measured energy": a vendor counter feeds the HwShunt path
  only while live; where it is present but not live (IOReport's CPU rails to
  an unprivileged reader on macOS 27) the receipt stays on the estimator.
- examples/l3-jouleclaw/README.md: the claim that the receipt is "a real
  local measurement ... (HwShunt on RAPL/NVML hosts; Estimator on Apple
  Silicon until IOReport is wired)" was wrong both ways: run.rs wires only
  Apple Silicon's counter, and other hosts fall to the token Estimator. It
  now says so, that the counter's own tag is carried, and that HwShunt needs
  a live counter.
- joule-code-receipt: the Provenance::HwShunt doc comment says the same.
- CHANGELOG.md [Unreleased] ### Changed: the rule; no wire or vector change.

Sense
- SPEC.md §7 (REQUIRED): measured_uj comes only from a live interface; the
  rule is added verbatim. The Sandbox PowerMeter was described as "(real
  RAPL/IOReport)"; it is now described as grading a reading HwShunt only
  while its counter is live and falling back to its estimator otherwise,
  which is what origin/sandbox-meter/cpu-rail-liveness implements. §10's
  Sandbox edge says the same in brief.
- sense-schema: the HwShunt, Energy and Energy::measured doc comments say a
  vendor counter is a hardware reading only while live.
- Sense keeps no CHANGELOG, so none is added.

Other specs that grade vendor counters
- map/spec/receipt.md §2: the HwShunt row read "RAPL/SMC/shunt"; it now
  names a counter "while it is live", and the rule is added verbatim, noting
  that Receipt::seal cannot check liveness (the meter's duty, upstream).
  map/SPEC.md §6 states the MUST NOT and points there. CHANGELOG.md gains an
  [Unreleased] ### Changed entry; no wire or vector change.
- arl/ARL-S.md, Telemetry: physical telemetry is what gates tiers above 0,
  and it said energy is "measured directly via RAPL ... NVML". The rule is
  added in ARL-S's own terms and lower-case keywords (ARL uses no RFC 2119
  capitals): a counter that is not live does not produce physical telemetry,
  the energy it would have covered is reported unmetered, and the Supervisor
  must have observed the counter advance. No version bump.
- smart-byte treatise §8.6: "Where RAPL or equivalent hardware energy
  counters are available, the measurement is read from the hardware" now
  requires the counter to be demonstrably live, and a frozen or lump-
  republished counter yields the same honest zero as an absent one.

Text and doc comments only: no code path, wire format, or conformance
vector changes. joule-code-rs (joule-code-receipt, joule-code-conformance)
and sense-rs (sense-schema, sense-conformance) build and test clean, their
rustdoc builds under -D warnings, map-rs (map-receipt, map-conformance)
tests pass, `joule-code-conformance verify ../conformance/v1` passes
24/0/0, the no-vanity-metrics check passes, and every relative link in the
changed Markdown resolves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 01:10:36 -04:00