Data Invariants

Data Invariants

Record data invariants and evidence for their enforcement.

Status: Partial implementation reference — Code-confirmed; operational validation pending

Last reviewed: 2026-10-19

Scope

Candidate and confirmed constraints, enforcement locations, tests and counterexamples. The source-confirmed baseline below covers part of this scope; remaining operational details are unknown.

Current implementation baseline

The Corpus schema uses triggers to reject updates/deletes of messages, changes, relationship assertions and retractions; protect conversation root identity; enforce retraction ownership; attach archive membership; reject oversized serialized events; and protect identity/certificate state. Handler/store validation adds constraints beyond SQL.

Sequence positions can have gaps. A count, maximum sequence or materializer result does not prove complete recovery coverage. Public archive certificates enumerate committed prefix membership; private retry mappings are excluded from public archives.

Evidence: write batches, relationship store, public archive and test specification. Source inspection does not establish operator compliance or protection against privileged database replacement.