open-standards/sandbox/sandbox-rs/crates/sandbox-meter
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
..
examples tooling: meter-cmd (energy bracket) + gen-fixture (review fixtures) 2026-06-12 07:04:06 -04:00
src joule-ui + sandbox: honest energy provenance in the metered interaction 2026-06-12 23:02:31 -04:00
Cargo.toml sandbox-meter: per-process energy attribution — the machine-wide fix 2026-06-11 08:59:25 -04:00