Repository navigation
ci: One Python call runs each compatibility validator step (GEN-005, #2692) - #2694
Merged
Merged
Conversation
…-005, #2692) RED: the module does not exist, both `run:` steps in `.github/actions/compatibility-validator/action.yaml` are still shell blocks, and the GEN-005 [[exceptions]] block is still in ci.toml. 11 failures + 2 errors on master.
…2692) `compatibility-validator/action.yaml` carried two multi-line `run:` blocks -- the Windows runner guard and the schema check -- so it produced two GEN-005 findings, and the exception is path-scoped: the block leaves ci.toml only when both are gone. `ci/compatibility_validate.py` (stdlib only, `uv run --no-project --script`) now serves both steps: `guard --notice` prints the notice and exits 2 (the action's own `if: runner.os == 'Windows'` selects it), and `validate <files>` runs `.github/scripts/utils.py/check-jsonschema.py` through `uv run --no-project --with jsonschema --with json_source_map`, returning its status inside `::group::Schema Validation`/`::endgroup::`. Two visible changes: `Set Up uv` moves above the guard (the guard now calls uv, which a Windows runner has not installed on its own), and the two files are named explicitly in place of the `@(compatibility|package)` extglob -- `shopt -s extglob` was the step's only shell dependency. GREEN: ci/test_compatibility_validator.py 15 OK (RED was 11 failures + 2 errors on the test-only commit), ci/test_ci_toml.py 41 OK, ci/test_uv_run.py 5 OK, ruff clean, `ci-lint precheck` 489 -> 487 approved exceptions with no compatibility-validator finding left.
Member
Author
|
Handed off to the coordinator. All checks green, queued to merge ( |
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2692.
.github/actions/compatibility-validator/action.yamlcarried two multi-linerun:blocks, so it produced two GEN-005 findings (the exception is path-scoped: the block leavesci.tomlonly when both are gone).RED
dea36b6ba— the test onlyci/test_compatibility_validator.py, 15 tests: 11 failures + 2 errors on this commit (the module does not exist, both steps are stillrun: |blocks, and the GEN-005 exception is still inci.toml).It pins:
guard: prints::notice::<reason>and exits 2, and--noticeis required;validate: the checker's status for a valid file (0), a property-level schema violation (1, plusvalidation_errors.jsonwritten for the annotations step) and a missing file (2), against real fixtures with a local schema;plugins/win-capture/data/compatibility.jsonandpackage.jsonboth pass;::group::Schema Validation/::endgroup::;run:, no shell control syntax,astral-sh/setup-uvinstalled before both calls, the module path absolute so a customworkingDirectorystill resolves it, and the schema step keeps itsworking-directory;[[exceptions]]block left for the action.GREEN
a38b4c73b— the portci/compatibility_validate.py(#!/usr/bin/env -S uv run --no-project --script, standard library only):echo+exit 2shell block… guard --notice "…"::group::+shopt -s extglob+uv run --no-project --with jsonschema --with json_source_map .github/scripts/utils.py/check-jsonschema.py … '@(compatibility|package).json'… validate plugins/win-capture/data/compatibility.json plugins/win-capture/data/package.jsonTwo deliberate differences, both visible in the diff:
Set Up uvmoves above the guard. The guard used to run first as plain shell; it now callsuv, which a Windows runner does not have on its own. It still fails an unsupported runner (exit 2 + notice) before the check runs.@(compatibility|package)extglob becomes two explicit paths (andshopt -s extglobgoes with it). The checker, its two--withdependencies,--loglevel INFO,PYTHONUNBUFFERED=1and the::group::brackets are all unchanged.Evidence
ci/test_compatibility_validator.py: 15 OK on GREEN.ci-lint precheck(uvx --from git+…ci.yml@a1917ce7 ci-lint precheck) before:11 violation(s), 489 approved exception(s), 10 needs_review→ after:11 violation(s), 487 approved exception(s), 10 needs_review, nocompatibility-validatorfinding left.ci/test_ci_toml.py41 tests OK,ci/test_uv_run.py5 tests OK,ruff checkclean..github/workflows/ci.yml(Validate Data 🕵️) and.github/workflows/push.yaml(Validate Data 🕵️), both on a Linux runner with the action's ownsetup-uv, so PR CI exercises the check path for real.docs/features.mdline: build tooling only.Noticed, left alone: the guard's notice text says "services-validation action requires a macOS-based or Linux-based runner." (copied from
services-validator), and the checker logs a root-level violation (a missing required key) without exiting non-zero — it only records violations whoseabsolute_pathis non-empty. Both are pre-existing.