pub struct Stats {Show 24 fields
pub vcs_schema_version: u32,
pub risk_score_version: u32,
pub long_window_days: u32,
pub recent_window_days: u32,
pub commits_long: u32,
pub commits_recent: u32,
pub churn_long: u64,
pub churn_recent: u64,
pub authors_long: u32,
pub authors_recent: u32,
pub ownership_top_share: f64,
pub burst: f64,
pub bug_fix_commits: u32,
pub security_fix_commits: u32,
pub revert_commits: u32,
pub age_days: u32,
pub last_modified_days: u32,
pub change_entropy_long: f64,
pub change_entropy_recent: f64,
pub cochange_entropy_long: f64,
pub cochange_entropy_recent: f64,
pub risk_score: f64,
pub hotspot_score: Option<f64>,
pub author_ids: Option<Vec<String>>,
}vcs-git only.Expand description
Per-file change-history metrics.
One record per tracked, non-binary, non-symlink file present at the
target ref. A tracked file with no activity in the window is emitted
with zero counts — distinct from an untracked file, which has no
vcs block at all.
All scores are ordinal: rank files by them, do not read absolute
magnitudes. The serialized shape lives in crate::wire::Vcs; this
struct is the compute-side source the wire form is projected from.
Fields§
§vcs_schema_version: u32Output-shape version (VCS_SCHEMA_VERSION).
risk_score_version: u32Composite-formula version (RISK_SCORE_VERSION).
long_window_days: u32Long window length, in days.
recent_window_days: u32Recent window length, in days.
commits_long: u32Distinct commits touching the file in the long window.
commits_recent: u32Distinct commits touching the file in the recent window.
churn_long: u64Σ(added + deleted) lines in the long window.
churn_recent: u64Σ(added + deleted) lines in the recent window.
Distinct canonical author identities in the long window.
Distinct canonical author identities in the recent window.
Top-author share of edits in the long window, in [0, 1].
burst: f64commits_recent / commits_long, clamped to [0, 1].
bug_fix_commits: u32Long-window commits whose message matched a bug-fix keyword.
security_fix_commits: u32Long-window commits whose message matched a security keyword.
revert_commits: u32Long-window commits whose subject is a revert / rollback.
age_days: u32Days since the file’s first in-window commit (capped at window).
last_modified_days: u32Days since the file’s most recent in-window commit.
change_entropy_long: f64Change entropy over the long window (Hassan 2009 History
Complexity Metric, in bits): the file’s accumulated share
Σ pᵢ·Hᵢ of the churn-distribution entropy of every commit it
took part in. Higher = the file participates in more scattered,
distributed changes. 0.0 means it only ever changed alone.
change_entropy_recent: f64Change entropy restricted to the recent window.
cochange_entropy_long: f64Co-change graph entropy over the long window (arXiv 2504.18511,
2025, in bits): the Shannon entropy of the file’s co-change
edge-weight distribution. Higher = its changes ripple across many
different partners. 0.0 is computed, not missing — the file
has no co-change neighbours (only single-file commits).
cochange_entropy_recent: f64Co-change graph entropy restricted to the recent window.
risk_score: f64Composite risk score (weighted or percentile, per options).
hotspot_score: Option<f64>Complexity × recent-churn hotspot score; Some only when AST
metrics were computed alongside the history.
SHA-256-hashed canonical author identities, sorted; Some only
under --emit-author-details.