graflo.architecture.evolution.hashing¶
Content hashes over manifest blocks.
Lives at L4 rather than in migrate (L6) because the revision chain needs to
verify a replayed manifest, and architecture.evolution may not import
migrate. migrate.io re-exports these, which is where they have always
been imported from.
Every hash is SHA-256 over :func:~graflo.architecture.evolution.canonicalize.canonical_payload,
so two manifests that differ only in default-valued fields, key order, or the
order of an order-insignificant list hash equal. CANON_VERSION is mixed into
the hashed bytes: a future change to the canonicalization rules produces
different hashes by construction rather than reinterpreting old ones.
Attributes¶
Functions:¶
full_hash(schema, ingestion_model, bindings)
¶
Stable hash over a merged deployment object.
Source code in graflo/architecture/evolution/hashing.py
graph_hash(schema)
¶
ingestion_hash(ingestion_model)
¶
manifest_hash(manifest)
¶
Stable hash over all three manifest blocks.
This is the identity a revision chain verifies against: replaying a chain from its base must reproduce the recorded hash at every step.
Source code in graflo/architecture/evolution/hashing.py
schema_hash(schema)
¶
Stable hash over the schema deployment contract (graph + DB profile).
metadata is deliberately excluded: name, semver and description are how
a schema is labelled, not what it is, and a content address that moves
when the version bumps cannot recognise that two versions carry identical
content. :func:manifest_hash excludes it for the same reason.
Source code in graflo/architecture/evolution/hashing.py
stable_hash(payload_obj)
¶
SHA-256 over a canonical JSON rendering of payload_obj.
The canonicalization version is part of the hashed bytes, not a wrapper around them, so it cannot be stripped by a caller that re-serializes.