open-standards/jcp/jcp-rs/crates
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 9b57b96816
All checks were successful
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 55s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 17s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 1m12s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 3m18s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 4m14s
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Successful in 1m37s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 7m41s
standards workspaces build + test / joulehook-rs (joulehook/joulehook-rs, joulehook-rs, linux) (pull_request) Successful in 1m10s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 2m50s
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Successful in 2m16s
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Successful in 8m12s
efficiency/1: a partial energy figure is sealed as partial and never headlines as a task total
`Efficiency::wire()` sealed `energy_uj` and `provenance` and nothing about
coverage. So a GPU-only reading (a hardware counter that reads the
accelerator and not the CPU work that drove it) reached a verifier as the
whole unit's energy. The receipt also sealed a `uj_per_accepted_token` over
that reading, which presented it as what the work cost per token. jcp SPEC
§5.2 already said a `Partial` figure MUST NOT be presented as a task total,
and listed the receipts that carry coverage. efficiency/1 was not among them.

`aggregate()` then summed energy across receipts with no coverage and no
provenance, and its per-unit figure came out as clean as a whole one. §5.3
says aggregation takes the floor of both and is never a step at which a
grade improves.

Now:
- The receipt carries `energy_coverage: "Partial"` when the figure is
  partial, and omits it when the figure is whole. A whole receipt, and every
  receipt sealed before the field existed, keeps its bytes.
- A partial receipt seals no `uj_per_accepted_token`. A partial figure
  divided by tokens is not what the work cost per token, nor a bound on it,
  since a partial figure can fall short of the work or exceed it.
- `read_payload`, split out of `verify` so the payload rules can be replayed
  without a signature, refuses:
  - a partial receipt carrying the headline;
  - any `energy_coverage` but "Partial" ("Whole" included; absence is Whole);
  - a provenance label that is not one of the three.
- `Totals` carries `provenance_floor` and `coverage`. A total over any partial
  receipt is partial, gives no per-unit energy, and reports value per joule
  as its worst value (0.0).

SPEC §5.2 now lists efficiency/1 with these rules. A published pack,
`conformance/v1/efficiency.json` (from `gen_efficiency_vectors`), carries the
readings and refusals and the totals sets must sum to. `tests/efficiency_pack.rs`
replays it from disk.

Tests: 3 new unit tests and 4 pack replays. All 9 mutations of the new rules
are killed. The pack alone catches the headline, coverage-floor and
provenance-floor mutations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:58:36 -04:00
..
jcp-a2a jcp-a2a: an unverified AP2 mandate could set the ceiling, and name any payee 2026-10-05 07:22:11 -04:00
jcp-action-receipt jcp: a ModelIn caveat says which model a grant authorizes, and the frame names the model it runs 2026-10-17 04:21:21 -04:00
jcp-bridge Merge pull request 'jcp-bridge: an OAuth access token narrows to the grant's caveats or is not minted, and a delegated grant needs its chain' (#321) from fix/jcp-oauth-projects-caveats into main 2026-10-18 19:02:29 -04:00
jcp-channel jcp: a ModelIn caveat says which model a grant authorizes, and the frame names the model it runs 2026-10-17 04:21:21 -04:00
jcp-cite jcp: a ModelIn caveat says which model a grant authorizes, and the frame names the model it runs 2026-10-17 04:21:21 -04:00
jcp-cli jcp: a ModelIn caveat says which model a grant authorizes, and the frame names the model it runs 2026-10-17 04:21:21 -04:00
jcp-conformance jcp: C25 — flow was a declared clause with no check; now it has one 2026-10-20 08:42:01 -04:00
jcp-efficiency efficiency/1: a partial energy figure is sealed as partial and never headlines as a task total 2026-10-20 13:58:36 -04:00
jcp-energy energy meters: a GPU counter reading low is refuted in sandbox-meter, eoc-meter and jcp-energy too 2026-10-20 04:15:36 -04:00
jcp-flow jcp-flow: Compute propagated provenance from tool bytes 2026-07-22 02:09:29 -04:00
jcp-gateway jcp-gateway: everything a gated request carries to the server is sealed and flow-checked 2026-10-19 11:23:23 -04:00
jcp-grant jcp: a chained decision enforces caveats, and a chain cannot drop one 2026-10-17 10:44:16 -04:00
jcp-intercept jcp-intercept: a reading meter meters a seam as one span, divided among its steps by CPU time 2026-10-13 02:41:41 -04:00
jcp-orchestrate jcp: a ModelIn caveat says which model a grant authorizes, and the frame names the model it runs 2026-10-17 04:21:21 -04:00
jcp-policy jcp-policy: a receipt sealed the policy's name, so the rules could be swapped under it 2026-10-05 07:22:12 -04:00
jcp-prompt jcp-prompt: a signed, content-addressed prompt registry 2026-06-27 19:57:46 -04:00
jcp-receipt jcp-gateway: replay our own receipt stream at startup (SPEC §8.1) 2026-10-17 11:42:06 -04:00
jcp-runtime jcp: a chain is bounded in money on every link, and a delegated grant is never decided alone 2026-10-17 11:42:12 -04:00
jcp-schema jcp-wire: a request presented again gets its first answer, so a lost response is recoverable 2026-10-20 03:20:12 -04:00
jcp-threshold jcp-wire: the endpoint decides at its own clock, and a captured request is decided once 2026-10-18 13:40:16 -04:00
jcp-trace jcp-trace: an undefined wedge metric is not zero 2026-10-17 04:54:47 -04:00
jcp-wire jcp-wire: a request presented again gets its first answer, so a lost response is recoverable 2026-10-20 03:20:12 -04:00
jcp-x402 jcp-x402: the settlement record carries its figure's grade; pay meters its compute 2026-10-10 18:05:48 -04:00