meter model subprocesses where they ran: the L3 model enters the run's figure #211
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/meter-model-subprocesses"
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?
Why
A repo-wide sweep of every place that meters energy found model subprocesses metered machine-wide, which is an estimate on macOS 27, or not metered at all.
The worst case was joule-code-remediate. Its L3 model run was outside every meter, so
uj_per_verified_fixleft out the most expensive tier.What
execbehind a gate line), so its own count is readable. It is read on its own process tree,waitid(WNOWAIT)holds it as a zombie, and only then is it reaped.run.Unavailable.fabric_calibrate,mpp_energy). These used to refuse on macOS 27. They now calibrate each fabric member on this process's own counters.Evidence
ri_energy_njthrough an oracle that shares no code with the meter.rayon fabric-meter.Not covered
fabric_calibrateignoresJOULECLAW_FABRIC_CALIBRATION, whilempp_energyhonours it. This predates the branch.🤖 Generated with Claude Code
The docs said a host with no per-process counter gets the token-count estimate off macOS, but there ProcessSpanMeter falls back to detect_meter() (the 28.6 W x wall estimator in this build), which it marks Whole, and grade() kept that figure. A fallback span is the machine's figure, not the engine's, so grade() now treats it as no reading and uses the rest (host_counter, else the token estimate): one way of reading the host whichever engine ran, and the docs hold. That is simpler than documenting a second host figure that only the in-process engine would get. JOULE_CODE_L3_SELF_CONTAINED could never take effect: the llama engine is read at its exit, which the tree meter always marks (TreeGap::Exited), so no reading was ever whole. The setting and its plumbing are gone and the docs say the reading is a lower bound, always graded as an estimate. A missing llama binary had become LlmError::Upstream("... exited 127"): the binary is exec'd by the gating sh, whose failed exec reads as the model's own failure. The binary is now resolved first (a path as given, else PATH; a regular executable file) and one that cannot run is Unavailable, as a failed spawn was, with nothing spawned. The README says the oracle tests run only locally on Apple Silicon (CI tests this workspace on Linux, where they take the fallback), and lines this branch added name the capability, not a third-party engine. Co-Authored-By: Claude Opus 5.5 <[email protected]>No job ran the oracle assertions this branch added. joule-code-rs's matrix entry runs on linux-arm64, where joule-fix's L3 energy test has no tree meter and takes its fallback branch; jouleclaw-loader-gguf's calibration tests need the fabric-meter feature, which no job passed, and their oracle needs macOS. The macOS energy job now runs both, each step in the job's style (pipefail, a tee'd log, a grep gate on a line the test prints only where its gated assertion ran): - joule-code-remediate `l3_`: 'l3 model process:' (the model's reading checked against the stand-in's own count). The stand-in itself stays #[ignore]: it is the subprocess the oracle test runs (filtered to it, --ignored), not a test of its own, and the oracle test is not ignored. - jouleclaw-loader-gguf --features "rayon fabric-meter": the marginal_energy tests ('calibration row stamped on macOS:') and tests/process_calibration ('process calibration: CPU member'); this also builds the fabric-meter examples. joule-code-rs's target dir and Cargo.lock join the job's cache. The l3-jouleclaw example workspace stays out of this job (a heavy separate build on the one macOS runner); its README says its oracle tests run locally. Co-Authored-By: Claude Opus 5.5 <[email protected]>04d0712ba168aa43bafd