1 utils.fingerprints

utils.fingerprints

Stable short fingerprints for configs and persisted lineage payloads.

This module provides dedicated hashes for BaseConfig, msgspec payloads, and JSON-compatible dictionaries, preserving each surface’s canonical serialization convention. It owns deterministic digest/truncation mechanics, not schema migration, semantic equivalence, authentication, or signatures.

Each helper preserves its existing serialization convention; these hashes are identity aids, not cryptographic authenticity or content-signing guarantees.

1.1 Functions

Name Description
stable_config_hash Hash a BaseConfig JSON-able dump with the existing lineage semantics.
stable_json_signature Return the existing SHA-1 signature for JSON-serializable offline metadata.
stable_msgspec_hash Hash a msgspec-serializable lineage payload.

1.1.1 stable_config_hash

utils.fingerprints.stable_config_hash(config, *, length=16)

Hash a BaseConfig JSON-able dump with the existing lineage semantics.

1.1.2 stable_json_signature

utils.fingerprints.stable_json_signature(payload)

Return the existing SHA-1 signature for JSON-serializable offline metadata.

1.1.3 stable_msgspec_hash

utils.fingerprints.stable_msgspec_hash(payload, *, length=16)

Hash a msgspec-serializable lineage payload.

Back to top