test: verify evidence score migration

This commit is contained in:
Dandaedre 2026-09-29 21:11:43 +02:00
parent 95d4067dc8
commit c12b6b8551
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
3 changed files with 31 additions and 1 deletions

View File

@ -6,3 +6,12 @@ coverage = 92.19
[last_run_clean.run_duration]
secs = 29
nanos = 350250460
[last_run_incremental]
run_status = "Success"
lines_parsed = 338
coverage = 92.19
[last_run_incremental.run_duration]
secs = 19
nanos = 900243697

View File

@ -86,4 +86,20 @@ mod tests {
assert_eq!(analysis.findings.len(), 1);
assert_eq!(analysis.findings[0].fix.as_ref(), edits.first());
}
#[test]
#[allow(deprecated)]
fn legacy_score_type_aliases_remain_source_compatible() {
let score: Confidence = EvidenceScore::from_score(42);
let band: ConfidenceBand = EvidenceBand::Medium;
let thresholds: ConfidenceThresholds = EvidenceThresholds {
low: 20,
medium: 50,
high: 75,
};
assert_eq!(score.score(), 42);
assert_eq!(band, EvidenceBand::Medium);
assert_eq!(thresholds.low, 20);
}
}

View File

@ -301,7 +301,7 @@ Optional follow-up, intentionally not required for this milestone:
- [x] Publish the low-care evidence-score wording across terminal output,
examples, and documentation; rename `--fail-confidence` to `--fail-score` and
version the JSON field rename as schema version 2.
- [ ] Run the complete quality and coverage gates, refresh generated badges, and
- [x] Run the complete quality and coverage gates, refresh generated badges, and
record the compatibility boundary and unchanged scoring formula.
Acceptance: every active user-facing contract describes the metric as a bounded
@ -310,6 +310,11 @@ legacy type and CLI names remain usable with clear migration guidance; JSON
consumers can identify the field rename by schema version; scoring results are
unchanged; and all quality/coverage gates pass.
Accepted on 2026-09-29: all-feature and minimal-feature suites, formatting,
Clippy, and documentation pass; deprecated Rust aliases and the legacy CLI alias
are covered; Tarpaulin remains at 92.19% (1,334/1,447 lines) against the 90%
floor; and the generated badges are current.
## Deferred by design
- Statistical or model-based authorship classification.