ci(standards-build): exercise the macOS energy backend, which nothing did #100
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/macos-energy-backend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
jcp-energy's IOReport meter — the Apple Silicon rung of the energy ladder — is behind#[cfg(target_os = "macos")], andjcp-rsis pinned to the linux runner. A platform-gated test plus a single-platform runner assignment is zero coverage, and it is indistinguishable from passing: the code compiles out, the suite reports green, and nothing has been measured. Same family as a feature-gated test run with no--features, withtarget_osas the gate.Not hypothetical
On 2026-09-19 the counter read 0 µJ across a full run on the dev Mac —
IoReport::open()succeeding whileread_uj()returned nothing. By 2026-09-21 it had healed with no code change in between (git log --since=2026-09-17 -- crates/jcp-energy/is empty; 8 of 8 runs now pass). Both observations came from a human running the suite by hand. CI saw neither, and could not have.That transience is the argument for the job, not against it. A permanently dead counter gets noticed once and then known. One that reads zero for a while and silently recovers means
Meter::detect()can, during such a window, select a backend measuring nothing in preference to the time×power rung below it — and then it heals, so anyone investigating afterwards finds a working counter and concludes there was never a problem. A human spot-check is worst precisely at catching that.Deliberately narrow
-p jcp-energy --libonly.jcp-rsstays on linux, so this adds the missing platform rather than trading one for the other, and costs one small crate instead of a second full workspace run. Everycfg(target_os = "macos")block in the crate lives in its lib tests, so--libreaches all of them: 8 tests, 3 of them the IOReport ones.Verified to catch the symptom, not merely to pass
Forcing
read_uj()to returnSome(0)makescumulative_advances_after_cpu_burnfail withenergy must advance: before=0 after=0— byte-identical to the 2026-09-19 observation. Probe reverted, revert checked withgit status.What this deliberately does NOT do
It does not change energy-metering semantics.
Meter::detect()still has no liveness probe, so it will still prefer a zero-reading IOReport backend over the rung below it. Deciding whatdetect()should do when a counter reads zero is a semantic change to the energy ladder and is left alone on purpose. This makes the condition visible; what to do about it is a separate call.🤖 Generated with Claude Code