Skip to content

docs: the Go badge went stale when the floor moved, and nothing was looking - #793

Merged
tannevaled merged 3 commits into
mainfrom
fix/go-floor-badge
Oct 7, 2026
Merged

tannevaled merged 3 commits into
mainfrom
fix/go-floor-badge

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

#785 raised go.mod from 1.26.4 to 1.27.1. The README badge kept claiming 1.26.4.

go.mod : go 1.27.1
README : go-1.26.4%2B

That is the claim a reader checks before depending on the module, and the one that decides whether their toolchain will build it at all.

How it rotted, which is the part worth recording

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

So the badge is corrected and guarded

readme_go_floor_test.go reads the go directive out of go.mod and requires the shields.io badge to match, in the spirit of TestReadmeConformanceCountMatchesTheBaseline. A version badge is exactly the kind of fact that rots silently — it is read by people and by no test.

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.

The guard was proved to fail before it was trusted

A verification step that cannot be made to fail has not been tested. With the badge put back to the stale value:

--- FAIL: TestReadmeGoBadgeMatchesTheModuleFloor
    readme_go_floor_test.go:43: README Go badge claims 1.26.4, go.mod requires 1.27.1

and with it correct, both README tests pass.

Swept, and clean elsewhere

The docs site (index.md, conformance.md) and the landing page make no Go version claim at all, so there is nothing to correct there — checked, with the grep shape validated on a known-present string first, because a scan that returns nothing and a scan that cannot read look identical from outside.

🤖 Generated with Claude Code

tannevaled and others added 3 commits October 6, 2026 22:00
…ooking

#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>
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
tannevaled merged commit 21ea033 into main Oct 7, 2026
9 checks passed
@tannevaled
tannevaled deleted the fix/go-floor-badge 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