SPEC.md §6.5.1 defines a normative byte encoding, and contextgraph-types/tests/attestation_vectors.rs publishes the vectors to reconcile against. Right now Rust is the only implementation, so the cross-language claim is untested — and an encoding rule with exactly one implementation is indistinguishable from an implementation detail.
Per SDK: the length-prefixed link encoding, the source-first chain fold, the frame commitment, the RFC 6962 Merkle root and inclusion proofs, and Ed25519 verification. Each must reproduce the published vectors byte-for-byte in its own test suite.
The encoding was chosen over RFC 8785 (JCS) precisely so this port needs no JSON canonicalizer — if any SDK finds itself reaching for one, the encoding has been misread.
Highest value on the two dynamic-language SDKs, where a subtle divergence (UTF-16 length instead of UTF-8 byte length, signed 32-bit prefixes) is easiest to introduce and hardest to notice.
Definition of done
Each box is checkable before the merge, by running the command it names.
The vectors can fail a wrong port. The published set was ASCII-only, its
only multi-leaf Merkle vector had a power-of-two leaf count, and it carried no
signature and no inclusion proof — so a port could get all three of the named
traps wrong and still go green. Fixing that is part of this issue, not a
follow-up.
The ports. Each covers the length-prefixed link encoding, the source-first
chain fold, the frame commitment, the RFC 6962 root and inclusion proofs, and
Ed25519 verification.
Each port reproduces the vectors in its own suite.
Wired into CI.
Documented.
SPEC.md §6.5.1 defines a normative byte encoding, and
contextgraph-types/tests/attestation_vectors.rspublishes the vectors to reconcile against. Right now Rust is the only implementation, so the cross-language claim is untested — and an encoding rule with exactly one implementation is indistinguishable from an implementation detail.Per SDK: the length-prefixed link encoding, the source-first chain fold, the frame commitment, the RFC 6962 Merkle root and inclusion proofs, and Ed25519 verification. Each must reproduce the published vectors byte-for-byte in its own test suite.
The encoding was chosen over RFC 8785 (JCS) precisely so this port needs no JSON canonicalizer — if any SDK finds itself reaching for one, the encoding has been misread.
Highest value on the two dynamic-language SDKs, where a subtle divergence (UTF-16 length instead of UTF-8 byte length, signed 32-bit prefixes) is easiest to introduce and hardest to notice.
Definition of done
Each box is checkable before the merge, by running the command it names.
The vectors can fail a wrong port. The published set was ASCII-only, its
only multi-leaf Merkle vector had a power-of-two leaf count, and it carried no
signature and no inclusion proof — so a port could get all three of the named
traps wrong and still go green. Fixing that is part of this issue, not a
follow-up.
an astral-plane character, so the UTF-8-vs-UTF-16-vs-code-point length
question has an oracle
6962's split is distinguishable from the duplicate-the-last-leaf shortcut
signature it produces, so §6.5.3 and §6.5.4 have oracles at all
SPEC.md§15)reference asserting the file agrees with what it publishes inline
The ports. Each covers the length-prefixed link encoding, the source-first
chain fold, the frame commitment, the RFC 6962 root and inclusion proofs, and
Ed25519 verification.
sdk/typescript/src/attest.ts, exported from the packageindex
contextgraph_sdk.attest, exported from the package indexsdk/go/contextgraph/attestchosen so none is needed)
Each port reproduces the vectors in its own suite.
cd sdk/typescript && npx tsc && node --test "dist/test/*.test.js"cd sdk/python && python3 -m unittest discover -s tests -vcd sdk/go && go test ./contextgraph/attest/cargo test -p contextgraph-types --features attestationagainst values it computed itself
to pass on the right one — transcripts in the PR
Wired into CI.
.github/workflows/ci.ymlruns itsattestation suite
workspace run never did
Documented.
CHANGELOG.mdrecords the ports under[Unreleased]