open-standards/sandbox/sandbox-rs/crates/sandbox-meter/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 19da416cd3 joule-ui + sandbox: honest energy provenance in the metered interaction
The live host published receipts reading `measured_uj: 3300,
provenance: HwShunt` — a constant stub mislabelled as a hardware
measurement. Three fixes, root-cause first:

1. joule-ui-interaction: `Meter::provenance()` joins the trait
   (defaults `HwShunt`, `NoMeter` overrides to `Estimator`).
   `run_interaction` now tags the metered energy with the meter's
   *declared* provenance instead of inferring `HwShunt` from `Some(_)`.
   A meter cannot accidentally promote an estimate to a measurement.

2. joule-ui-serve: the live demo drops the `DemoMeter` stub for the
   real Sandbox `PowerMeter` (IOReport/RAPL), and the handler does
   intensity-scaled real CPU work — so every receipt's `HwShunt` is
   true and the joules genuinely vary with the work. No hardware ⇒
   honest `Estimator`, never a faked figure.

3. sandbox-meter: `IoReportProbe` is `Send` (CF objects, mutex-guarded
   single-thread access), so the real `PowerMeter` can live in the
   concurrent worker-pool `Host`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-12 23:02:31 -04:00
..
bin sandbox: hardware energy probes; joule-code: the verified-fix harness 2026-06-10 18:41:42 -04:00
probe joule-ui + sandbox: honest energy provenance in the metered interaction 2026-06-12 23:02:31 -04:00
contention.rs Add aac, map, sandbox standards; catalog the standards family 2026-06-07 17:04:36 -04:00
jcr1.rs Add aac, map, sandbox standards; catalog the standards family 2026-06-07 17:04:36 -04:00
lib.rs sandbox-meter: per-process energy attribution — the machine-wide fix 2026-06-11 08:59:25 -04:00