pub fn compute_file_semantic_digest(
scaffold_hash: ContentHash,
symbols: &[SymbolEntry],
) -> ContentHashExpand description
Compute a file node’s semantic_digest over its scaffold and (already
sorted) symbols — so the digest covers ALL of a file’s semantic content,
not just its extracted definitions.
Canonical layout hd-sem-file-v2: scaffold_hash, then per symbol
u32-LE(container element count) ‖ (u32-LE-len ‖ bytes)* ‖ u32-LE(name len) ‖ name ‖ kind_tag ‖ semantic_hash. Every variable-length field is
length-framed (no record-boundary ambiguity; ["a::b"] no longer aliases
["a","b"]). Spans are EXCLUDED — that is what makes the digest
reformat-stable.