Repository navigation
ci: stop install-script from throwing away the output it asserts on - #433
Merged
Merged
Conversation
The success branch captured the install output in a command substitution without `|| true`, so under `set -e` a failing install killed the step at the assignment and `echo "$out"` never ran. The log then held only bash's /opt/ofs/bin/objectfs: No such file or directory Process completed with exit code 127 and none of the three ::error:: messages below it — messages written specifically for the runs where they would now never be printed. The refusal branch above already has `|| true` for exactly this reason. Found while diagnosing a transient rockylinux:9 failure on #431 whose only diff was a toolchain line. The same job passed on main and on #430 at the same time, and the rerun was green, so the failure was a flake — but the flake's cause is unrecoverable because the step discarded the evidence. A job whose assertions can only be read when they pass reports the same non-answer this job exists to reject. The idempotency step below has the same shape and does not need the same fix: its substitution ends in `[ ... ] && echo SAME || echo DIFFERENT`, which exits 0 regardless.
…o host is absent install.sh's header said "Both objectfs.io and packages.objectfs.io resolve to registrar parking IPs", which stopped being true when #429 put the landing page and the docs on Pages. The conclusion is unchanged and the reason it is unchanged is the part worth writing down: Porkbun answers a wildcard, so packages.objectfs.io resolves exactly like every other name under the domain and completes no TLS handshake. Resolution was never the evidence — which is the same argument the landing-page domain test exists to make.
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.
install-script (rockylinux:9)failed on #431, whose entire diff was onetoolchain go1.26.6line. The same job passed onmainand on #430 within minutes of it, and the rerun was green — so it was a flake. But the flake's cause cannot be recovered, because the step discarded the evidence.The bug
The container's last command exits 127 when the install did not produce a binary. Under
set -euo pipefailthat kills the step at the assignment, soecho "$out"never runs. The entire log for the failure was:Not one of the three
::error::messages appeared — including the carefully worded ones about a bypassed checksum and about an installer that "succeeds and leaves a binary that cannot run has produced the same outcome as one that failed, minus the explanation." Those messages were unreachable on precisely the runs they were written for.The refusal branch immediately above already has
|| truefor this exact reason. The success branch was missing it.Fix
Add
|| trueto the substitution. The threegrepassertions then decide the outcome from the captured text, which is what the step was written to do — and the captured text, including the failing--versionline, lands in the log either way.Verified by simulating both forms:
The idempotency step below has the same shape and does not need the same fix: its substitution ends in
[ "$a" = "$b" ] && echo SAME || echo DIFFERENT, which exits 0 regardless. Noted in a comment so the next reader does not have to re-derive that.No attempt to paper over the flake itself — both downloaders in
scripts/install.shalready pass--retry 3. The next occurrence will now say what happened.