energy tests: a 0.1 J burn floor, tick-driven fake RAPL trees, stale trees cleared #136

Merged
dcharlot merged 2 commits from energy/burn-floor-0-1-j into main 2026-10-04 14:04:32 -04:00

2026-10-01

Transaction Science
energy tests: drive the fake RAPL trees from the probe's tick, and clear stale ones
All checks were successful
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m53s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m26s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m13s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m10s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m39s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 26s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 3m17s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 13s
WAI conformance / independent verifiers · claims, JWP and key discovery (Python) (pull_request) Successful in 2m9s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 23s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 43s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 1m5s
wai formal verification (integer core) / kani (pull_request) Successful in 4m11s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 59s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Successful in 1m6s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 45s
WAI section references / cited sections exist (pull_request) Successful in 10s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 3m43s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 1m31s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m32s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m57s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m18s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m50s
standards workspaces build + test / sense-rs (pull_request) Successful in 3m6s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m22s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 38s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 5m57s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 39s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 2m1s
sandbox-meter's the_public_package_counter_opens_only_over_live_packages
failed once in a full workspace run on a heavily loaded host, just after
a restart. It passed on its own, and in 12 of 12 runs under 24 CPU hogs
in both its old and new forms. The cause was not reproduced. Two inputs
the tests did not control could produce it, and both are removed here.

- Thread scheduling: sandbox's two liveness tests advanced the fake
  packages from a writer thread on a 2 ms timer, while the probe's tick
  slept 25 ms. A writer starved for a whole interval reads a live tree
  as Frozen. The tick now advances the zones itself, then sleeps, so
  every interval sees exactly one advance. The 300 ms window rule still
  runs on the real clock. jcp-energy's and jouleclaw-energy's
  equivalents keep their writer thread, because they test the real
  probe with its own tick.
- Leftover trees: sandbox's and jcp-energy's fake powercap roots are
  named by pid and a counter, and were built into whatever already sat
  at that path. A killed test process never drops its trees, so a later
  process reusing that pid could inherit stale zones. The root is now
  cleared first, as eoc-meter's and jouleclaw-energy's fakes already do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 23:39:16 -04:00
Transaction Science
energy tests: a 200 ms burn's floor is 0.1 J in sandbox and jouleclaw
sandbox-meter's process_energy and jouleclaw-energy's process_cpu
required 0.2 J for 200 ms of one thread's CPU. On a busy host the burn
took 1 s of wall time and read 0.171 J, and the oracle around it read
the same 0.171 J. The meter was right and the floor was wrong. What
200 ms of CPU costs depends on the core class that ran it: on an M5 Max
it read 0.18-1.24 J. jcp-energy's and eoc-meter's equivalent tests
already use 0.1 J.

The floor is now 0.1 J in both. That is also the sleeping test's
ceiling, so a counter that reads wall time at a fixed power still fails
one of the two.

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