Mondaic

salvus.flow.acta.fingerprint

salvus.flow.acta.fingerprint salvus flow acta fingerprint

Task fingerprints from source code and referenced functions.

User functions and classes are hashed recursively. Standard-library, installed third-party, and Acta references are excluded from source traversal. Compiled tasks use the extension file’s digest; other tasks without readable source require an explicit impl.

Functions

clear_extension_digest_cache()

def clear_extension_digest_cache() -> None: ...

Clear cached extension-module digests.

Returns None

fingerprint()

def fingerprint(
    fn: Callable[..., object], depends_on: Sequence[Callable[..., object]] = ()
) -> Fingerprint: ...

Return the reference-graph fingerprint of a function.

This is a registration snapshot. Re-register after changing captured state. Salvus and locally defined helpers are followed recursively; standard-library, third-party and Acta callables contribute their names. Static module attributes, live defaults, closures, declared class data and method implementations are included. Unsupported state requires an explicit input, a deterministic serializer or a pinned impl.

Parameters
  • fn Callable[..., object] — Function to fingerprint, unwrapped through functools.wraps.
  • depends_on Sequence[Callable[..., object]] — Additional callables to include, such as dynamically resolved tasks.
Returns Fingerprint — The digest, plus the per-node breakdown behind it.

Classes

Fingerprint

class Fingerprint(builtins.object):
    def __init__(self, digest: str, parts: Mapping[str, str]) -> None: ...

A task’s source fingerprint and component digests.

Parameters
  • digest str — Fingerprint stored as the envelope’s salt.
  • parts Mapping[str, str] — Qualified names and digests of source nodes included in the hash.