You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
R74 opened on a large registry jump: the custom-linter registry grew from 43 → 55 analyzers since the last recorded run (R60, 2026-07-08), with no Sergo memory updates in between. All prior Sergo issues are CLOSED (verified via gh api, latest #46708). This run audited the newest analyzer (sprintfbool, the 55th) and traced the recurring doc-sync drift to its root cause. 2 issues filed, both high-confidence and distinct.
Tool / Registry Updates
Serena LSP tools: 23, stable (no change).
Registry delta: 43 → 55 (grep -c Analyzer cmd/linters/main.go = 55). 12 linters added across the untracked R61–R73 window.
Newest linter (55th):sprintfbool — flags fmt.Sprintf("%t", b) → strconv.FormatBool(b).
Strategy — 50/50 split
Cached (proven audit patterns): apply the accumulated new-linter correctness checklist — exact-type vs Underlying() (#44187), RunWithSuggestedFixes parity (#43313), IsPkgSelector vs syntactic match (#43934), alias-safe autofix (#45037), nolint+filecheck wiring, enforce-readiness (zero prod violations → CI).
New exploration: treat the recurring doc-sync drift (#40436/#45185/#46131/#46527/#46707) not as another symptom report but as a test-gap root-cause investigation — why do the guards keep passing while the docs drift?
Findings
1. sprintfbool is genuinely clean — all prior-bug classes avoided
Check
Location
Verdict
Exact bool (not Underlying())
sprintfbool.go:112
✅ named bool skipped → autofix always compiles (avoids #44187)
The orphan-fmt-import removal logic (countPkgUsesInFile == targetCalls && all fixable) is sound. This linter has absorbed every lesson from the last ~15 runs.
2. Root cause: no test cross-checks the authoritative registry → filed #46977
Four documentation surfaces sit at three different counts, and every guard is green:
Surface
Location
Count
Registry (truth)
cmd/linters/main.go:78-132
55
doc.go header+bullets
pkg/linters/doc.go:3
54
README bullets/table
pkg/linters/README.md
54
spec_test hand-list
pkg/linters/spec_test.go:88documentedAnalyzers()
46
TestDocGo_CountMatchesBullets compares doc.go header to its own bullets (54==54) — never reads main.go.
TestDocGo_AnalyzersMatchREADME compares doc.go to README — both omit sprintfbool, so equal.
TestSpec_PublicAPI_* only checks the hand-list is a subset of reality (non-nil) — can't catch omissions.
Root cause: the registry is inlined in multichecker.Main(...) in package main (unimportable), so nothing can enumerate it. The symptom has been fixed ≥5 times without closing the gap.
grep -rn 'Sprintf("%t"' pkg cmd internal | grep -v testdata → only the linter's own doc strings match. Zero production violations. The analyzer is clean and RWSF-verified but absent from .github/workflows/cgo.yml:1208-1211 (24 enforced). Adding -sprintfbool to both LINTER_FLAGS invocations locks in the improvement with no risk today.
Memory had a gap: registry grew 43→55 across R61–R73 with no strategy entries recorded. This run reconciled state and re-established the new-linter audit checklist. Doc-sync drift is now traced to a structural test gap rather than repeated manual fixes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Executive Summary
R74 opened on a large registry jump: the custom-linter registry grew from 43 → 55 analyzers since the last recorded run (R60, 2026-07-08), with no Sergo memory updates in between. All prior Sergo issues are CLOSED (verified via
gh api, latest #46708). This run audited the newest analyzer (sprintfbool, the 55th) and traced the recurring doc-sync drift to its root cause. 2 issues filed, both high-confidence and distinct.Tool / Registry Updates
grep -c Analyzer cmd/linters/main.go= 55). 12 linters added across the untracked R61–R73 window.sprintfbool— flagsfmt.Sprintf("%t", b)→strconv.FormatBool(b).Strategy — 50/50 split
Cached (proven audit patterns): apply the accumulated new-linter correctness checklist — exact-type vs
Underlying()(#44187),RunWithSuggestedFixesparity (#43313),IsPkgSelectorvs syntactic match (#43934), alias-safe autofix (#45037),nolint+filecheckwiring, enforce-readiness (zero prod violations → CI).New exploration: treat the recurring doc-sync drift (#40436/#45185/#46131/#46527/#46707) not as another symptom report but as a test-gap root-cause investigation — why do the guards keep passing while the docs drift?
Findings
1. sprintfbool is genuinely clean — all prior-bug classes avoided
bool(notUnderlying())sprintfbool.go:112RunWithSuggestedFixessprintfbool_test.go:16astutil.IsPkgSelectorsprintfbool.go:93X.Namematch (avoids #43934)sprintfbool.go:419ImportedAs+QualifierShadowednolint+filechecksprintfbool.go:36RequiresbadLiteralSprintf("%t", true)flaggedThe orphan-
fmt-import removal logic (countPkgUsesInFile==targetCalls&& all fixable) is sound. This linter has absorbed every lesson from the last ~15 runs.2. Root cause: no test cross-checks the authoritative registry → filed #46977
Four documentation surfaces sit at three different counts, and every guard is green:
cmd/linters/main.go:78-132pkg/linters/doc.go:3pkg/linters/README.mdpkg/linters/spec_test.go:88documentedAnalyzers()TestDocGo_CountMatchesBulletscompares doc.go header to its own bullets (54==54) — never readsmain.go.TestDocGo_AnalyzersMatchREADMEcompares doc.go to README — both omitsprintfbool, so equal.TestSpec_PublicAPI_*only checks the hand-list is a subset of reality (non-nil) — can't catch omissions.Root cause: the registry is inlined in
multichecker.Main(...)in packagemain(unimportable), so nothing can enumerate it. The symptom has been fixed ≥5 times without closing the gap.3. sprintfbool enforce-readiness → filed #46978
grep -rn 'Sprintf("%t"' pkg cmd internal | grep -v testdata→ only the linter's own doc strings match. Zero production violations. The analyzer is clean and RWSF-verified but absent from.github/workflows/cgo.yml:1208-1211(24 enforced). Adding-sprintfboolto bothLINTER_FLAGSinvocations locks in the improvement with no risk today.Generated Tasks
All() []*analysis.Analyzer, consume it from bothmain.goand a bidirectional completeness test (registry == doc.go == README == spec-list). Immediate patch: doc.go→55 +sprintfboolbullet, README table/bullet/examples,documentedAnalyzers()entry.-sprintfboolto bothcgo.ymlLINTER_FLAGSinvocations (default + wasm).Metrics
Historical Context
Memory had a gap: registry grew 43→55 across R61–R73 with no strategy entries recorded. This run reconciled state and re-established the new-linter audit checklist. Doc-sync drift is now traced to a structural test gap rather than repeated manual fixes.
Recommendations & Next-Run Focus (R75)
gh apireconcile FIRST).%v-on-bool is an intentional non-target (fixturegoodOtherVerb) — do not file as a coverage gap.References:
Beta Was this translation helpful? Give feedback.
All reactions