Skip to main content

graph_hash

Function graph_hash 

Source
pub fn graph_hash(graph: &Graph) -> Result<String, EngineError>
Expand description

Computes a graph document’s content hash: sha256: over its canonical JSON, the exact string recorded in GraphRunStarted.

Reuses salvor-runtime’s canonical hashing (the same story behind agent_def_hash and request_hash), so a graph run’s graph_hash is reproducible and matches whatever a control plane computes for the same document.

§Errors

EngineError::GraphEncode if the document cannot be serialized (it always can; the edge is kept honest rather than panicking).