jouleclaw-energy: advance the scripted RAPL tree in step with the probe #228
Merged
dcharlot
merged 1 commit from 2026-10-13 01:02:51 -04:00
fix/rapl-probe-test-in-step into main 2026-10-12
jouleclaw-energy: advance the scripted RAPL tree in step with the probe
All checks were successful
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Successful in 40s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 3m12s
standards workspaces build + test / aac-rs (pull_request) Successful in 2m57s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m23s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 55s
standards workspaces build + test / map-rs (pull_request) Successful in 56s
standards workspaces build + test / mesh-rs (pull_request) Successful in 53s
standards workspaces build + test / openpay (pull_request) Successful in 2m39s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 43s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m4s
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 1m8s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m18s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m3s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m38s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m12s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m13s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m19s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m19s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m25s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 4m3s
`the_production_probe_needs_every_package_to_keep_advancing` drove a fake two-socket tree from a writer thread on a 2 ms timer and expected the production probe to call it live inside one budget. On a loaded host the writer is starved, the samples stop changing, and the probe rightly judges the scripted tree frozen, so the test failed on load rather than on behaviour. The probe now has a `probe_stepping` form that runs a closure at the start of every tick, ahead of the burn. The real probe passes nothing. The test advances the tree there, so each interval the probe samples holds one advance however threads are scheduled, and no second thread exists. The timing claim is also restated as what a loaded host leaves certain: a live verdict comes no sooner than the rule's window and inside the probe's own cap, and a frozen verdict takes at least one budget. Verified on the Linux x86_64 host with `--features rapl,nvml`: the lib tests pass idle, and the RAPL tests pass on every one of 25 repeats under 40 busy loops. Co-Authored-By: Claude Opus 5.5 <[email protected]>