pub struct JitDiffReport {
pub jit_schema_version: u32,
pub jit_score_version: u32,
pub source: JitSource,
pub partial_risk_score: f64,
pub size: JitSize,
pub diffusion: JitDiffusion,
pub contributions: JitDiffContributions,
}vcs-git only.Expand description
The result of scoring an arbitrary unified diff (issue #580).
A bare diff carries no author, parent, or file history, so only the size and diffusion feature groups are computable. The history, experience, and purpose groups have no input and are therefore absent from this type entirely — not present as zero. This is the whole point of a distinct report shape: a consumer cannot read an unavailable group as “low risk”, because there is no field to read (the failure mode #580 warns about).
§Not comparable to a commit score
partial_risk_score sums only the
size and diffusion contributions (both ≥ 0) and omits history,
experience, and purpose. The full JitReport::risk_score folds those
in, but the experience group is negatively signed (an experienced
author subtracts from the total), so the full commit score is not
strictly greater than the partial diff score — an experienced author can
push it below the partial value. The two scores are therefore not
ordered or comparable: they live on different scales. Rank diffs
against other diffs, never against commit scores.
The source field is a permanent "diff" marker so a serialized
report is self-identifying.
Field order keeps every top-level scalar before the nested tables so the report serializes cleanly to TOML.
Fields§
§jit_schema_version: u32Output-shape version (JIT_SCHEMA_VERSION). Shared with
JitReport so both jit shapes version together.
jit_score_version: u32Composite-formula version (JIT_SCORE_VERSION).
source: JitSourcePermanent discriminator: always JitSource::Diff. Distinguishes a
diff-only report from a commit report at a glance in JSON / YAML.
partial_risk_score: f64The partial (size + diffusion only) ordinal score. Not comparable
to JitReport::risk_score — see the type docs.
size: JitSizeSize of the change. Computable from a bare diff.
diffusion: JitDiffusionSpread of the change. Computable from a bare diff.
contributions: JitDiffContributionsThe two available contributions (size, diffusion). History, experience, and purpose contributions are absent because their inputs are absent.
Trait Implementations§
Source§impl Clone for JitDiffReport
impl Clone for JitDiffReport
Source§fn clone(&self) -> JitDiffReport
fn clone(&self) -> JitDiffReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more