Skip to main content

diff_finding_hash

Function diff_finding_hash 

pub fn diff_finding_hash(rule: &str, path: &str, discriminant: &str) -> String
Expand description

The partialFingerprints.diffFinding/v1 value for a codelore diff result: sha256("<rule>|<path>|<discriminant>").

The diff-domain identity key. Its parts are all stable across re-runs of the same diff — the rule id, the repo-relative path, and a per-finding discriminant (the diff classification, or the specific function/clone that makes two results on one path distinct). It deliberately omits base/head SHAs and numeric scores so the same finding keeps its identity as a PR’s commits and metrics move, letting GitHub coalesce re-uploads of an unchanged finding.