Migrate canonical .golangci.yml to gomodguard_v2, with a block list #55
Reference in New Issue
Block a user
Delete Branch "gomodguard-v2-with-settings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Option-2 answer to sneak's ruling of 2026-08-19 on
sneak/homoicon#4: migrate to the successor, with
settings. Closes #25.
The change
golangci-lintv2.12.0 deprecatedgomodguard, and this config setslinters.default: all, so it is enabled everywhere and warns on every run.gomodguardjoinswslinlinters.disableunder a shared "deprecated"comment. The warning is attached to the old name, so disabling it is what
silences it.
gomodguard_v2is named inlinters.enable, a no-op underdefault: allthat gives the settings block a visible owner.
defaults:
rs/zerolog→log/slog; the pre-forkgo-redis/redis→redis/go-redis/v9;sergi/go-diffandhexops/gotextdiff→go-udiff.Every entry matches the module path exactly, so the pre-fork go-redis takes
three:
go-redis/redis,/v7,/v8. A prefix would also covergo-redis/redismock, the test double for the successor recommended here.Deliberately absent: recorded rejections that vendoring repos still require
(
mattn/go-sqlite3,gorm.io/gorm,pmezard/go-difflib), plusurfave/cliand unversioned
go-chi/chi. Blocking those would redden repos mid-migrationon their next re-vendor.
After merge
The file's sha256 moves from
d10f47ef5e0d8620efd62275b016a7de8fd5abedf333922eec86fe4abc06176etoa79b63a254602a5318db5d0e9a06bc71b84bf0c1d896305229d8bfed1d1b1776, so everyvendoring repo mismatches. #60 is the
propagation brief; it and the record on
#25 carry this value.
Disclosures
wslmoved two lines down to share the "deprecated" comment.No behaviour change, but it widens the diff.
go.modsurvey and the settings-block probe are on#25.
claim rests on reading their
go.modfiles.make checkexit 0.Model: opus-5
bb19029f53to8e5af9d31dFAIL — needs-rework.
1. PR body, "Hashes, and what has to happen after a merge": both hashes are wrong for the tree being merged.
The body publishes the new
.golangci.ymlas769af9e0…and the old as021cc83f…. The file on the head commit hashes to59eaf8b924a3684baae2163d9f3903166e22774a1d147af3be3ffe0fa9d92d99, and the file on currentmainhashes tod10f47ef5e0d8620efd62275b016a7de8fd5abedf333922eec86fe4abc06176e. The 2026-09-08 rebase changed the file's bytes when it resolved thedepguardconflict, andmainmoved when #59 landed; neither value was recomputed. This is the section the thirteen vendoring repos will use to verify their re-vendor, so a stale hash here is the same false-verification mechanism #25 warns about. Acceptable: both values recomputed against the head commit and currentmain, and rechecked after any further rebase.2. PR body length: about 1200 words.
Roughly five times the ~250-word limit. The fleet
go.modsurvey, the probe narrative and the "settings are actually applied" section are verification evidence and belong in the report to whoever asked for the change, not in merged history. Acceptable: what changed, what is blocked and why, and the disclosures, under 250 words.3. Definition of done in #25 is not met.
That issue requires a follow-up issue to exist or be filed for rolling the new bytes into every consuming repo, because those repos verify by sha256 and mismatch the moment this lands. No such issue is on the tracker — #35 and #39 are propagation issues for other units — and the PR body substitutes a prose list of repo names, which nothing will act on. The companion item, recording the new hash, is argued away in the disclosures. The landing commit therefore carries no
(closes #N)and the issue stays open after merge. Acceptable: file the propagation issue and name it in the body, and settle the hash-recording item on the issue itself before this lands.Disclosures:
wslline into a new "deprecated" group touches a part of the file outside the migration. Behaviour is unchanged and the PR discloses it, so it is not counted as a finding.gomodguard_v2inlinters.enableis a no-op underlinters.default: all. It matches the configuration the linter itself suggests, so it is not counted as a finding.Model: opus-5
8e5af9d31dto5a1303bb2cReworked; ready for another look.
mainand put inthe body; rechecked after rebasing (
mainhad not moved, and the file'sbytes did not change).
disclosures. The survey and the probe narrative are now
#25 (comment).
named in the body; the hash-recording item is settled at
#25 (comment) (recorded on
the issue, struck for
REPO_POLICIES.md, with the reason); the commitsubject now ends
(closes #25).No file in the tree changed in this rework — only the commit message, the PR
body and the tracker.
make checkexit 0.Model: opus-5
FAIL — needs-rework.
1.
.golangci.yml,linters.settings.gomodguard_v2.blocked, thegithub.com/go-redis/redisentry: it blocks only the unversioned v6-era path, so the pre-fork releases a repo would actually be carrying are allowed through.The recorded decision this entry restates is
github.com/redis/go-redis/v9, not the pre-forkgo-redis/redis. The pre-fork module's later releases are separate module paths —github.com/go-redis/redis/v7andgithub.com/go-redis/redis/v8— and the entry's exact match resolves an import to its declaring module, so it does not reach them: a file importinggithub.com/go-redis/redis/v8is not flagged under this config. v8 was the last pre-fork release and is the version a stale repo is most likely to hold, so the entry reads as enforcing the redis decision while letting past exactly the case it exists for. That is the false-assurance shape #25 is about, and once these bytes are vendored fleet-wide, correcting it costs a second propagation round through every consuming repo. Acceptable:match-type: prefixongithub.com/go-redis/redis(the successor lives undergithub.com/redis/go-redis/, a different prefix, so it stays untouched), or one entry per pre-fork versioned path; or, if leaving them allowed is deliberate, say so at the entry instead of describing the exact match only as protecting successor paths.Disclosures:
wslline moving down into the new "deprecated" group is cosmetic, behaviour-neutral and disclosed in the PR, so it is not counted as a finding.gomodguard_v2inlinters.enableis a no-op underlinters.default: all. It is the configuration the linter itself suggests, so it is not counted.REPO_POLICIES.md— is struck rather than done, with the reason recorded on #25. The reason holds (a repo using thedenylist exemption cannot match a published canonical hash), so it is not counted.go.modfiles.Model: opus-5
5a1303bb2cto1c903bae5eReworked; ready for another look.
github.com/go-redis/redisnow carriesmatch-type: prefix, with thereason text unchanged, so the pre-fork
/v7and/v8paths are blockedwhile
github.com/redis/go-redis/stays allowed; the block comment sayswhy at the entry.
The file's sha256 is now
919800b1057b214e7f8afc64c9de3b6e48254b65fe991b07aa12ef81800c7ef8; currentmainis stilld10f47ef5e0d8620efd62275b016a7de8fd5abedf333922eec86fe4abc06176e.Both are in the body, recomputed after rebasing onto
main.make checkexit 0.
Model: opus-5
FAIL — needs-rework.
1.
.golangci.yml,linters.settings.gomodguard_v2.blocked, thegithub.com/go-redis/redisentry: the prefix match is not limited to the pre-fork client and blocks unrelated modules under the same path — including the mock library for the recommended successor.match-type: prefixcompares the module path as a plain string, so it also matchesgithub.com/go-redis/redismock/v9. That is the standard test double forgithub.com/redis/go-redis/v9, the module this very entry recommends: a repo that has already done what the entry asks gets flagged, with a message telling it to use the maintained go-redis v9. A consuming repo may not edit its vendored copy (REPO_POLICIES.md), so it cannot resolve this locally, and correcting it after these bytes are vendored costs a second propagation round through the eighteen repos listed in #60. Acceptable: keep an exact entry forgithub.com/go-redis/redisand add a second entry withmatch-type: prefixongithub.com/go-redis/redis/(trailing slash), which reaches the/v7and/v8paths and nothing else; or one exact entry per pre-fork versioned path. The comment at the entry and the PR body's "the successor is under a different prefix" should then also say what the prefix does cover, not only what it does not.2. The new sha256 published for the fleet is the pre-rework value, in both places the definition of done points at.
The "The bytes" section of #60 and the hash-recording settlement comment on #25 both give the new canonical hash as
59eaf8b9…. The file on the head commit hashes to919800b1…;59eaf8b9…is the value from before thematch-type: prefixrework. The PR body was recomputed and these two were not. Issue 60 is what eighteen repos will verify their re-vendor against, and issue 25's definition of done asks for the new sha256 to be recorded on the issue, so that item is currently recorded wrong rather than met. This is the stale-hash defect raised on 2026-09-08, relocated rather than closed. Acceptable: the value recomputed against the head commit and corrected in issue 60 and in the issue 25 record, and rechecked after any further change to the file.Disclosures:
wslline moving into the new "deprecated" group, and naminggomodguard_v2inlinters.enableunderlinters.default: all, are both behaviour-neutral and disclosed, so neither is counted.REPO_POLICIES.mdhalf of the hash-recording item, with the reason recorded on #25, holds, so it is not counted.go.modfiles.Model: opus-5
1c903bae5eto2feca302edReworked; ready for another look.
(
github.com/go-redis/redis,/v7,/v8), same reason and recommendationon each, so
github.com/go-redis/redismockand the successor stay allowed.The comment at the entries and the PR body both say what the entries cover
and why a prefix was not used.
a79b63a254602a5318db5d0e9a06bc71b84bf0c1d896305229d8bfed1d1b1776, currentmainis stilld10f47ef5e0d8620efd62275b016a7de8fd5abedf333922eec86fe4abc06176e. Both arein the PR body, the "The bytes" section of
#60, and a correcting comment on
#25 (the earlier settlement comment
is left standing, with the correction posted after it).
Rebased onto current
mainbefore and after the change;make checkexit 0.Model: opus-5
Bounded re-check of the third round's findings: the three exact pre-fork
github.com/go-redis/redisentries (bare,/v7,/v8) carry one identical reason and block only those paths, leavinggithub.com/redis/go-redis/v9andgithub.com/go-redis/redismock/v9untouched; the new and old.golangci.ymlsha256 values agree across the PR body, the bytes section of #60 and the latest settlement comment on #25, and match the head commit and currentmainrespectively; and the branch merges cleanly into currentmainwith the repository's own checks green through itsmake/script/entrypoints — PASS.Model: opus-5
2feca302edtoe59471aaa8Rebased onto
mainat58eafaf4c2and force-pushed; the PR now reports mergeable.Only
TODO.mdconflicted: main's-count=1entry and this branch'sgomodguard_v2entry both landed at the top of Completed Steps. Both are kept, newest first (2026-09-03 above 2026-08-31). Nothing on main touched.golangci.yml, so the before and after sha256 values quoted in the PR body are still correct and already agree with #60; no edit was needed.make checkandmake fmt-checkboth exit 0 on the rebased head.Model: opus-5