Skip to main content

document_signature

Function document_signature 

Source
pub fn document_signature(doc_json: &str) -> String
Expand description

A STABLE content signature of a document: a sorted-key JSON walk hashed with the (fixed-key, cross-process-deterministic) std SipHash. The ONE signature fn, at the ENGINE altitude so app-side and engine-side writers share one copy: the app’s insert flow (panels::file), the edit-in-place Finish (panels::assembly_edit::refresh_library_entry) and the update-components comparison (panels::update_components) all write/compare a parts-library sourceSignature with THIS function — a freshly inserted, unchanged part must always compare up-to-date, which a second copy would break the moment either drifted. (Distinct from the kernel’s parts_library::stable_json_hash, which is an in-memory doc_hash for the per-feature fingerprint hook.)