05 Conformance

A claim you can check

“CGP conformant” means green on contextgraph-conformance for your declared capability set — a checkable claim, not a self-attestation.

The seven checks

Table 4 — Conformance checks. Checks skip when a capability is not declared; skips are reported, never silent.
CheckProves
handshakeCompletes the handshake with non-empty identity and capabilities.
consent-scopeEgress scopes are truthful and consistent with data_flow.egress.
frame-validityEvery frame: score ∈ [0,1], non-empty title and citation label, well-formed timestamps and digests.
verify-honestyA verify-capable provider answers by comparing digests — it never rubber-stamps valid.
budget-honestyCanonical token_cost, sum ≤ max_tokens, count ≤ max_frames.
shutdown-cleanTears down on shutdown without error.
malformed-input-toleranceA garbage line is ignored or errored — never a crash (stdio only).

The RED suite: proving the suite itself

A suite that only ever passes proves nothing about its ability to catch a broken provider. The bundled reference provider ships fourteen --misbehave modes, each breaking exactly one guarantee — lying about costs, under-reporting budget, flooding past max_frames, dropping correlation ids, rubber-stamping verification, declaring false egress scopes — and CI asserts every mode is caught by at least one check. The mode list is discovered from the binary’s own --help, so adding a misbehaviour without a catching check turns CI red.

Probing a provider

contextgraph-inspect is an interactive prober, analogous to MCP’s inspector. It prints negotiated capabilities, optionally fires a test query, runs the full suite, and exits non-zero when non-conformant — CI-friendly by construction.

contextgraph-inspectshell
contextgraph-inspect stdio -- ./your-provider
contextgraph-inspect stdio --json -- ./your-provider
contextgraph-inspect stdio --query "goal text" -- ./your-provider
contextgraph-inspect http https://my-provider.example.com/contextgraph

External implementations — any language — are validated by pointing the same Rust oracle at the binary:

Validate an external providershell
cargo build --workspace --bins
./.github/scripts/conformance-external.sh -- node dist/examples/example-docs.js

Golden fixtures

Cross-language byte-exactness rests on golden fixtures: five JSON files plus a manifest, published for fixture profile 1.1.0. Each fixture carries the source object, the digest-profile-normalized object, the exact RFC 8785 (JCS) canonical UTF-8 text, and the SHA-256 of those canonical bytes. The manifest pins the protocol and profile versions, records the generation command, and carries a digest for every other file — so a fixture can’t drift silently.

Honest gaps, declared. The spec lists what the suite cannot check — host-binding rules like consent gating and budget-liar dropping, and content-byte matching beyond digest grammar — because a conformance suite that quietly omitted the rules it cannot check would be exactly the self-attestation the project rejects.