[sergo] Sergo Report: STALE-CACHE-RECONCILE + Library-Family Parity Probe - 2026-09-08 #59361
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Sergo - Serena Go Expert. A newer discussion is available at Discussion #59628. |
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
This run (R61) prioritized reconciling a ~2-month stale local cache against live repository state before generating any new findings, and hit a real infrastructure gap: Serena MCP tools were entirely absent this session (0 of the 23 tools recorded in prior-run cache), so all analysis fell back to
Grep/Read/Bash. That gap has been reported viamissing_tool.No new issues were filed this run — after auditing six previously-untouched linters and reconciling the open backlog, nothing surfaced that cleared the "concrete, non-duplicate, high-confidence" bar. That's a legitimate outcome, not a shortfall: the codebase has been audited exhaustively across 60+ prior runs, and forcing a weak finding to hit a quota would cost more in reviewer time than it returns.
Tool inventory changes
missing_toolcmd/linters/main.go(grep -c Analyzer= 43)cmd/linters/main.gonow just callslinters.All(); registry lives inpkg/linters/registry.goThe old "registry delta" detector (
grep -c Analyzer cmd/linters/main.go) is now silently broken — it would report 0. Future runs should detect drift viapkg/linters/registry.go's analyzer list or the "All N active analyzers" count inpkg/linters/doc.go's header comment.Strategy: 50/50 cached-reuse + new-exploration
Cached-reuse component (proven pattern: sibling-family parity probing). The repo has a recurring, well-confirmed bug class: linters that belong to a structural "family" (same skip-logic scaffolding) drift out of sync when one gets a fix the others don't. I re-ran this lens against the "library-scoped" family (
osexitinlibrary,panic-in-library-code,rawloginlib,osgetenvlibrary,ossetenvlibrary,logfatallibrary) and against the SuggestedFix-compile-correctness pattern that previously caught thewritebytestringbug (sg60a1).New-exploration component. Of the +24 newly-registered analyzers, five had zero issue history anywhere in the tracker:
mapdeletecheck,logfatallibrary,ioutildeprecated,sprintfbool,bytesbufferstring, plusnilctxpassed. These got a full read-through for the standard failure modes (syntactic vs. type-resolved package matching, SuggestedFix assignability, comment-overlap guards, nolint/test-skip parity).Targets/success criteria set at start: reconcile backlog against
gh api, confirm/deny thesg60a1fix landed, find 0–2 new high-confidence issues from the fresh-linter sweep, and produce an accurate coverage map for future runs.Backlog reconciliation (all 4 open
sergoissues re-verified against current code)internal/nolint: space-prefixed// nolint:xdirectives ignoredpkg/linters/internal/nolint/nolint.go:59-60doesstrings.TrimPrefix(comment.Text, "//")then requiresstrings.HasPrefix(text, "nolint:")— a comment written as// nolint:foo(space after//, the common style) leaves a leading space and never matches. This is the single highest-leverage open bug in the tracker: it silently breaks suppression for all 67 linters for anyone using the conventional spaced style.SuggestedFixedits withoutHasOverlappingCommentguardSuggestedFixes callastutil.HasOverlappingCommentfirst; 18 now lack it (was 13 when filed), including newly-registeredbytesbufferstringandmapclearloop. Growth is expected as new autofix linters get added without copying the guard — worth a lint-of-the-linters check if the team wants to stop the bleed.goroutinemissingrecover: recover-after-risky-code accepted as safehasTopLevelRecoverDefer(pkg/linters/goroutinemissingrecover/goroutinemissingrecover.go:97-125) scans the entire top-level statement list for any deferred recover, with no check that it appears before the panic-risking statements — adeferat the bottom of the closure is treated identically to one at the top.generatedyamlheredoc:<<inside a quoted shell string misreported as heredoclineContainsShellHeredoc(pkg/linters/generatedyamlheredoc/generatedyamlheredoc.go:78-103) tracks arithmetic-expression quoting state only in the substring before the<<, never checking whether the<<itself sits inside an open single/double-quoted run on the same line.sg60a1(writebytestring compile-correctness) — confirmed landed.pkg/linters/writebytestring/writebytestring.gonow has a correctisExactString(*types.Basiccheck, notUnderlying()-based) andbuildStringExprwraps named string types instring(...)before emitting the fix. The bug class this represented (anUnderlying()==Stringcheck copied from a core-type-accepting API onto an exact-type-requiring API) has not recurred in any of the newer autofix linters I read this run.Fresh-linter audit (zero prior issue history) — all clean
Read in full:
mapdeletecheck,logfatallibrary,ioutildeprecated,sprintfbool,bytesbufferstring,nilctxpassed. Checked each against the standard failure catalogue (syntacticident.Name == "pkg"matching instead ofastutil.IsPkgSelector, SuggestedFix assignability, missingHasOverlappingComment, nolint/test-skip parity, ancestor-walk scope-boundary bugs). All six useastutil.IsPkgSelector/type-resolved matching correctly, and the ones that emit fixes (sprintfbool,bytesbufferstring) build sound edits —sprintfboolguards with bothQualifierShadowedandHasOverlappingComment;bytesbufferstringcorrectly excludes*bytes.Buffer(pointer) specifically becausenilreceivers would change panic-vs-"<nil>"behavior.One asymmetry surfaced but was not filed:
rawloginlibis missing thestrings.HasSuffix(pkgPath, ".test")skip that its five siblings in the "library-scoped" family all carry with an explicit "Skip test files" comment. I traced the actual risk surface, though:filecheck.ShouldSkipFilenamealready excludes every_test.gofile's content per-call for all six linters, and the.test-suffixed package is only the Go-toolchain-synthesized test-binarymain(no real source lives there). So the gap is real but inert — no concrete input reproduces a wrong diagnostic. Flagging it in this report rather than as an issue, per the "don't force a weak finding" rule.Metrics
missing_tool), but the new-exploration lane didn't produce a filable bug this cyclesergo-tools-list.json,sergo-strategies.jsonl,sergo-stats.json(validated within the 12 KB patch budget viapush_repo_memory)Historical context
Total runs: 61 (60 previously cached + this one). Cumulative findings: 413. The tracker currently sits at only 4 open
sergoissues against 60+ closed, meaning most of the "easy" bug classes (syntactic package matching, SuggestedFix comment-overlap, FuncLit scope-boundary over-attribution, enforce-readiness sweeps) have already been found and fixed across the linter family. Marginal new findings are getting harder to source — expect lower per-run issue counts going forward unless the registry keeps growing at its current pace (+24 analyzers since the last cached checkpoint).Recommendations / next-run focus
// nolint:xstyle. Worth escalating outside the normal issue queue if it isn't already being worked.grep -c Analyzer cmd/linters/main.go(now always 0) to counting.Analyzer,entries inpkg/linters/registry.goor parsing thedoc.goheader count.HasOverlappingCommentrequirement belongs in a lint-of-the-linters check rather than being caught retroactively per new analyzer.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
api.anthropic.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
All reactions