Skip to main content

Module integrity

Module integrity 

Source
Expand description

Hash implementation for AI process objects.

This module defines IntegrityHash, which is used for integrity verification and deduplication of AI objects (Artifacts, Headers, etc.).

§Why not ObjectHash?

We avoid using git_internal::hash::ObjectHash here because:

  1. ObjectHash implies Git content addressing (SHA-1 or SHA-256 depending on repo config).
  2. IntegrityHash always uses SHA-256 for consistent integrity checks regardless of the underlying Git repository format.
  3. This separation prevents accidental usage of integrity checksums as Git object IDs.

Structs§

IntegrityHash
A SHA-256 hash used for integrity verification.

Functions§

compute_integrity_hash
Compute canonical JSON hash.