Problem
PR #114 implements record_hash (RFC 8785 JCS plus the omit-self rule) and
RecordAttestation (detached Ed25519) in contextgraph-types and publishes
golden vectors in tests/fixtures/. No SDK implements either, so the vectors'
whole reason for existing — that an implementation in another language can
reconcile to the same bytes — is unproven by anything that runs.
schema/validate-examples.py checks two properties of the vectors in Python
(the canonical text hashes to the published digest, and parses back to the
fixture minus record_hash). Neither is a JCS implementation, and the file
says so.
This is the record-layer sibling of #93, which tracks porting provenance
attestation to the SDKs. The two are separate ports with different preimages
and can land independently.
Files
tests/fixtures/record-hash-vectors.json — the canonical JCS text and hash of
every record fixture
tests/fixtures/record-attestation.json — a real Ed25519 signature
tests/fixtures/record-attestation-key.json — the published test key, public
key, and the exact signed message
contextgraph-types/src/record_attest.rs — the reference implementation
contextgraph-types/tests/record_vectors.rs — the same vectors inline
docs/profiles/context-exchange-provider.md — LH1, LH2, LH5, LC4, LC5
docs/adr/0012-record-hash-and-record-attestation.md
sdk/typescript/, sdk/python/, sdk/go/
What "done" needs
Per SDK:
- A
recordHash / record_hash / RecordHash that canonicalizes with a
conforming RFC 8785 implementation and applies the omit-self rule (remove the
top-level record_hash member only).
RecordAttestation verification over the domain-separated message
("contextgraph/attest/1/record" followed by the digest's 32 raw bytes,
profile LC4), recomputing the record's hash rather than reading the stored
member (LC5).
- A test that reads
tests/fixtures/record-hash-vectors.json and asserts the
SDK reproduces each jcs_utf8 and each record_hash, plus one that
verifies record-attestation.json under record-attestation-key.json's
public key.
- A CI job in
.github/workflows/ci.yml running it, alongside the existing
per-SDK conformance jobs.
Note for whoever picks this up: JavaScript gets ECMAScript number semantics for
free, Python and Go do not. Python's repr and Go's strconv.FormatFloat
differ from Number::toString at the exponent thresholds RFC 8785 Appendix B
pins — that table is the first thing to test against, not the last.
Done
Each SDK reproduces every published vector, verifies the published attestation,
and a CI job proves it on every PR.
Problem
PR #114 implements
record_hash(RFC 8785 JCS plus the omit-self rule) andRecordAttestation(detached Ed25519) incontextgraph-typesand publishesgolden vectors in
tests/fixtures/. No SDK implements either, so the vectors'whole reason for existing — that an implementation in another language can
reconcile to the same bytes — is unproven by anything that runs.
schema/validate-examples.pychecks two properties of the vectors in Python(the canonical text hashes to the published digest, and parses back to the
fixture minus
record_hash). Neither is a JCS implementation, and the filesays so.
This is the record-layer sibling of #93, which tracks porting provenance
attestation to the SDKs. The two are separate ports with different preimages
and can land independently.
Files
tests/fixtures/record-hash-vectors.json— the canonical JCS text and hash ofevery record fixture
tests/fixtures/record-attestation.json— a real Ed25519 signaturetests/fixtures/record-attestation-key.json— the published test key, publickey, and the exact signed message
contextgraph-types/src/record_attest.rs— the reference implementationcontextgraph-types/tests/record_vectors.rs— the same vectors inlinedocs/profiles/context-exchange-provider.md—LH1,LH2,LH5,LC4,LC5docs/adr/0012-record-hash-and-record-attestation.mdsdk/typescript/,sdk/python/,sdk/go/What "done" needs
Per SDK:
recordHash/record_hash/RecordHashthat canonicalizes with aconforming RFC 8785 implementation and applies the omit-self rule (remove the
top-level
record_hashmember only).RecordAttestationverification over the domain-separated message(
"contextgraph/attest/1/record"followed by the digest's 32 raw bytes,profile
LC4), recomputing the record's hash rather than reading the storedmember (
LC5).tests/fixtures/record-hash-vectors.jsonand asserts theSDK reproduces each
jcs_utf8and eachrecord_hash, plus one thatverifies
record-attestation.jsonunderrecord-attestation-key.json'spublic key.
.github/workflows/ci.ymlrunning it, alongside the existingper-SDK conformance jobs.
Note for whoever picks this up: JavaScript gets ECMAScript number semantics for
free, Python and Go do not. Python's
reprand Go'sstrconv.FormatFloatdiffer from
Number::toStringat the exponent thresholds RFC 8785 Appendix Bpins — that table is the first thing to test against, not the last.
Done
Each SDK reproduces every published vector, verifies the published attestation,
and a CI job proves it on every PR.