PhotoCraft: An open-source, photo editor written by scratch in pure Rust
fix(xtask): the scorecard's performance summary no longer counts not-run scenarios as tracked (#947) (#1705)
MarekSpodBiedry2feaf055cca8
diff --git a/docs/scorecard.md b/docs/scorecard.mdindex 00a708014..e792220b9 100644--- a/docs/scorecard.md+++ b/docs/scorecard.md@@ -6,7 +6,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js| Area | Done | Partial | Missing | Key numbers ||---|---:|---:|---:|---|-| [Performance](#performance) | 3 | 22 | 13 | 47 scenarios: 3 within budget, 22 over budget or failing, 15 tracked only, 6 not run, 7 not measurable yet (baseline 2026-10-05) |+| [Performance](#performance) | 3 | 22 | 13 | 47 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 6 not run, 7 not measurable yet (baseline 2026-10-05) || [File compatibility](#file-compatibility) | 4 | 12 | 11 | io corpus: oracle ≥ 146/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 236/309, round trip ≥ 307/309; photoshop oracles: oracle ≥ 133/256, round trip ≥ 258/256 || [Tools](#tools) | 11 | 14 | 8 | || [Workspace and UI](#workspace-and-ui) | 0 | 7 | 16 | settings that do nothing: 55 of 141 (target 0) |diff --git a/xtask/src/perf.rs b/xtask/src/perf.rsindex ac9fa993b..d2a3a75b8 100644--- a/xtask/src/perf.rs+++ b/xtask/src/perf.rs@@ -459,14 +459,16 @@ pub fn render_table(outcomes: &[Outcome], with_baseline: bool) -> String {}/// Counts for the scorecard summary: (within budget, over budget or failing, tracked only, not measurable).+/// Not-run scenarios are in none of them; the scorecard counts those separately.pub fn counts(outcomes: &[Outcome]) -> (usize, usize, usize, usize) {let mut c = (0, 0, 0, 0);for o in outcomes {match o.status {Status::Pass => c.0 += 1,Status::Over | Status::Broken | Status::Regressed | Status::Missing(_) => c.1 += 1,+ Status::Tracked => c.2 += 1,Status::NotMeasurable(_) => c.3 += 1,- _ => c.2 += 1,+ Status::NotRun => {}}}c@@ -1039,6 +1041,7 @@ not_measurable = "needs a frame harness"let out = evaluate(&b, &BTreeMap::new(), None, 15.0, true);assert_eq!(out[0].status, Status::NotRun);assert!(!out[0].status.fails());+ assert_eq!(counts(&out), (0, 0, 0, 1), "not-run scenarios are not tracked; the scorecard counts them separately");}#[test]