guard: a build that cannot run is not a build that refused - #71
Merged
Conversation
TestABuildWithoutTheBuildTagsRefusesAndSaysWhy shells out to the compiler and treats any error as the refusal it is looking for. A missing compiler arrives the same way, so on a machine with no Go it reported that the refusal "does not name build tags" - with the message empty, blaming the refusal rather than the environment. Measured on 2026-09-06: that is exactly what it did in the container tools/linux-check.py uses, which has no Go in it by design. It was the only test of the whole suite to fail there. This one cannot use the "an error means skip" shape the other ten callers of the toolchain use, because here an error is the answer. So it asks exec.LookPath first, the same idiom and for the same reason as TestABuildWithNoWindowInItSaysSoAndKeepsStandardOutputEmpty. Still passes where a compiler exists, and its existing mutation still turns it red, so the skip did not quietly make it a no-op. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes O182, which had been open with the cause unknown and was blocking
linux-checkas a pre-push gate. The repository half is the one file below. The other half is intools/, which lives outside this repository.O182 was not what it looked like
The recorded symptom:
tools/linux-check.pyfailed five stored screens in a container while CI on real Linux passed the same commit, differing by at most 1 of 255 in one channel on 36 to 403 pixels out of 1 430 000. The leading guess was fonts missing from the image.It was the build tags.
golang.org/x/image/vectoris the rasteriser on the screen-drawing path, and it picks its coverage accumulator on exactly that tag:acc_amd64.go-//go:build !appengine && gc && !noasm- SIMDacc_other.go- the fallback - pure GoThe two round antialiasing differently by one part in 255.
linux-check.pybuilt without the tags, so it compared the stored screens against a binary nobody ships. The screens and CI, which both pass the tags, were right all along.Proven rather than argued. Same commit
f492f79, same image, same container, same CPU, one variable:-tags noasm-tags noasmThose are O182's recorded numbers to the digit. The header claim in
linux-check.pythat nothing from the image is used stands, and theidentical to the bytemeasurement from 2026-08-23 is consistent - the tag did not exist until 2026-08-29.What this PR fixes
Fixing the above surfaced a third thing underneath, and it is the part that belongs in this repository.
TestABuildWithoutTheBuildTagsRefusesAndSaysWhyshells out to the compiler and treats any error as the refusal it is looking for. A missing compiler arrives the same way. So in the container - which has no Go in it by design - it reported that the refusaldoes not name build tags, with the message empty, blaming the refusal rather than the environment. It was the only test of the whole suite to fail there.This one cannot use the
an error means skipshape that the other ten callers of the toolchain in this package use, because here an error is the answer. So it asksexec.LookPathfirst, the same idiom and for the same reason asTestABuildWithNoWindowInItSaysSoAndKeepsStandardOutputEmpty.Textbook O118: a guard that stopped reaching the state it guards.
Checks
preflight --quickgreen on all 12 checksFound in passing, not fixed here
Several other tools still hand our packages to the compiler without the tags, and since
15c2c2ethat does not compile at all.tools/format-status.pyis confirmed broken by running it, andpreflight's coverage check had the same omission - it is not part of--quick, which is why a green quick run never showed it. Both are fixed in thetools/commit. The rest is a sweep worth doing on its own.🤖 Generated with Claude Code