Function build_change_set_report
pub fn build_change_set_report<R: Repo>(
db: &FactsDb,
repo: &R,
opts: &Options,
cache_root: &Path,
) -> Result<ChangeSetReport>Expand description
Build the full change-set report for the current working tree vs HEAD.
Enumerates the tracked changes itself via crate::Repo::worktree_changes,
then runs the health projection, the cycle splice, and the coupling-absence
scan, and assembles the advisory findings. The whole report is memoised in
a content-keyed JSON sidecar under cache_root: a hit is returned as-is
except for merge_in_progress, which is recomputed because it is repo
state rather than measured content. Thresholds and calibration are
deliberately NOT part of the cache key — the report stores measured data
only, and consumers re-evaluate verdicts on every read.
§Errors
Propagates repo errors (including the unmerged-paths refusal from
worktree_changes), fact-store / SQL errors as
CodeLoreError::Analysis, and working-tree read failures.