[sergo] Sergo Report: Registry Delta 43→55 + Doc-Sync Guard Completeness - 2026-07-22 #47191
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Sergo - Serena Go Expert. A newer discussion is available at Discussion #47468. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Executive Summary
Run R61 (61st Sergo run; prior R60 was 2026-07-08, 14 days / several missed cadences ago). The linter registry grew +12 (43 → 55 analyzers) in the interim — the largest single-interval delta on record. The team's velocity is exceptional: every one of the +12 new linters is already covered by a closed
sergoissue, or was audited clean this run. Zero opensergoissues at start.One fresh, non-duplicate finding filed: a structural gap in the doc-sync guard suite — the guard added to close #46977 bridged only the code surfaces, leaving the prose docs (
doc.go/README.md) in a second, disconnected consistency cluster.Filed: 1 issue (
#47190). Skipped: 0 (no duplicates — the finding is distinct from all prior doc-sync issues, which addressed live count drift rather than the test-topology gap).Tool & Detector Updates
pkg/linters/registry.go func All().cmd/linters/main.gois now a one-linermultichecker.Main(linters.All()...). The historicalgrep -c 'Analyzer' cmd/linters/main.gonew-linter detector is dead; usegrep -c '.Analyzer,' pkg/linters/registry.go(= 55) instead.Strategy (50/50 split)
Cached reuse (proven veins) + New exploration
Cached (50%) — proven bug-pattern lenses applied to new linters:
New exploration (50%) — batch audit of the +12 newly-added linters for the above veins, cross-validated against source + tests.
Success criteria: ≥1 distinct non-duplicate finding; no false positives; every claim source-anchored to file:line.
Findings
New linters audited — all CLEAN / thoughtfully-designed:
appendoneelementRunWithSuggestedFixes(golden). Spread formappend(s, []T{x}...)requiresTidentical tos's element type, so the→ append(s, x)rewrite is type-safe. Guards nested untyped composite lits (.go:115) and key-value elems.bytesbufferstring*bytes.Buffer(.go:126-134) becausestring(buf.Bytes())panics on a nil pointer whilebuf.String()returns"<nil>"— non-semantics-preserving. Only matches value receivers.ioutildeprecatedSuggestedFix;ioutil.ReadDir → os.ReadDirtype-change is a recommendation, not an autofix, so no non-compiling output. Low value.sprintfboolstrconvimport, removes orphanedfmt, handles shadowing/dot-import/comment-overlap, and gates on exacttypes.Typ[types.Bool](.go:112) — correctly avoiding the writebytestring named-type non-compiling trap.Filed finding —
#47190(doc-sync guard incomplete):The doc-sync test suite enforces two disjoint components with no bridge between them:
linters.All()=documentedAnalyzers()— viaTestRegistryMatchesDocumentation(spec_test.go:249, added to close doc-sync guards never cross-check the analyzer registry — sprintfbool (55th, registered) is undocumented in doc.go/README/spec_t [Content truncated due to length] #46977).doc.gobullets =README.mdtable — viaTestDocGo_AnalyzersMatchREADME(doc_sync_test.go:54).No test compares A against B. A linter added to
registry.go+documentedAnalyzers()but omitted fromdoc.go+README.mdpasses all tests (56==56 and 55==55). Additionally,TestRegistryMatchesDocumentationcomparesd.analyzer.Name, neverd.label, so the README-derived label strings are validated against nothing. Fix: assert the already-parseddoc.go/READMEslug sets equallinters.All()names, collapsing the two clusters into one total invariant.Generated Task
docBulletRe/readmeTableReparsers vslinters.All(); add label validation). Small, test-only, no production change. →#47190Metrics
#47190)sergoissues (pre-run)Historical Context
60 prior runs · 416 cumulative findings · avg success 8.74. Doc-sync is the most-reinforced guard (6 prior fixes) — this run extends that lineage by finding the structural gap the count-based fixes left open. The named-type autofix vein (writebytestring R60) is now demonstrably closed in newer linters (
sprintfboolgets it right).Recommendations & Next-Run Focus (R62)
grep -c '.Analyzer,' pkg/linters/registry.go.#47190landed.appendoneelement/bytesbufferstring(both clean) once 0 production violations are confirmed.References:
All reactions