Skip to content

fix(ci): the night report fixtures end with a newline, so a push can happen - #941

Merged
stephrobert merged 1 commit into
mainfrom
fix/the-night-fixtures-end-with-a-newline
Nov 14, 2026
Merged

stephrobert merged 1 commit into
mainfrom
fix/the-night-fixtures-end-with-a-newline

Conversation

@stephrobert

Copy link
Copy Markdown
Owner

Summary

Ten payload fixtures under tools/ci/testdata/race-night-*/ reached main through #926 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.

So every push from any clone where pre-commit install has 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:

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-commit runs 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.md states the reasoning.

The cost of that choice is exactly this case. A file 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. Worth knowing; not worth putting pre-commit in CI over.

Related: #936 already carries the other half of this, that falsify:lint and falsify:selftest are run by no pull request while CONTRIBUTING.md says prepush is what a pull request refuses.

Type of change

  • Bug fix
  • A route added or changed
  • Refactor
  • Documentation
  • Chore / tooling
  • Security / supply chain

Runs

run verdict
go test ./tools/ci/ green, before and after
the pre-commit suite, through the commit itself green, and it rewrites nothing now

Mode: --vm off. Nothing here touches a route, a response shape or a machine runtime, so no leg and no FEINT_VM run is owed. mise run testplan routes tools/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 check passes
  • No new external Go dependency
  • internal/core still knows no provider
  • Nothing in the diff could be written identically for another provider
  • mise run testplan was run, and what it printed was run

When a model wrote a substantive part of this

  • An Assisted-by: trailer names the tool and the model version
  • No field name and no response shape changes

When a route is added or changed

N/A.

When behaviour a client can observe changes

N/A.

When .github/workflows/ is touched

N/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

…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)
@stephrobert
stephrobert merged commit 2ab0c24 into main Nov 14, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant