Repository navigation
Description
scripts/check_test_reachability.sh counts a workflow step as running a test even when the step is switched off. Its parser looks only at run (scripts/check_test_reachability.sh:41-44):
run = step.get("run")
if isinstance(run, str):
match = command.fullmatch(run.strip())It never reads the step's if, the job's if, or continue-on-error on either. At 90cc24e, on a copy of the tree, I added if: ${{ false }} to the step that runs systemd-directory-modes.test.sh in ci.yml:
pristine rc=0 test-reachability: every release and E2E test is invoked by a gate.
if: false rc=0 test-reachability: every release and E2E test is invoked by a gate.
tests/release/npm-audit-off-pr-path.test.sh has the same blind spot: it decides whether the scheduled npm audit step is enforced from step.get("run") and continue-on-error (:86, :97), and does not read if.
Why it matters
The usual way to quiet a flaky test in CI is if: false or continue-on-error: true. Either one leaves the test unrun or non-blocking while the gate whose job is to notice still prints "every release and E2E test is invoked by a gate".
Scope
- Count a step only when neither the step nor its job has an
ifthat is a literal false (false,${{ false }}), and neither hascontinue-on-error: true. For any otherifexpression, either count it and print which expression it depends on, or refuse; say which you chose in the PR. - Apply the same rule in
npm-audit-off-pr-path.test.sh. - Trap: YAML parses a bare
falseas a boolean and${{ false }}as a string. Handle both.
Tests first
tests/release/test-reachability.test.shalready builds workflow fixtures. Add three: stepif: ${{ false }}, stepcontinue-on-error: true, jobif: false. Each must exit non-zero and name the test file. All three pass today.- The same three fixtures for the npm-audit guard.
- Remove the new check and the fixtures must go green again, which proves they bite.
Difficulty
easy: two small Python blocks and fixtures in tests that already have the harness.
Getting started
CONTRIBUTING.md has the build and test commands. No CLA and no copyright waiver. The project is MIT; sign off each commit with git commit -s (the required dco check enforces it since #732).
Activity
vladimirrott commentedon Oct 24, 2026
@be-student this is about your gate. #377 made every release test reach one, and
check_test_reachability.shstill counts a step switched off withif: ${{ false }}as reaching it. The fixtures harness you'd extend is already intest-reachability.test.sh.I'm holding it for you. Say so here and I'll assign it. If it isn't for you, no reply needed.
vladimirrott commentedon Oct 27, 2026
@be-student Thanks for looking at this one. I'm opening it back up since I haven't heard from you in a few days. If you still want it, say so here and it's yours again.
vladimirrott commentedon Oct 27, 2026
@ITSMERNB This has the same shape as your #570: a CI check that counts something as having run when it never did.
scripts/check_test_reachability.shtreats a step disabled withif: falseas running its test, so a test can be switched off with the checker still green. The issue has the line and a test that pins it. Want it? Say so here and I'll assign it to you.fix(ci): strengthen workflow reachability checks (lacs-project#652)
vladimirrott commentedon Nov 3, 2026
@ITSMERNB I haven't heard back on this in a week, so I'm putting it back in the pool. If you want it later, say so here and it's yours.
QinXi-ai commentedon Nov 5, 2026
I'll take this one. I'll cover the job and step conditions in both checks, with regression fixtures and mutation checks.