Skip to content

Scope the workflow scan to the matrix block, so on: branches is not a dimension - #885

Merged
m-reuter merged 1 commit into
Deep-MI:devfrom
m-reuter:lint-guard-scope
Sep 15, 2026
Merged

m-reuter merged 1 commit into
Deep-MI:devfrom
m-reuter:lint-guard-scope

Conversation

@m-reuter

Copy link
Copy Markdown
Member

Follow-up to the test reorganisation, left out of that PR by accident.

test_every_test_dir_runs.py searched the whole workflow file for key: [a, b] to find matrix
dimensions, so branches: [dev] under on: counted as one. It did not produce a false pass,
because the intersection with the include keys was {tests} either way, but a future include
entry keyed on something that also appears as a list elsewhere in the file would have slipped
through, and this file exists to catch exactly that class of silent gap.

Both scans are now scoped to their block through a shared _block() helper, which also removes
the duplicated indentation walking.

Verified: matrix dimensions is now ['pytest-flags', 'tests'] rather than including
branches. Re-checked against the two failure modes: deleting the tests: dimension still fails
test_directory_is_run_by_ci[image] and the matrix-shape test, and a directory no workflow runs
is still reported as uncovered. 98 tests pass, ruff clean.

@m-reuter
m-reuter merged commit ffe8da1 into Deep-MI:dev Sep 15, 2026
5 checks passed
@m-reuter
m-reuter deleted the lint-guard-scope branch September 15, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant