Metakit / @doeixd/metakit/artifact
operationFingerprint
function · packages/metakit/src/artifactCanonical.ts:324
function operationFingerprint(
op: AnyDerivedOperation,
): Effect.Effect<OperationFingerprint, Unhashable | EncodeError>The definition hash (sha256:<hex>, domain metakit/operation@1) of a
derived operation: what decides a call's outcome. That is its parameters'
names and interfaces in argument order, its result's interface, its null
rule, its where clauses, the intermediate checks a composed function
makes, and its body, each expression as Artifact.fingerprint holds one.
A call to it holds this hash, so a changed body changes every caller's
fingerprint. Its id, version, claims and ensures are not covered: a
renamed operation keeps its hash.
Fails with Unhashable where the definition holds what an expression's
fingerprint refuses, or ('cycle') calls itself through its references.