Function evaluate_new_code_rows
pub fn evaluate_new_code_rows(
cfg: &NewCodeGates,
scope: &NewCodeScope,
) -> Vec<GateViolation>Expand description
Pure inner comparison for the two-band [new_code] gate over a
NewCodeScope.
Two independent bands, each evaluated only when the config enables it:
born_health_min— one violation per born-in-window file whose HEAD code-health score is below the floor (strict<, mirroringcode_health_min). Skipped whenborn_health_minis absent.touched_no_degradation— one violation per touched-but-not-born file whose net window health movement is negative. The fail test isnet < -f64::EPSILON, so a file that held steady — the typo-fix case that nets exactly zero — passes; only a genuine net-degradation fails. Thef64::EPSILONguard is the gate layer’s established float-noise band (the same oneratchetuses); the semantic noise immunity comes from the delta-health banding upstream, which nets sub-risk-band churn to zero. Skipped whentouched_no_degradationis off.
Each violation’s gate names its band, so the rendered message discloses
which obligation a file missed (“born in window” vs “net … over Nd”). A noop
(empty) when neither band is enabled or the scope is empty (including the
shallow-history skip, which yields empty born/touched).