jcp: hand the caller its receipt, in MCP's namespaced _meta slot #69
Loading…
Reference in a new issue
No description provided.
Delete branch "jcp/mcp-meta-receipt"
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?
Ranked #1 by the 2026-08-29 sweep.
The gateway authorized every
tools/call, metered it on real hardware, debited the grant, and sealed allow and deny into a JCR-1 chain — and the client never saw any of it. The receipt lived ingateway.receipts(): the enforcing party keeping an artifact about itself, which the subject of the decision could not present, dispute, or forward. That is most of what a receipt is for.MCP's 2026-07-28 revision supplies the place to put it.
_metais now a first-class namespaced extension point with a 12-month deprecation policy behind it — so a policy object carried there has a defined home rather than an invented one, and the home stops moving.What changes
result._metaunderscience.transaction/jcp, beside the upstream's own untouched payload, with the measured joules and remaining budget.error.data._meta— JSON-RPC reservesdatafor exactly this. A refusal the caller cannot see is an enforcement nobody can audit, and a receipt's value does not depend on the verdict going the caller's way.params._jcp_witnessinto the namespaced slot, and the flat key keeps working. A silent behaviour change at an enforcement point is worse than a legacy key.The returned bytes are the same sealed envelope the gateway logged, not a summary — asserted directly rather than described. Attaching is defensive: a response that is not a JSON-RPC result object comes back untouched, because this must never mangle an upstream payload it doesn't understand.
Base64 is hand-rolled (no new dependency for one encode) and pinned against the RFC 4648 §10 vectors — a receipt that doesn't decode is not a receipt.
From the same sweep
Its repo-check phase refuted two items I had queued as gaps: the IETF agent-audit-trail draft and a hardware-rooted attestation paper are both already shipped — the draft being a strictly weaker subset, with an optional signature and no energy field at all.
Not in this change, and worth its own: MCP's new
CacheableResult/ttlMsmakes a cache hit into joules avoided, and nothing in the family binds a TTL'd result to an energy receipt.Verification
245 jcp-rs tests pass (5 new) · conformance passes all classes · published vectors unchanged on disk · no new clippy warnings (the two reported are pre-existing, in
flow.rsandstore.rs).