jcp-gateway, joule-ui-serve: name the plaintext figure cost_uj #128
Merged
dcharlot
merged 1 commit from 2026-10-01 06:22:25 -04:00
energy/cost-keys-named-for-what-they-carry into main 2026-10-01
jcp-gateway, joule-ui-serve: name the plaintext figure cost_uj
All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 1m53s
standards workspaces build + test / aac-rs (pull_request) Successful in 36s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 39s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 33s
standards workspaces build + test / map-rs (pull_request) Successful in 32s
standards workspaces build + test / mesh-rs (pull_request) Successful in 26s
standards workspaces build + test / openpay (pull_request) Successful in 1m29s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m48s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m18s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m11s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m37s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m5s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 4m22s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m36s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m37s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m34s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 3m55s
Two plaintext keys called `measured_uj` carried the call's cost, which is
the meter's estimate wherever no live counter read the span:
- jcp-gateway's `_meta` block on an allowed tools/call;
- joule-ui-serve's /action response.
Their grade already rode beside them, but the name still said
"measured". Nothing outside these crates reads either key: no spec,
vector or site defines them.
- jcp-gateway: `_meta.cost_uj`, the key its sealed receipt already uses
for the same figure, beside `energy_provenance` and, when partial,
`energy_coverage`. `Relayed::Allowed { cost_uj }` follows.
- joule-ui-serve: `cost_uj` and `energy_provenance`, and the page
scripts in joule-ui-render and the serve binary read those.
The energy record's own `measured_uj`, present only for a hardware
reading, is unchanged everywhere, signed vectors included. Tests assert
the old key is gone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>