open-standards/joule-code/conformance/v1/coding_op_vectors.json
David Charlot e40bf51b53 joule-code: regenerate v1 conformance vectors with real cryptography
Completes the v0.1 conformance suite — no more placeholders. gen-vectors now
computes every derived field via the reference crates, and the verify harness
checks them all for real (the 7 prior SKIPs are gone).

- gen-vectors computes and prints real op_ids (BLAKE3 over canonical CBOR) and
  real Ed25519 signatures (op-binding op_id‖prior; receipt
  estimated_uj‖sequence‖nonce[‖measured_uj]).
- coding_op / signature / receipt vectors filled with the computed values; the
  negatives keep their hand-authored tamper (reused signature, different prior,
  mismatched op_id) and expected false/error.
- verify harness upgraded: C2 op-binding signature verification (positive +
  replay/tamper negatives) and C3 receipt signature verification (reconstruct
  the Receipt, verify against the endpoint key) now run for real.
- conformance/v1/README + regeneration.md updated; vanity scanner clean.

Result: cargo run -p joule-code-conformance -- verify ../conformance/v1 passes
the whole pack with no skipped vectors; cargo test --workspace green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-03 03:43:38 -04:00

68 lines
2.9 KiB
JSON

[
{
"name": "op-001-single-edit-content-address",
"description": "Positive (C1): a CodingOp with one byte-range edit. The op_id MUST be BLAKE3-256 over the deterministic-CBOR encoding of the CodingOp excluding any signature, rendered unpadded base64url. Regenerated against joule-code-rs.",
"op": {
"alg": 1,
"prior": "b3:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"edits": [
{ "path": "src/lib.rs", "anchor": { "ByteRange": { "start": 0, "end": 0 } }, "replacement_hex": "70756220666e2061646428613a20693634" }
],
"author": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"intent": "add an add() function",
"tier": "L3"
},
"expected_op_id": "b3:6Ysltc7O3IupNKFXybnzyv2ot32SSLLvCQRB8AHKIdQ",
"error": null
},
{
"name": "op-002-edit-order-canonical",
"description": "Positive (C1): two edits to the same file MUST be listed in ascending (path, start) order so the canonical form is unique; the op_id is over that canonical ordering.",
"op": {
"alg": 1,
"prior": "b3:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
"edits": [
{ "path": "src/lib.rs", "anchor": { "ByteRange": { "start": 0, "end": 0 } }, "replacement_hex": "2f2f20686561646572" },
{ "path": "src/lib.rs", "anchor": { "ByteRange": { "start": 40, "end": 44 } }, "replacement_hex": "6936344f" }
],
"author": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"intent": "add header and widen type",
"tier": "L1"
},
"expected_op_id": "b3:8kTnZfhR3BBgx2VP2_jOVImOXqkLUoSkNRSjw91j9uI",
"error": null
},
{
"name": "op-003-overlapping-edits-rejected",
"description": "Negative (C1): edits that overlap are non-canonical and MUST be rejected before an op_id is computed.",
"op": {
"alg": 1,
"prior": "b3:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
"edits": [
{ "path": "src/lib.rs", "anchor": { "ByteRange": { "start": 0, "end": 10 } }, "replacement_hex": "78" },
{ "path": "src/lib.rs", "anchor": { "ByteRange": { "start": 5, "end": 15 } }, "replacement_hex": "79" }
],
"author": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"intent": "overlapping",
"tier": "L1"
},
"expected_op_id": null,
"error": "edits_overlap"
},
{
"name": "op-004-unknown-alg-fails-closed",
"description": "Negative (C1/C2): an unknown algorithm identifier MUST fail closed; a verifier MUST NOT guess an algorithm.",
"op": {
"alg": 255,
"prior": "b3:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"edits": [
{ "path": "src/lib.rs", "anchor": { "ByteRange": { "start": 0, "end": 0 } }, "replacement_hex": "78" }
],
"author": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"intent": "unknown alg",
"tier": "L3"
},
"expected_op_id": null,
"error": "unknown_algorithm"
}
]