a11y audit: hold the machine-dependent Media Browser scenario to its upper bound

The Media Browser opens on the home folder, so a runner with fewer files finds fewer controls and
the 'improved, lower the entry' check failed in CI. The entry stays an upper bound.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
vangel76andClaude Sonnet 5.5 committed 2026-10-26 19:21:46 +01:00
1 parent aa833d7dca
commit 7761779c70
1 file changed
+6 -1
@@ -27,6 +27,11 @@ use serde_json::json;
/// Groups that must be clean. A group is the first part of a scenario name (before the `:`).
const FIXED: &[&str] = &["EffectsPresets", "Settings", "RenderQueue", "Project"];
/// Scenarios whose content is the machine's own folder listing (the Media Browser opens on the
/// home folder), so a runner with fewer files finds fewer controls. They are held to the upper bound
/// only: the "improved, lower the entry" check would fail on any machine with a different home.
const MACHINE_DEPENDENT: &[&str] = &["MediaBrowser:default"];
/// (scenario, findings, of them unnamed controls) per not-yet-fixed scenario, as measured in the
/// shared docking layout (Effect Controls with one Gaussian Blur on the layer, every other panel
/// as it opens). A ratchet: a number may only go down, never up; when a pass over a panel lowers
@@ -383,7 +388,7 @@ fn fixed_panels_have_no_unnamed_or_roleless_controls_and_the_others_do_not_get_w
let (allowed, allowed_unnamed) = BASELINE.iter().find(|(k, ..)| k == name).map_or((0, 0), |(_, v, u)| (*v, *u));
if *n > allowed || *unnamed > allowed_unnamed {
off.push(format!("{name}: {n} findings ({unnamed} unnamed), the baseline allows {allowed} ({allowed_unnamed}); a panel must not get worse"));
} else if *n < allowed || *unnamed < allowed_unnamed {
} else if (*n < allowed || *unnamed < allowed_unnamed) && !MACHINE_DEPENDENT.contains(&name.as_str()) {
off.push(format!("{name}: improved to {n} findings ({unnamed} unnamed); lower its BASELINE entry to ({n}, {unnamed})"));
}
}