CharterAgreementProtocol. SpecificationIdentity
(Charter Agreement Protocol v0.1.0)
Copy Markdown
View Source
CAP never authorizes.
Canonical self-delimiting manifest over the normative specification set: per file, the sorted relative path, the byte length, and the raw SHA-256, hashed under the specification digest domain. The release candidate gate pins the recorded digest; any spec byte change without re-recording fails the gate.
Summary
Functions
Hash the canonical manifest under the specification domain.
Build the canonical manifest bytes for a specification file set.
Functions
@spec digest([{binary(), binary()}]) :: CharterAgreementProtocol.Digest.t()
Hash the canonical manifest under the specification domain.
Build the canonical manifest bytes for a specification file set.
Each entry is path, a null byte, the decimal byte length, a null byte,
and the 32-byte raw SHA-256 — self-delimiting in every component. Paths
containing a null byte are rejected loudly: a NUL-bearing path can forge
another file set's manifest bytes, so ambiguity is refused at the input,
not hashed.