Content-addressing
The artifact-level hash is a Merkle root over the composition and the section directory:
artifact_hash := SHA-256(
composition_signature ∥ // Composition signature
section_directory_canonical_form // deterministic-CBOR section directory
)
Each section additionally carries a content_hash (SHA-256 over its encoded body) when CONTENT_HASHED-flagged. Two semantically equivalent compositions produce byte-equivalent .oxbin files, hence an identical artifact_hash. This holds because every section uses deterministic encoding (RFC 8949 deterministic CBOR for structural sections) plus per-section canonical-form rules (canonicalization is part of the oxc-oxbin format contract). The payoff:
- Distributed caching — re-running
ox buildon the same inputs is a cache hit onartifact_hash. - Selective invalidation — a TBox change touches only the
eventscontent hash; downstream caches invalidate at section granularity. - Content-addressed distribution — an
.oxbincan be named by itsartifact_hashin a CAS/Nix/IPFS-style registry. - Tamper detection — any byte changed after
ox buildis caught at load.