no fabricated readings: every figure sealed as a reading was read #212
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/no-fabricated-readings"
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 shipped binaries and examples that seal figures nothing measured, graded as hardware readings. For example, a test-fixture "4.8 J rapl" reading on every request served by an example server, and literal
measured_ujrecords in CLI demos. A receipt is only worth what its grade is worth, so any figure presented as a reading must have been read.What
Every site now either meters the real work or seals the figure as an illustrative estimate.
attested_efficiency: it used to attest a literal 117 mJ as a RAPL reading. It now meters a real workload on its own thread and attests the counter class the meter actually used. A new class,CounterClass::ProcessEnergy, covers the kernel's per-process count. Existing classes are unchanged.paymeters a fixed workload.demo/confidential, now with capability-named placeholder identities instead of named products;tag();Estimator. They under-claim; nothing pinned depends on them.energy_provenance,energy_coverage), so the rule is enforced by the type. API change:seal_settlement,coupling_recordandcoupling_idtake anEnergyinstead of a bareu64.Estimator, neverHwShunt.HwMetersealed every sub-millisecond request at 0 µJ. It now bills through mesh's µs-resolution estimator.Estimator.server, so the serve-example regression test runs.room.rs) and joulehook INSTALL now say each figure carries the grade of the meter that produced it.Not touched:
jouleclaw-omni/src/runtime/energy.rs, which an open PR owns, andwai/.Evidence
jcp-conformanceandsandbox-conformancepass, and hydra-client's 9/9 vectors still match.Not covered
sandbox-proof-wasm,sandbox-conformance(they may feed file-backed vectors, so they were left alone) andsandbox/SPEC.md's example.ModelBased(jcp-energy, proof-solvers, aac-core) is not a host-calibrated model. It is left for a separate pass.🤖 Generated with Claude Code
The reference server metered every request with a test fixture, SteppingMeter("rapl", HwShunt, 4.8 J), so each sealed mesh/1 receipt claimed a 4.8 J "rapl" hardware reading of work nothing measured. A mesh/1 receipt has no coverage field, so HwShunt there claims a reading of the whole request (SPEC §3.3). The example now serves with the meter its build can read: ProcessMeter (this process's own CPU and GPU energy; the reference engine runs in this process) with the new `metal` feature, HwMeter::detect with `hw-meter` (and -rapl/-nvml/-apple), and the load estimator otherwise. The features are forwarded to an optional mesh-meter dependency; the library itself still never meters. tests/serve_example.rs compiles the example into the test and drives one real HTTP request through its own meter and mesh: a build with no hardware meter must seal Estimator with no measured figure, and a metal build's HwShunt figure must lie within this process's CPU energy read raw (ri_energy_nj) around the request. Co-Authored-By: Claude Opus 5.5 <[email protected]>Teammate::tag (and tag_mention, which calls it) sealed each task's efficiency/1 energy as a HwShunt hardware reading. The figure is the cost the dispatch's last decision receipt sealed — the spend the skill reported, else the cost it committed before it ran; the reference Skill reports a constant — and that decision receipt already grades it Estimator. So the same figure was an estimate in one receipt and a hardware reading nothing took in the other, against SPEC §6's "honest provenance". tag() now seals Estimator; a binding whose skill meters its work passes its meter's grade through tag_with_provenance, unchanged. The decision receipts, and so the published jouledesk/1 conformance vector (summarize-allow.hex, checked by tests/pack.rs), are untouched. The unit test that pinned the old default ("plain tag seals the committed cost as a hardware reading") asserted the fabrication; it now asserts that tag and tag_mention both seal "Estimator", read back through the verified efficiency chain. Co-Authored-By: Claude Opus 5.5 <[email protected]>`sandbox demo` and `sandbox confidential` detect no device and run no unit, yet the attestations they seal named a CPU model, a GPU product with a driver release, and a confidential-compute CPU product: device identities no probe saw, sealed as if detected. Each identity is now a capability-named placeholder labelled illustrative ("illustrative host CPU (none detected)", driver "illustrative"), built by illustrative_identity beside the existing illustrative() energy records. The module docs say so. Test: the_illustrative_runs_seal_no_detected_identity fails on the old reports (demo: model "Generic x86_64") and passes now. Co-Authored-By: Claude Opus 5.5 <[email protected]>After the branch graded these figures by how they were obtained, the docs still called them measured: jouledesk's channel example printed "the teammate's measured contribution", Joule::energy_summary's doc and SPEC §6 said the contribution "is *measured*", the room example sealed an Estimator figure and closed "at its measured energy" (each turn "metered {est} µJ" for a scripted estimate), and joulehook INSTALL.md promised the Mesh proxy as "the only *measured* + *capped* option" that "returns the measured energy". Each now says the figure carries the grade of the meter that produced it (a hardware reading only where a live counter read the work, else an estimate graded as one), that a rollup is no better than the weakest figure it sums, and the room example calls its figures estimates. Text only; jouledesk and jouledesk-github tests pass unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>