Context Passport Conformance Tests
The test suite that any Context Passport implementation can run against to verify v1.0 conformance.
Specification: https://github.com/contextpassport/spec
Licensing
- Test vectors (everything under
vectors/) — CC0 1.0. SeeLICENSE-CC0. Free to use, modify, redistribute. - Runner code (everything under
runner/) — Apache-2.0. SeeLICENSE-APACHE.
What conformance means
An implementation is Context Passport v1.0 conformant if it passes every test in vectors/required/. Implementations may additionally pass tests in vectors/signed/ or vectors/recommended/ to claim stronger conformance levels.
Conformance levels
| Level | Requirements |
|---|---|
| Core | All vectors in vectors/required/ pass. The implementation can produce and consume passports that validate against schema/v1.json and compute integrity hashes correctly. |
| Signed | Core, plus all vectors in vectors/signed/ pass. The implementation produces signed passports (SPEC.md section 3.2.7) and verifies signatures correctly. |
| Full | Signed, plus all vectors in vectors/recommended/ pass. The implementation handles fork/merge lineage, extension namespacing, and forward compatibility correctly. |
Vector format
Each test vector is a JSON file with three sections:
{
"name": "v01_root_commit",
"description": "A valid root passport with no parent.",
"input": { ... passport or chain to be evaluated ... },
"expected": { ... expected verification result ... }
}
Implementations under test load the vector, perform the relevant operation, and compare output against expected.
Required vectors (Core)
v01_root_commit.json— Valid root passport with no parent.v02_chained_commit.json— Child passport with linked parent.v03_canonical_payload.json— Two key-orderings produce identical hashes.v04_broken_chain.json— Tampered payload is detected.v05_schema_version.json— Missingschema_versionis rejected.v06_unknown_extension.json— Unknown namespaced field is accepted and ignored.
Signed vectors
v07_ed25519_valid.json— Valid Ed25519 signature verifies.v08_ed25519_tampered.json— Modified payload fails signature verification.v09_signature_canonicalization.json— Signature is over canonical bytes with signature field cleared.
Recommended vectors
v10_fork_lineage.json— Fork populates lineage fields.v11_event_types.json— All event types accepted.v12_long_chain.json— 100-commit chain verifies.
Running the suite
Install the runner
pip install context-passport-conformance context-passport
This installs the context-passport-conformance CLI plus the reference Python implementation it tests against.
Run it
From a checkout of this repository:
context-passport-conformance --level core
context-passport-conformance --level signed
If you installed via pip (vectors not next to the runner), point at a vectors directory:
git clone https://github.com/contextpassport/conformance-tests.git
context-passport-conformance --vectors-dir conformance-tests/vectors --level signed
Test a different implementation
context-passport-conformance --implementation <module_name> --level core
The implementation must expose payload_hash, integrity_hash, verify_chain, and (for signed conformance) verify_signature with the same signatures as the reference implementation.
Implementations in other languages should ship their own runners that load each vector JSON and report pass/fail against expected. The vectors are CC0 — copy them freely.
Conformance badge
Implementations that pass all required vectors may self-declare:
Context Passport v1.0 Core Conformant
This is self-attestation. Independent verification is encouraged but not required.
Contributing
Open a pull request adding a new vector under the appropriate directory. Vectors should:
- Test one specific behavior
- Include clear
expectedoutput - Be reproducible across implementations
- Follow the naming convention
vNN_short_description.json
See CONTRIBUTING.md in the spec repository for general guidelines.
Metadata
Release files for context-passport-conformance 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| context_passport_conformance-1.1.0.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| context_passport_conformance-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.3 kB
Release files / context_passport_conformance-1.1.0.tar.gz
| Download URL | context_passport_conformance-1.1.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e9b538e630e2067ddf927678a5889b8ae115fffdec0cb3f9f1bded807615d85
|
|
BLAKE2b-256 checksum How to use checksums |
5bc7ada76479bddf38419675b9904628dbd3cb12b4063653826790c75da0c5d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / context_passport_conformance-1.1.0-py3-none-any.whl
| Download URL | context_passport_conformance-1.1.0-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfc9f6ef448858829ccb67ef3502cc2d3667e8575b98afdd056369db94ae565f
|
|
BLAKE2b-256 checksum How to use checksums |
3af4654687e8b13de5da826d32308b71285d37f72014743734e68f72bd479ae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|