Generalizes wave-49 from single-trace to multi-window streaming
sessions. Real streaming workloads produce N stream-window/1
receipts + N coding-window/1 receipts + 1 sandbox attestation +
0..1 materialized joule-code op — the per-request binding doesn't
fit.
1. jouleclaw-cross-binding::streaming (new sub-module).
- StreamingTraceBinding sealed under schema
'streaming-trace-binding/1'.
- WindowEnergyRef per window (stream + coding receipt ids,
joules_uj, energy_provenance, materialized_op_id).
- StreamingInvariantVerifier with seven checks fail-closed:
· sandbox.trace_id == binding.trace_id
· every window stream_id == binding.stream_id
· window ids strictly ascending
· Σ window joules within tolerance of sandbox joules
· declared_provenance == worst observed across windows + sandbox
· session_op_id (when non-empty) accounted by a window seal
· trusted-stewards
- 11 new tests + 1 conformance vector byte-equal under canonical.
2. Demo binary — examples/wave51_streaming_trace_binding.rs.
4-window coding session, sandbox wrapping at S5, binding
verified, 1599-byte canonical sealed to /tmp/.
Workspace check clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
54 lines
2.4 KiB
JSON
54 lines
2.4 KiB
JSON
{
|
|
"spec": "JouleClaw streaming-trace binding v1",
|
|
"schema_id": "streaming-trace-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 2-window streaming session under a single S5 sandbox attestation; the second window seals a materialized op_id; joules sum exactly to the sandbox total; HwShunt across the whole trace. The verifier MUST accept the binding and compute the embedded content_hash byte-equal under canonical encoding.",
|
|
"vector_count": 1,
|
|
"vectors": [
|
|
{
|
|
"n": 1,
|
|
"description": "2-window session: w0 typed-only, w1 seals a materialized op; sum = 2 J = sandbox total; HwShunt throughout.",
|
|
"content_hash": "1e4dd6adc1627ae6505e61f28f5bd5bbc4a43d3452a76f232ad1ce529f75e41e",
|
|
"binding": {
|
|
"jc_binding": "streaming-trace-binding/1",
|
|
"id": "stb-conf-0001",
|
|
"closed_at": "2026-06-05T00:00:00Z",
|
|
"steward": "did:keri:EJ9testStewardAID000000000000000",
|
|
"trace_id": "b3:str-trace-0001-str-trace-0001-str-trace-00000000",
|
|
"stream_id": "s-001",
|
|
"windows": [
|
|
{
|
|
"stream_id": "s-001",
|
|
"window_id": 0,
|
|
"stream_receipt_id": "rcpt-sw-0",
|
|
"coding_receipt_id": "rcpt-cw-0",
|
|
"joules_uj": 1000000,
|
|
"energy_provenance": "HwShunt"
|
|
},
|
|
{
|
|
"stream_id": "s-001",
|
|
"window_id": 1,
|
|
"stream_receipt_id": "rcpt-sw-1",
|
|
"coding_receipt_id": "rcpt-cw-1",
|
|
"joules_uj": 1000000,
|
|
"energy_provenance": "HwShunt",
|
|
"materialized_op_id": "b3:opAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
|
}
|
|
],
|
|
"sandbox": {
|
|
"receipt_id": "b3:rcpt-sandbox-0001-rcpt-sandbox-0001-rcp00000",
|
|
"content_id": "b3:cid-sandbox-0001-cid-sandbox-0001-cid000000000",
|
|
"tier": "S5",
|
|
"granted_device_classes": ["Cpu"],
|
|
"joules_uj": 2000000,
|
|
"energy_provenance": "HwShunt",
|
|
"supervisor_pubkey_hex": "6e7a1cdd29b0b78fd13af4c5598feff4ef2a97166e3ca6f2e4fbfccd80505bf1",
|
|
"trace_id": "b3:str-trace-0001-str-trace-0001-str-trace-00000000"
|
|
},
|
|
"session_op_id": "b3:opAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
"declared_provenance": "HwShunt",
|
|
"joule_tolerance_uj": 0
|
|
}
|
|
}
|
|
]
|
|
}
|