Repository navigation
fix(ci): the night report fixtures end with a newline, so a push can happen - #941
Merged
Merged
Conversation
…happen Ten payload fixtures under tools/ci/testdata/race-night-*/ landed on main without a final newline. The repository's own end-of-file-fixer hook rewrites them on every commit, sees files it modified, and exits 1. Every push from any clone where `pre-commit install` has been run therefore fails, on a diff that has nothing to do with the files it names. Measured three times today: once on the contributor's branch of #926, and twice on unrelated lots whose own files were all correct. The hook's output names the ten fixtures and ends `failed to push some refs`, so the symptom points at the wrong lot and costs the diagnosis each time. One byte per file, the closing brace followed by a newline, and the ten documents still parse. No test reads the trailing byte: `go test ./tools/ci/` is green before and after. Why CI never caught this, which is the part worth keeping: pre-commit runs in no workflow. It is a local hook only, deliberately, so a red over documentation freshness never teaches anybody --no-verify. The cost of that choice is exactly this: a file that the hook refuses can reach main through a green pull request and then block everybody's push until somebody reads the hook's output carefully enough to notice the named files are not theirs. Assisted-by: Claude Code (claude-opus-5)
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.
Summary
Ten payload fixtures under
tools/ci/testdata/race-night-*/reachedmainthrough #926 without a final newline. The repository's ownend-of-file-fixerhook rewrites them on every commit, sees files it modified, and exits 1.So every push from any clone where
pre-commit installhas been run fails, on a diff that has nothing to do with the files the hook names.One byte per file. The ten documents still parse, and
go test ./tools/ci/is green before and after.Measured
Three times today, on three different branches:
failed to push some refsafter naming ten fixtures the lot never touched.That is what makes it expensive rather than trivial: the symptom points at the wrong change, so the diagnosis is paid again each time.
Why CI never caught it
pre-commitruns in no workflow, and that is deliberate: a red over documentation freshness in CI teaches--no-verify, which disarms every other hook at once.CONTRIBUTING.mdstates the reasoning.The cost of that choice is exactly this case. A file the hook refuses can reach
mainthrough a green pull request, and then block everybody's push until somebody reads the hook's output carefully enough to notice the named files are not theirs. Worth knowing; not worth puttingpre-commitin CI over.Related: #936 already carries the other half of this, that
falsify:lintandfalsify:selftestare run by no pull request whileCONTRIBUTING.mdsaysprepushis what a pull request refuses.Type of change
Runs
go test ./tools/ci/pre-commitsuite, through the commit itselfMode:
--vm off. Nothing here touches a route, a response shape or a machine runtime, so no leg and noFEINT_VMrun is owed.mise run testplanroutestools/ci/**to the Go suite, which is green.No contradicteur was asked: the diff is one trailing byte per file, the hook that demands it is the measurement, and the ten documents are asserted to still parse.
Checklist
Always
mise run checkpassesinternal/corestill knows no providermise run testplanwas run, and what it printed was runWhen a model wrote a substantive part of this
Assisted-by:trailer names the tool and the model versionWhen a route is added or changed
N/A.
When behaviour a client can observe changes
N/A.
When
.github/workflows/is touchedN/A.
When a machine runtime is involved
N/A.
Related issues
None. This is the repair of a push-blocking artefact of #926, not an issue anybody filed.
🤖 Generated with Claude Code