Skip to content

Conformance

A specification without a conformance suite drifts — independent implementations diverge silently. (ActivityPub shipped a W3C Recommendation with no test suite for ~5 years; the fediverse is still paying for it.) XNet ships a language‑agnostic golden‑vector corpus alongside the spec, from day one, and re‑verifies it in CI.

The corpus lives at conformance/.

You claim conformance to a layer by reproducing that layer’s vectors byte‑for‑byte. The vectors are plain JSON { description, input, expected } — any language can load them.

SuiteLayerProves
vectors/identity/L0seed → did:key + public key
vectors/change/L1unsigned change → canonical bytes → BLAKE3 hash → Ed25519 signature
vectors/lww/L1change sequence → converged state (order‑independent)
vectors/replication/L2planned
vectors/authz/L3planned

xnet/1.0’s first corpus covers the interop kernel (L0 + L1). L2/L3 suites are tracked as XPPs.

{
"description": "First change for a Page node, fixed author seed",
"input": { "authorSeedHex": "aaaa…", "unsignedChange": { /* … */ } },
"expected": {
"authorDID": "did:key:z6Mkv1o2…",
"canonicalJson": "{\"authorDID\":\"did:key:z6Mkv1o2…\",…}",
"hash": "cid:blake3:76fdfa20…",
"signatureBase64": "UcVsz+sh…=="
}
}
Terminal window
# verify (CI drift guard)
pnpm exec vitest run --project runtime packages/runtime/src/conformance.test.ts
# the second-language proof
pip install pynacl blake3 base58
python conformance/reference/python/verify_vectors.py

Following Willow’s lightweight model, conforming implementations are tracked per layer:

ImplementationLanguageL0 identityL1 changeL1 lwwL2L3
xNet (reference)TypeScriptreferencereference
reference/pythonPython
add yours

To add your implementation, reproduce the vectors and open a PR against conformance/README.md.