Function repo_cache_dir
pub fn repo_cache_dir(cache_root: &Path, repo_path: &Path) -> PathBufExpand description
Compute the per-repo cache subdirectory:
<cache_root>/codelore/<repo_hash_8>/
All per-repo sidecar files (gate ledger, external findings) share this
directory with the .duckdb cache entries. The 8-hex-char directory
name is sha256(canonical_repo_path)[0..4] encoded as lowercase hex.
This is the canonical implementation — cache_path_with_root and
quality_gates::ledger::ledger_dir both delegate here so the derivation
is defined in exactly one place.