Repository navigation
fix(checks): derive preflight's gate matrix from every workflow that calls testing-conventions - #983
Merged
Merged
Conversation
`just preflight` dies with a bare FileNotFoundError: the command still defaults `--conventions` to `.github/workflows/conventions.yml`, which #861 deleted when the #834 epic split it into six per-domain workflows. Pointing the default at one survivor would trade the crash for a green run covering one of eight lanes, so the matrix has to come from every caller in `.github/workflows/`. The colocated unit tests feed `parse_gate_matrix` inline YAML, so none of them can see that the default target stopped existing. These read the repo's own workflows instead: * integration: the command with its real defaults must cover every job that calls the reusable workflow, spanning every file that holds one, and must name a missing `--conventions` target rather than raise. * e2e: the packaged console script from the repo root, same two properties. Nothing ran internals/checks' integration tier in CI, which is why the tier that reads real workflow files could not have caught the rename; internals-checks-ci now runs it. Refs #973
This was referenced Aug 20, 2026
…orkflow `--conventions` becomes repeatable and defaults to nothing: with no workflow named, every file in `.github/workflows/` that calls the reusable workflow is discovered, and the matrix is the concatenation of their callers -- 40 pairs across 8 scan roots in 6 workflows today, where the old default named a file #861 deleted and resolved to 0. Discovery rather than a list of six names for the same reason #781 derived the pairs from the workflow in the first place: a name is a restatement that the next rename invalidates, and the failure it produces is silent (a green run covering one lane) or fatal (a bare FileNotFoundError from `just preflight`). Both unresolvable cases now name the fix, per the actionable-error rule: a named workflow that cannot be read, or that declares no caller, and a workflows directory that is missing or holds no caller at all. Fixes #973
`sources` takes its `directory` / `listdir` / `read` seams after a `*`, and nothing failed when the mutation gate turned that into `/`: a caller could then pass a directory as the second positional argument and have it land on `listdir`. The sibling `run` already carries the same assertion.
thekevinbot
pushed a commit
that referenced
this pull request
Aug 20, 2026
The recipe comments still routed readers to python-test.yml, ts-test.yml and conventions.yml for the distcheck jobs, the python e2e-verify gate and the packaging gate. Same four retired files as the rest of this branch, and a contributor reading `just --list` hits these before any reference doc. Also names `--conventions`, which #983 added while this branch was open, in AGENTS.md's preflight line -- that line enumerates the other two options, so omitting it reads as though it does not exist. skip-changelog: docs and recipe comments only, no package source Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcNqe44kvgP5mBRr9LjQcE
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.
Fixes #973
What
just preflightdied immediately onmainwith a bareFileNotFoundError:dirsql-checks preflightstill defaulted--conventionsto.github/workflows/conventions.yml, which #861 deleted when the #834 epic split it into six per-domain workflows.Pointing the default at one surviving file would have traded the crash for something worse — a green
preflightcovering one of eight lanes — so the matrix is now discovered:--conventionsis repeatable and defaults to nothing, and with nothing named, every workflow in.github/workflows/that calls the reusable workflow is read and their callers concatenated (issue option 1). That is 40 pairs across 8 scan roots in 6 workflows today, where the old default resolved to 0.Discovery rather than a list of six names for the same reason #781 derived the pairs from the workflow in the first place: a name is a restatement the next rename invalidates. The option-3 guard rides along — every unresolvable case names the fix instead of raising.
Changes
preflight/matrix.py—sources()(named workflows, else discovery),discovered(),named(),read_text(),NoGateMatrix;parse_gate_matrixtolerates documents with no jobs, since discovery hands it every file in the directory.preflight/cli.py—--conventionsrepeatable with no default; announces which workflows the matrix came from; an unresolvable matrix printspreflight:followed by the fix and exits 1.preflight/gate.py—run(workflows: Sequence[str], ...)builds roots from every workflow rather than one document..github/workflows/internals-checks-ci.yml— newinternals-checks-integrationjob. Nothing ran this package's integration tier in CI, which is precisely why the tier that reads real workflow files could not have caught the rename; the issue asks for a test that would catch the next one.preflightrecipe comment injustfileandinternals/checks/README.md.The docs sweep for AGENTS.md /
agents/reference/*is left to #932 item 1, per the issue's Notes. Heads-up for whoever lands second: #985 edits the same two lines ofinternals/checks/README.mdand the samejustfilecomment.Red/green
1ded91c— RED tests pushed alone. CI went red for the right reason:Internals checks CI→internals/checks integration testsfailed onit_derives_a_matrix_with_no_argumentswithassert 1 == 0(FileNotFoundErrorfrom the command); every other job in that run passed. Run 32406989719d750069— implementation + colocated unit tests, flipping it green.4ffd060— kills the one mutant the gate surfaced (*→/on thesourcesseams).New tests:
tests/integration/preflight_test.py(the command with its real defaults over the real.github/workflows/— covers every caller job, spans every file holding one, and names a missing target instead of raising) andtests/e2e/preflight_test.py(same two properties through the packaged console script from the repo root).Manual verification
Gates run locally for this lane, all green:
colocated-test,unit-lint,integration-lint,unit-coverage(100% floor + changed lines),unit mutation(32 mutants, none surviving), plus theuv sync/declared-depsdrift guards.E2E Verification
packages/**changepackages/**changepackages/**changepackages/python/e2e-attestation.jsonrefreshed ifpackages/pythonchanged — N/Apackages/ts/e2e-attestation.jsonrefreshed ifpackages/tschanged — N/Acd internals/checks && uv run python -m pytest src/checks tests/integration tests/e2e -q(380 passed), thenuvx testing-conventions e2e attest 'uv run python -m pytest tests/e2e -x -q'internals/checks/e2e-attestations/claude-tackle-973-4e1epu.jsonrefreshed as the last commit touching the package.Changelog / Migrations
internals/checksand.github/workflows, and the gate scopes topackages/andplugins/.PARITY.mduntouched: no SDK surface changes.