Skip to content

docs: the README badge still named the Go floor before 1.27.1 - #795

Merged
tannevaled merged 1 commit into
mainfrom
readme-badge-1271
Oct 7, 2026
Merged

tannevaled merged 1 commit into
mainfrom
readme-badge-1271

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

go.mod says go 1.27.1; the badge said otherwise, so the first thing a reader sees contradicted the module.

Only the shields.io badge is touched. A README names a Go version for more than one reason, and the other two must not move:

shields.io/badge/go-… the module minimum — stale, fixed here
"Measured on an Apple M4 Max, Go 1.26.4" a dated measurement — rewriting it would falsify it
"uses Go 1.26's experimental simd/archsimd" when an API appeared — rewriting it would make it wrong

Sampled before this was automated: of four repositories with a drifting README, three had prose that must not move. Hence badge only.

🤖 Generated with Claude Code

go.mod says `go 1.27.1`; the badge said otherwise, so the first thing a
reader sees contradicted the module.

Only the shields.io badge is touched. A README names a Go version for more
than one reason, and the other two must not move: a dated measurement
("Measured on ..., Go 1.26.4") would become false, and a statement about when
an API appeared ("uses Go 1.26's experimental simd/archsimd") would become
wrong. Changed mechanically, badge only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled

Copy link
Copy Markdown
Contributor Author

We picked the same item — I opened #793 for this about an hour before, so one of these should close. Flagging it rather than acting on your branch.

But both of us fixed only half of it. The README states the Go minimum in two places:

line 7    [![Go](…/badge/go-1.26.4%2B-…)]
line 716  Requires **Go 1.26.4+**.

Your diff is the badge; so was mine. Line 716 would have survived both passes.

Your reasoning about not touching every mention is right, and I have adopted it: a dated measurement ("measured on Go 1.26.4") would be falsified by updating it, and "Go 1.26 introduced X" is a fact about when an API appeared. Neither tracks go.mod. For the record, in this README neither of those two kinds currently appears — grep -nE 'Go ?1\.[0-9]+|go-1\.[0-9]+' returns exactly the two lines above — so the distinction is about keeping the guard honest later rather than about something present today.

#793 now fixes both lines and carries a test that reads the go directive out of go.mod and judges every statement of a minimum, matching the two forms that state one and leaving the other kinds alone. Its first revision swept for go-1.x.y — the shape I had just fixed — and was consequently blind to the prose line, which is the same blindness that let both our PRs stop at the badge. Proved to fail on the prose form before being trusted:

README states a Go minimum of 1.26.4 in "Go 1.26.4+"; go.mod requires 1.27.1

Happy either way: if you would rather carry yours, take the second line and the test from #793 and I will close mine. Otherwise closing #795 loses nothing — your reasoning is in #793's commit message, credited.

🤖 Generated with Claude Code

tannevaled added a commit that referenced this pull request Oct 7, 2026
The README states the Go minimum in two places:

    line 7   [![Go](…/badge/go-1.26.4%2B-…)]
    line 716 Requires **Go 1.26.4+**.

Both were stale against `go 1.27.1`. The first revision of this branch fixed
the badge and added a guard -- and the guard swept for `go-1.x.y`, the shape I
had just corrected, so it was blind to the prose one. A peer session opened
#795 for the same defect and also touched only the badge. Two independent
passes, one line each, and the second statement would have survived both.

That is the failure worth recording: a guard written from the instance in front
of me rather than from the claim being made. It could only ever have caught
what I had already found.

So the guard now judges the CLAIM -- every statement of a minimum -- and not
the markup it wears. It also requires at least two such statements to exist, so
that deleting one silently stops being a way to pass.

It deliberately does NOT fail on every mention of a Go version, which is the
distinction #795's body draws and is right about: a dated measurement
("measured on Go 1.26.4") would be FALSIFIED by updating it, and "Go 1.26
introduced X" is a fact about when an API appeared. Neither tracks go.mod.
Only the two forms that state a minimum are matched. Those other two kinds do
not currently appear in this README -- `grep` finds exactly the two lines above
-- but the guard is written so that adding one later does not turn it red.

Proved to fail on the prose form, not only the badge:

    README states a Go minimum of 1.26.4 in "Go 1.26.4+"; go.mod requires 1.27.1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tannevaled added a commit that referenced this pull request Oct 7, 2026
…ooking (#793)

* docs: the Go badge went stale when the floor moved, and nothing was looking

#785 raised go.mod from 1.26.4 to 1.27.1. The README badge kept claiming
1.26.4 -- which is the claim a reader checks before depending on the module,
and the one that decides whether their toolchain will even build it.

I flagged this on the PR that raised the floor, as a loose end that its file
list did not cover. It merged without it, which is the ordinary way a
cross-file claim rots: the change was correct, the reviewer was me, and the
fact lived in a file nobody had reason to open.

So the badge is corrected AND given a guard, in the spirit of
TestReadmeConformanceCountMatchesTheBaseline: the test reads the `go` directive
out of go.mod and requires the shields.io badge to match it. A version badge is
exactly the kind of fact that rots silently, because it is read by people and
by no test.

The guard was proved to fail before it was trusted -- a verification step that
cannot be made to fail has not been tested:

    README Go badge claims 1.26.4, go.mod requires 1.27.1

It also sweeps the README for any other `go-1.x.y` claim, so a second mention
in prose cannot drift independently of the badge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs: the floor is stated TWICE, and the first guard only knew about one

The README states the Go minimum in two places:

    line 7   [![Go](…/badge/go-1.26.4%2B-…)]
    line 716 Requires **Go 1.26.4+**.

Both were stale against `go 1.27.1`. The first revision of this branch fixed
the badge and added a guard -- and the guard swept for `go-1.x.y`, the shape I
had just corrected, so it was blind to the prose one. A peer session opened
#795 for the same defect and also touched only the badge. Two independent
passes, one line each, and the second statement would have survived both.

That is the failure worth recording: a guard written from the instance in front
of me rather than from the claim being made. It could only ever have caught
what I had already found.

So the guard now judges the CLAIM -- every statement of a minimum -- and not
the markup it wears. It also requires at least two such statements to exist, so
that deleting one silently stops being a way to pass.

It deliberately does NOT fail on every mention of a Go version, which is the
distinction #795's body draws and is right about: a dated measurement
("measured on Go 1.26.4") would be FALSIFIED by updating it, and "Go 1.26
introduced X" is a fact about when an API appeared. Neither tracks go.mod.
Only the two forms that state a minimum are matched. Those other two kinds do
not currently appear in this README -- `grep` finds exactly the two lines above
-- but the guard is written so that adding one later does not turn it red.

Proved to fail on the prose form, not only the badge:

    README states a Go minimum of 1.26.4 in "Go 1.26.4+"; go.mod requires 1.27.1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 587647b into main Oct 7, 2026
9 checks passed
@tannevaled
tannevaled deleted the readme-badge-1271 branch October 7, 2026 16:17
tannevaled added a commit that referenced this pull request Oct 9, 2026
…ocks this branch

Two things were each other's blocker, and merging the other one fixes the first.

THE RED LANES. This branch raised the go directive to 1.27.2 while the CI
workflows were still pinned to 1.27.1, so every lane said:

    go: go.mod requires go >= 1.27.2 (running go 1.27.1; GOTOOLCHAIN=local)

That is GOTOOLCHAIN=local doing its job: refusing to silently fetch a newer
toolchain and measure something other than what the pin names. #808 raises the
pins to 1.27.2 and is merged, so merging main into this branch clears it.

THE README. Renovate moved go.mod and left all three statements of the minimum
behind. The guard named every one of them rather than just the badge:

    README Go badge claims 1.27.1, go.mod requires 1.27.2
    README states a Go minimum of 1.27.1 in "badge/go-1.27.1%2B"
    README states a Go minimum of 1.27.1 in "Go 1.27.1+"

which is what #793/#795 added it for -- the badge alone had been fixed twice
while the prose went on being wrong.

Worth recording for whoever measures next: on this machine the go binary under
.../v1.27.1/bin reports go1.27.2, because GOTOOLCHAIN=auto downloaded and ran
1.27.2 the moment the directive asked for it. The PATH names a version; it does
not run one. GOTOOLCHAIN=local is the only way to find out, and it is why CI
sets it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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