Repository navigation
ci(workflow): run the sanitizers steps from Python (#962) - #2781
Merged
Merged
Conversation
RED: ci/sanitizers_step.py does not exist, so `select` and `triage` error (FileNotFoundError), and both workflow steps are still `run: |` blocks with their GEN-005 exceptions in ci.toml. 13 failures and 1 error on this tree.
Both remaining GEN-005 findings in `.github/workflows/sanitizers.yaml` are inline shell blocks; each is now one call to `ci/sanitizers_step.py`. - `select` (jobs.matrix `id: pick`) writes the same literal JSON to `$GITHUB_OUTPUT` for `all` and for a single pass. The matrix job installed nothing before, so it gets its own pinned `astral-sh/setup-uv` step with the same master-only `save-cache` expression the sanitize job uses. - `triage` (jobs.sanitize `Triage 🩺`) keeps the missing-results failure and its one-line step summary, and otherwise runs `triage.py` over the pass directory, echoing the report to the log and the summary and returning the child's status. `fail_on_findings` now arrives as `FAIL_ON_FINDINGS` instead of a pre-assembled `--fail-on-findings` flag. The ci.toml GEN-005 block for the path is removed: precheck's header goes `5 violation(s), 418 approved exception(s), 10 needs_review` -> `5 violation(s), 416 approved exception(s), 10 needs_review`, with no other rule moving and no GEN-005 finding left for the file. Differential against master's blocks, verbatim under `bash -e -o pipefail`, with a `uv` shim so both arms run the real `triage.py`: 9/9 cases identical (3 `select` values byte-for-byte in `$GITHUB_OUTPUT`; clean/failing report x `fail_on_findings` on/off, plus the no-results path, matching stdout, summary bytes and exit status). Refs #962
Member
Author
|
Handed off to the coordinator. State: ready (not draft), PR CI green — Local evidence is the RED/GREEN in the body plus |
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.
Fixes #2780 — refs #962
GEN-005 burn-down: the sanitizers workflow kept its
[[exceptions]]block for two inlinerun:steps. Both are now one call toci/sanitizers_step.py, and the block is gone.jobs.matrix.steps[0](id: pick)if [ "$TOOLS" = all ]… echoing into$GITHUB_OUTPUTuv run --no-project ci/sanitizers_step.py select --tools "$TOOLS"jobs.sanitize.steps[6](Triage 🩺)[ -d ]guard +triage.py … | tee -a "$GITHUB_STEP_SUMMARY"uv run --no-project ci/sanitizers_step.py triage "$SAN_OUT/${{ matrix.tool }}"RED
278519bb4(local evidence — a focused CI/configuration change, so RED and GREEN are pushed together, coordination.md §4):uv run python -m unittest ci/test_sanitizers_step.py→ 12 tests, 13 failures + 1 error with the module absent and master's workflow in place (ci/sanitizers_step.pymissing; both steps stillrun: |; the ci.toml block still present).GREEN
6c8a9b5c1:ci/sanitizers_step.py—select(the pass matrix, same literal JSON:allis["asan","tsan","valgrind"], anything else is that one pass) andtriage(a missing results directory is the build failure, one line in$GITHUB_STEP_SUMMARYand status 1 with nothing on stdout; otherwisetriage.pyruns over the pass directory, its report goes to the log and the summary, and its status is returned — whatbash -e -o pipefailpropagated throughtee).fail_on_findingsarrives asFAIL_ON_FINDINGSinstead of a pre-assembled flag string..github/workflows/sanitizers.yaml— both steps are one line. The matrix job installed nothing before, so it gains its own pinnedastral-sh/setup-uvstep (the samesave-cache: ${{ github.ref == 'refs/heads/master' }}expression the sanitize job already carries). No trigger, job name, timeout, runner or cache key changes.ci.toml— the GEN-005 block for the path removed.ci/test_sanitizers_step.py— the stdlib pin: both subcommands over real fixtures, the workflow's two one-line steps, the matrix job's uv setup, and no GEN-005 exception left for the path.Nothing changed, proven off-line. I extracted master's two
run:blocks and ran them verbatim underbash -e -o pipefailon the same fixtures as the new subcommands, with auvshim on PATH that stripsrun --no-projectand execs the realtriage.pyso both arms produce a real report:Local checks.
uv run ci/local_gate.py --only self-test→== self-test: ok(everyci/test_*.py).uvx ruff checkon both new files → clean.ci-lint precheckon the branch:5 violation(s), 416 approved exception(s), 10 needs_review(master:5, 418, 10) — the two approved exceptions are this path's, no other rule moved, and the file has no GEN-005 finding left (its CACHE-002, RUN-001 and WF-004 entries are untouched).No
docs/features.mdline: nothing a user can observe — the workflow's output, summary and status are byte-identical.The
Triagestep's exit status is now the child's, so a--fail-on-findingsfinding still fails the job exactly as before; the matrix job's new uv step is master-only for cache saves, which is what CACHE-013 asks for in a workflow with no PR trigger.