pub fn score(
features: &JitFeatures,
purpose: JitPurpose,
) -> (f64, JitContributions)Available on crate feature
vcs-git only.Expand description
Compute the composite JIT risk score and its per-group breakdown.
The term weights and signs come from the JIT literature (see the module docs): size, diffusion, and history are positively signed; experience is negative (experienced authors induce fewer defects); purpose adds for fixes and subtracts for reverts. The contributions sum to the score before the final non-negative floor.
The f64 casts of count fields are exact for every realistic input
(counts never approach 2^53) and the score is ordinal, so the
precision lint is allowed locally.