From b0bf59572ae233cfda725ec7937390e80ba93f99 Mon Sep 17 00:00:00 2001 From: Hussein Adeiza Yunusa Date: Mon, 19 Oct 2026 13:28:46 +0200 Subject: [PATCH] fix(compatibility): treat from_versions annotations as lower bounds, not upper bounds `_test_should_be_run` compared the annotated `Test:from_versions` entry against the target version with the inequality reversed, making each annotation behave as an upper bound for its release line instead of the documented "supported from this version" lower bound. For `TestFeature:from_versions: v8.7.1,v10.0.1`: - before: v8.7.0 runs, v8.7.2 skipped (v10 line likewise) - after: v8.7.0 skipped, v8.7.1 and v8.7.2 run So the generator previously ran tests against release lines/patches that never declared support while skipping later patches that did. Comparison per listed line is now `test_semver_version >= annotated_version`; unlisted lines remain excluded and explicit skip annotations are untouched. Verified with the eight boundary cases from issue #9118 (all pass with the fix; four fail without it). Signed-off-by: Hussein Adeiza Yunusa --- scripts/generate-compatibility-json.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/generate-compatibility-json.py b/scripts/generate-compatibility-json.py index 419a6bf890..e43a531b80 100755 --- a/scripts/generate-compatibility-json.py +++ b/scripts/generate-compatibility-json.py @@ -232,9 +232,10 @@ def _test_should_be_run(test_name: str, version: str, file_fields: Dict) -> bool for v in specified_versions: semver_v = parse_version(v) # if the major and minor versions match, there was a specified release line for this version. - # do a comparison on that version to determine if the test should run. + # the annotated version is the first supported version on that line, so the test + # runs for this version and any later patch on the same line. if semver_v.major == test_semver_version.major and semver_v.minor == test_semver_version.minor: - return semver_v >= test_semver_version + return test_semver_version >= semver_v # there was no version defined for this version's release line, but there were versions specified for other release # lines, we assume we should not be running the test.