The JcpGate landed as code; this makes it part of the
standard.
SPEC §5.1 (OPTIONAL) — the JCP binding, normatively:
tier as action a stage is consulted only if the
chain's leaf grant names its verb;
no l4 in the chain → no remote
frontier agent, structurally
energy as budget each consultation debits the tier's
§1.1 class marker (µJ: 1 / 10 / 10³ /
10⁶ / 10⁷, honest Estimator) from
EVERY link of the chain
denial as fallthrough
every consultation seals as a chained JCR-1 receipt with
machine-readable deny reasons
Readiness: Solid — the jcp runtime and chained receipts
exist today; the binding is composition.
CONFORMANCE C5 — gated_cascade_vectors.json (6 vectors)
Unlike C1–C4's wire round-trips, C5 runs the REAL jcp
runtime end to end: fixed fixture identities (issuer
[1;32], agent [2;32], steward [7;32]) + fixed per-tier
costs make every vector deterministic. Each vector
pins closing tiers per run, total µJ debit, and the
sealed verdict sequence:
ungranted l4 denied even when it would close
granted l4 closes and debits its class (10_000_010)
exhausted budget stops the escape hatch on run 2
(deny sealed with reason budget-exceeded)
earlier close → later tiers never consulted
denied probe still reaches a granted deeper tier
(l2 deny + l3 allow in one walk)
repeated cheap closes accumulate exact debits (3×10)
verify_gated_cascade extracts every sealed receipt and
compares verdicts AND deny-reason strings — a denial is
evidence, not a silent skip, and the suite proves it.
Pack: 24 passed, 0 failed. Workspace: 33 green.
Co-Authored-By: Claude Fable 5 <[email protected]>
7.3 KiB
Changelog
All notable changes to the Joule Code standard are recorded here. The format follows the spirit of Keep a Changelog; the standard versions independently of its siblings (tags joule-code-vX.Y.Z).
[Unreleased]
Added
-
§5.1 Grant-gated consultation (OPTIONAL) — the JCP binding: tier as granted action (
l0…l4), energy class as chained budget debit, denial as fallthrough, every consultation sealed as a chained JCR-1 receipt. Reference binding: thejoule-code-jcpcrate (JcpGate::wrapover anyStage); nol4in the chain → no remote frontier agent, structurally. Conformance gains class C5 with a published vector file (gated_cascade_vectors.json, fixed fixture identities, deterministic end to end) run by the harness against the real jcp runtime alongside C1–C4. -
joule-code-cascadeships a reference L0 (Cache) stage: a content-addressed cache of resolved coding operations keyed by(prior, intent). A hit closes the request at L0 (picojoule class) without consulting any higher tier — the first concrete cascade stage, making stop-at-first-close demonstrable in the reference library. A third party may use it or substitute its own. -
joule-code-cascadeships a genericFnStage: any tier (L1 Lawful, L2 Embed, L3 Model) can be expressed by supplying a resolver closure, so a consumer binds the JouleClaw agent schema — or any other runtime/model — to the cascade without this crate depending on it. (A test wires an L3 model stage behind an empty L0 and confirms it closes at L3.) -
examples/l3-jouleclaw/— a consumer binding showing JouleClaw's L3 (Model) tier wired into the cascade: ajouleclaw_llm_cheap::LlmBackendbehind aFnStage(L3)that generates aCodingOp+ joules-class receipt. Three backends share the slot:EchoBackend(model-free, for the unit tests);JouleclawRuntimeBackend, which runs a GGUF model in-process on JouleClaw's own from-scratch tensor runtime (jouleclaw-runtimeoverjouleclaw-loader-ggufand the reference/Apple kernel backends — no llama.cpp, no FFI); andLlamaCompletionBackend, which shells out to llama.cpp. Therunbinary generates with a local model (in-process runtime by default;JOULE_CODE_L3_ENGINE=llamafor the shell-out), content-addresses the result as aCodingOp, and meters host energy over the inference for the receipt (honest provenance:HwShunton RAPL/NVML,Estimatoron Apple). Verified live: the llama.cpp path against a local 350M GGUF, and the in-process from-scratch runtime againstternary-bonsai-1.7b-q2_0(qwen3, Q2_0) — real text, a realop_id, the cascade closing at L3 (tests/runtime_l3.rs, opt-in via--ignored). Standalone workspace, so the standard's lib stays free of a JouleClaw dependency;jouleclaw_dispatch::ModelBankselects the cheapest capable backend in production. -
joule-code-collab(Research) lands the federated-collaboration interface (Collabtrait: submit / committed / membership), a single-node reference cluster (LocalCluster), and the BFT consensus core (LockstepCluster): a multi-node lockstep deterministic simulation with BFT supermajority commit — an op commits only when ≥2f+1ofn=3f+1honest nodes independently validate it, and committed ops areop_id-ordered so every honest node derives a byte-identical log. Tested: commits with honest agreement, toleratesfByzantine nodes (safety), loses liveness only beyondf, rejects non-members despite quorum, deterministic round ordering. It also addsprotected— FROST threshold authorization of protected operations: at-of-nFROST (Ed25519) aggregate signature over an op'sop_id, verifiable against the cluster's single group key (no member holds the whole key; fewer thantcannot authorize). Tested: a 2-of-3 threshold authorizes and binds exactly one op_id; below threshold cannot. And MLS group keying (RFC 9420, viaopenmls,tests/mls_keying.rs): the cluster members form an MLS group and derive a shared group key with no central server — verified that members agree on the exported secret, that adding a member advances the epoch, and that a member an epoch behind derives a different (forward-secret) key. (SPEC §7,spec/collab.md.) -
examples/transport-moqt/— the CommunicationOS (MoQT) transport binding, the last of the four federation layers. A consumer binding that carries a collaboration's committed (consensus-ordered) coding operations overinv-moq— CommunicationOS's MoQT (Media over QUIC Transport) protocol with its JWP receipt extension. The end-to-end test wires the whole stack in-process:LockstepClustercommits ops → each is published as a MoQT object → every object carries a real Ed25519/BLAKE3 signed receipt → a subscriber receives all ops, verifies the receipts against the publisher key, and recovers the originalSignedOpintact; a second test shows a receipt-requiring subscriber rejecting an untrusted publisher's group (ownerless authenticity). Driven throughinv-moq'sMockFabric(real signatures + BLAKE3 merkle receipts, no QUIC; thequicfeature is the real-wire path behind the same trait surface). Standalone workspace, so the reference library stays free of a joulesperbit dependency. The four federation layers — consensus, threshold authorization, group keying, transport — are now all implemented and tested. (SPEC §7,spec/collab.md.)
[0.2.0] — draft
Changed
- Receipts now seal as JCR-1 envelopes. The receipt's signed form is the family-shared JCR-1 wire format — canonical det-CBOR (RFC 8949 §4.2.1, length-first key order) inside a COSE_Sign1 envelope (RFC 9052, EdDSA
alg = -8), as thejoule-code/1profile. This replaces v0.1's bespokeestimated_uj ‖ sequence ‖ noncepreimage. A Joule Code receipt now verifies under the family's existing JCR-1 tooling and its cross-language (Python/Go) reference verifiers. (SPEC §6.1.) joule-code-receiptgains ajcr1module (canonical CBOR + COSE_Sign1, vendored from the JCR-1 reference, no JouleClaw dependency) andReceipt::to_jcr1_wire/seal/verify_envelope; the bespokesign/verifyare removed.- Conformance C3 vectors regenerated as JCR-1 COSE_Sign1 envelopes; the harness verifies the envelope and that its payload is the receipt's canonical core. A byte-equality test pins the canonical encoder against a published JCR-1 vector.
[0.1.0] — draft
Initial draft standard.
Added
SPEC.md— normative specification: the cascade requirement (L0–L4, stop-at-first-close), the receipt requirement (measured + estimated,Provenance), and the no-capture requirement.- The coding-operation cargo: content-addressed (BLAKE3-256), signed (Ed25519, prior-state-bound) transitions over a source tree; deterministic CBOR canonical form.
- The receipt schema in Joule Wire Protocol form, energy-signed.
- The cascade interface and the agent-schema binding to JouleClaw; the L4 binding to remote frontier agents over ACP.
- The federated-collaboration binding, specified at interface level and classified Research.
joule-code-rs/reference library:joule-code-schema,joule-code-cargo,joule-code-receipt,joule-code-cascade,joule-code-conformance.conformance/v1/reference vector pack (C1–C4), internally consistent pending regeneration against the reference library.