The triad shares four primitives by design (JCR-1 envelope, honest
energy provenance, cascade pattern, conformance vectors), but the
standards themselves are independent. When a real workload exercises
all three — a coding op routed through the JouleClaw cascade,
executed inside a Sandbox unit, signed via JCR-1 — there was no
typed way for an auditor to assert the cross-standard invariants.
This wave types those invariants up + ships the integration demo.
1. jouleclaw-cross-binding (new crate) — typed binding.
- CrossStandardBinding { trace_id, cascade: CascadeRef,
sandbox: SandboxRef, coding: CodingOpRef, declared_provenance,
joule_tolerance_uj } sealed under schema "cross-binding/1".
- Canonical JSON (sorted keys) + BLAKE3 content addressing,
ready for COSE_Sign1 over the canonical bytes via the existing
JCR-1 v1 signing path.
- EnergyProvenance { HwShunt | ModelBased | Estimator } mirrored
from jouleclaw-energy (avoids the cross-workspace import) with
a `worst()` rule that applies the JCR-1 §2.3 worst-counter
rule ACROSS standards, not just within one receipt.
- InvariantVerifier with five checks, fail-closed:
· trace-id equality across cascade + sandbox + coding refs
· joules within tolerance (cascade ≈ sandbox)
· declared_provenance == EnergyProvenance::worst(cascade, sandbox)
· all stewards (binding signer + cascade steward + sandbox
supervisor) in the trusted-stewards set
· sandbox grants ⊆ cascade authorised device classes
- 1 conformance vector with embedded byte-equal content_hash;
14 tests covering every invariant's pass + fail paths.
2. Demo binary — examples/wave49_full_stack.rs in jouleclaw-stack.
Runs the full triad end-to-end in one binary:
- Real JouleClaw cascade walk (selects tier L3, ~2 J).
- Sandbox attestation in the canonical wire form sandbox-rs
emits (JCS canonical JSON + Ed25519 — sb_attestation
"sandbox.attestation/1"). No cross-workspace import; the
attestation is composed at the wire layer, the way an auditor
reads it.
- Joule-Code coding-op cargo in the canonical wire form
(BLAKE3-CBOR op_id, signed by author Ed25519 key) — same
wire-layer pattern.
- CrossStandardBinding minted over the three; verifier runs;
binding hash sealed.
- Five artifacts written to /tmp/: per-standard receipt × 3 +
binding + summary. Each verifies independently; together they
prove the trace went through all three standards consistently.
Why wire-layer instead of crate-layer: sandbox-rs and joule-code-rs
live in sibling Cargo workspaces; their crates use
`version.workspace = true`, so a cross-workspace path dep would
fail to resolve workspace inheritance. The right shape isn't
"link the source code" — it's "compose at the wire format the
standards already publish." That's the same pattern wave-45's
OpenPay demo used (jouleclaw → JCR-1 → OpenPay settlement
Transaction) and it makes the cross-standard composition
genuinely auditor-friendly: any other-language verifier that can
parse the four wire-form documents can run the same invariant
checks.
This is the substrate "the world" reads when proving a trace
went through the JouleClaw / Sandbox / Joule-Code triad
consistently. The triangle stays the type system; wave-49 adds
the cross-standard typed view on top of it.
Workspace check clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
50 lines
2.5 KiB
JSON
50 lines
2.5 KiB
JSON
{
|
|
"spec": "JouleClaw cross-standards binding v1",
|
|
"schema_id": "cross-binding/1",
|
|
"canonical_encoding": "JSON with sorted object keys (recursively); UTF-8; no whitespace; no float coercion. content_hash is BLAKE3 hex of the canonical bytes.",
|
|
"note": "One vector: a well-formed binding across JouleClaw cascade + Sandbox attestation + Joule-Code op, all quoting the same trace id, joules in agreement, both energy readings HwShunt. The verifier MUST accept this binding and compute the embedded content_hash byte-equal under canonical encoding.",
|
|
"vector_count": 1,
|
|
"vectors": [
|
|
{
|
|
"n": 1,
|
|
"description": "Well-formed binding: L3 cascade + S5 sandbox (Cpu+Gpu) + L3 coding op; 2.5 J across all three; HwShunt provenance; same trace id.",
|
|
"content_hash": "5c5dcf58b363a91d1cf199729427417b954fbcb9d5efd644db2cd977ddcf33a5",
|
|
"binding": {
|
|
"jc_binding": "cross-binding/1",
|
|
"id": "xb-conf-0001",
|
|
"closed_at": "2026-06-05T00:00:00Z",
|
|
"steward": "did:keri:EJ9testStewardAID000000000000000",
|
|
"trace_id": "b3:trace0001trace0001trace0001trace0001trace00000000",
|
|
"cascade": {
|
|
"receipt_id": "rcpt-cascade-conf-0001",
|
|
"content_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
"tier": "L3",
|
|
"joules_uj": 2500000,
|
|
"energy_provenance": "HwShunt",
|
|
"steward": "did:keri:EJ9testStewardAID000000000000000",
|
|
"trace_id": "b3:trace0001trace0001trace0001trace0001trace00000000",
|
|
"authorised_device_classes": ["Cpu", "Gpu"]
|
|
},
|
|
"sandbox": {
|
|
"receipt_id": "b3:rcpt0001rcpt0001rcpt0001rcpt0001rcpt000000000",
|
|
"content_id": "b3:cid0001cid0001cid0001cid0001cid000000000000000",
|
|
"tier": "S5",
|
|
"granted_device_classes": ["Cpu", "Gpu"],
|
|
"joules_uj": 2500000,
|
|
"energy_provenance": "HwShunt",
|
|
"supervisor_pubkey_hex": "6e7a1cdd29b0b78fd13af4c5598feff4ef2a97166e3ca6f2e4fbfccd80505bf1",
|
|
"trace_id": "b3:trace0001trace0001trace0001trace0001trace00000000"
|
|
},
|
|
"coding": {
|
|
"op_id": "b3:op0001op0001op0001op0001op0001op00000000000000",
|
|
"prior": "b3:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
"tier": "L3",
|
|
"author_pubkey_hex": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
|
|
"trace_id": "b3:trace0001trace0001trace0001trace0001trace00000000"
|
|
},
|
|
"declared_provenance": "HwShunt",
|
|
"joule_tolerance_uj": 0
|
|
}
|
|
}
|
|
]
|
|
}
|