Repository navigation
ci: give the modulefiles matrix legs names that can be required checks - #413
Merged
Merged
Conversation
The default job name interpolates every matrix value, so the two legs reported as `modulefiles (lmod, lmod, /usr/share/lmod/lmod/libexec/lmod)` and `modulefiles (tcl-modules, environment-modules, /usr/lib/x86_64-linux-gnu/modulecmd.tcl)`. Both are about to become required status checks on main, and a required context is matched by exact string. Pinning a name containing an absolute interpreter path means that the day a distro moves modulecmd.tcl — or the runner image changes the multiarch directory — the renamed check never reports, and every PR blocks forever on a context that can no longer arrive. The failure would look like unrelated CI breakage. The system name is the stable half of the identity, so the legs are now `modulefiles (lmod)` and `modulefiles (tcl-modules)`. The interpreter path stays a matrix value and is still asserted executable by the job's own guard step, which is where a moved path should surface.
This was referenced Aug 9, 2026
scttfrdmn
added a commit
that referenced
this pull request
Aug 14, 2026
…ined (#415) (#435) A gosec finding did not block a merge, and every part of the mechanism looked like it did. `Security Scan` runs `gosec -no-fail`, so the job passed on any number of findings. The check that went red was `gosec` — the code-scanning check derived from the SARIF upload, a different check with a different name — and that one reports on pull requests and not on `push: main`, measured across four commits. So it could not be added to the required contexts either: a required check that does not always report blocks every PR forever (#413). The result was that #414 added a `uint64 -> int64` conversion, gosec reported "1 new alert including 1 error", and the PR stayed mergeable. It was caught by someone reading the checks by hand. `-no-fail` stays. The upload needs the complete report, including the three `sdks/c` G115 findings that the "Fix Gosec SARIF format" step back-fills a path onto — and which golangci-lint discards for the same cgo reason, so they reach no other tool. Dropping the flag would end the job before either step ran, which reads as a tightening and is a loosening. The gate is instead a final step running .github/scripts/gosec-gate.sh, which diffs the report against .github/gosec-baseline.txt. `Security Scan` is a job name, so it reports on every trigger the workflow has, which is what lets it be required. Last in the job and `if: always()`, so a new conversion does not also cost the run its govulncheck result, Trivy upload and license check. The baseline is the twelve pre-existing findings across eight files, keyed by (rule, file, count). Not by line number, which moves whenever anything above it moves, so a line-keyed baseline goes stale on unrelated edits and reports on the wrong thing. A severity threshold was not available: all twelve are G115 at `error` level, identical to what a new finding reports, so there is nothing to threshold on. The ratchet is exact in both directions — fixing one of these fails too, until its line goes with it, because a slot kept after its finding was fixed is permanent headroom for the next conversion in that file. Two things are gated in Go, in internal/config/gosec_gate_test.go, because both failure modes are silent: every path in the baseline must exist (a renamed file leaves a standing allowance pointing at nothing, and the script would report it as a fixed finding, which is true said misleadingly), and the workflow must still invoke the script, still pass `-no-fail`, and the script must still be executable. All six branches were mutation-verified: each fails with its own message and the suite returns to green. The script's own failure path was verified by running it, not by reading it — and that caught a bug in it. `diff` exits 1 on a difference, `pipefail` promotes that to the pipeline, and `set -e` ended the script at `diff | tail`, so the first mutant printed the diff and then none of the three paragraphs explaining what to do about it. Which is the exact failure #433 had just fixed elsewhere, sitting directly below a comment describing it. Refs #415
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.
Prerequisite for adding the modulefiles legs to
main's required status checks (promised in #412).The default matrix job name interpolates every matrix value, so #412's legs reported as:
modulefiles (lmod, lmod, /usr/share/lmod/lmod/libexec/lmod)modulefiles (tcl-modules, environment-modules, /usr/lib/x86_64-linux-gnu/modulecmd.tcl)A required context is matched by exact string. Requiring a name that embeds an absolute interpreter path means that when a distro moves
modulecmd.tcl, or the runner image changes the multiarch directory, the renamed check never reports and every PR blocks on a context that can no longer arrive — presenting as unrelated CI breakage rather than as the path change it is.name: modulefiles (${{ matrix.system }})makes the legsmodulefiles (lmod)andmodulefiles (tcl-modules). The interpreter path stays a matrix value and is still asserted executable by the job's guard step, which is the right place for a moved path to surface — that guard fails loudly rather than letting the interpreter test skip into a green run.Branch protection is updated after this merges, since a required check must exist on
mainfirst.