Expand description
Shared contract-test suite.
Every adapter imports and runs this suite against its own implementation as part of CI. It enforces the parts of the port contract that need no live database — determinism of canonical serialization, lossless roundtrips, volatile segregation, manifest honesty, and completeness of a constructed extraction.
Adapters also carry their own integration and determinism tests against a
real fixture database (see ARCHITECTURE.md §7); this module covers what
core can prove without one.
Functions§
- assert_
canonical_ deterministic - Assert that canonical serialization is byte-stable: two serializations of identical input must produce identical bytes.
- assert_
manifest_ valid - Assert a manifest passes its own self-consistency checks (unique expectations, sane backend identity, valid paths).
- assert_
serialization_ roundtrip - Assert that canonical bytes deserialize back to a semantically identical value — the envelope, each entity, and the volatile section must all survive the roundtrip.
- assert_
verification_ complete - Assert an extraction verifies against its manifest with zero
Error-severity findings. - assert_
volatile_ segregation - Assert the volatile-segregation contract: every manifest-volatile field must appear in the volatile section for every existing row, and must not leak into the config body.
- sample_
manifest - A manifest that matches
sample_realmand passes verification. - sample_
realm - A small, representative extraction used to exercise this suite (and useful to adapters for bridging their own data into the canonical shape).