graflo.migrate.io¶
I/O utilities for migration workflows.
Attributes¶
__all__ = ['full_hash', 'graph_hash', 'ingestion_hash', 'load_ingestion_model', 'load_manifest', 'load_schema', 'manifest_hash', 'plan_to_json_serializable', 'schema_hash', 'stable_hash']
module-attribute
¶
Classes¶
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)
¶
load_ingestion_model(path, schema=None)
¶
Load ingestion block from a manifest path.
Source code in graflo/migrate/io.py
load_manifest(path)
¶
Load and initialize graph manifest from YAML path.
load_schema(path)
¶
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
plan_to_json_serializable(plan)
¶
Convert pydantic plan-like object to JSON payload.
Source code in graflo/migrate/io.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.