Content hash of the node's ``source_file``, or '' if unavailable. Coarse on purpose — a file-level hash over-flags (any edit to the file marks every node in it stale) rather than under-flags, which is the safe direction for a "re-verify" hint.
(node: dict[str, Any] | None, graph_path: Path)
| 727 | |
| 728 | |
| 729 | def _code_fingerprint(node: dict[str, Any] | None, graph_path: Path) -> str: |
| 730 | """Content hash of the node's ``source_file``, or '' if unavailable. |
| 731 | |
| 732 | Coarse on purpose — a file-level hash over-flags (any edit to the file marks |
| 733 | every node in it stale) rather than under-flags, which is the safe direction |
| 734 | for a "re-verify" hint. |
| 735 | """ |
| 736 | if not node: |
| 737 | return "" |
| 738 | sp = _resolve_source_path(node.get("source_file") or "", graph_path) |
| 739 | return _content_hash(sp) if sp is not None else "" |
| 740 | |
| 741 | |
| 742 | def _provenance_for(node: str, prov_map: dict[str, list], |