[sergo] Sergo Report 2026-08-06: Registry Restructure and Cache Catchup Audit #50764
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Sergo - Serena Go Expert. A newer discussion is available at Discussion #51000. |
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.
Sergo Report: Cache-Catchup + Registry-Restructure Audit — 2026-08-06
Run: §31072155278 · Strategy:
CACHE-CATCHUP-registry-restructure-audit+newexplore-goroutinemissingrecover-defer-target-semanticsExecutive summary
Serena's LSP toolset is unchanged (23 tools). The linter registry itself was restructured:
cmd/linters/main.gono longer inlines the analyzer list — it's nowmultichecker.Main(linters.All()...), with the canonical list moved to a newpkg/linters/registry.go. The registered-analyzer count jumped from 43 → 63 (+20) since the last locally cached run.My local strategy cache (
sergo-strategies.jsonl) had a gap: its last entry was R60 (2026-07-08), butgh apireconciliation shows sergo issues closing continuously through at least 2026-08-03 — roughly 26+ runs happened without their strategy/stats getting persisted back to this memory branch (likely a prior run exceeding the 10KB memory-patch budget). Zero sergo issues were open at the start of this run; the whole known bug-class surface (enforce-readiness, doc-sync, autofix import-robustness) has clearly been iterated many times already. I've caught the cache up and flagged the likely root cause for next time.Tool / registry changes
cmd/linters/main.gopkg/linters/registry.go→All()New linters since R60:
appendoneelement,bytesbufferstring,bytescomparestring,goroutinemissingrecover,hardcodedfilepath,ioutildeprecated,logfatallibrary,mapclearloop,mapdeletecheck,nilctxpassed,regexpdynamicpattern,sprintfbool,stringbytesroundtrip,stringsconcatloop,stringscountcontains,stringsindexhasprefix,stringsjoinone,timenowsub,trimleftright,uncheckedflushreturn,walkfuncerrshadow.Strategy split (50/50)
nolint.Index/filecheck.Indexwiring, syntactic stdlib-package matching,SuggestedFiximport-robustness — across all 63 linters plus the sharedinternal/{astutil,analyzerutil,nolint,filecheck}helpers. Result: all clean. Confirmed the R60writebytestringcompile-safety fixes (isExactStringwrap,ioauto-import) landed and hold in current code.Findings
1 confirmed, filed issue (click to expand)
goroutinemissingrecover: defer of a named recover-helper is misreported as "missing recover"hasTopLevelRecoverDefer(goroutinemissingrecover.go:92-111) only accepts a deferred call whose target is an*ast.FuncLit. Per the Go spec,recover()stops a panic whenever it's "called directly by a deferred function" — a named function (or method) that is itself the defer target and callsrecover()in its own body is equally valid:The linter's own doc/testdata already accept "a named function can install its own recovery" as a reason to trust code for the goroutine-launch case (
go f()is out of scope) — the same principle just isn't applied to the defer target inside a literal-launched goroutine, so the implementation is inconsistent with its own design intent.recover()site (pkg/cli, pkg/console, pkg/workflow) shows all current usage is the inline literal form, so zero live false positives.pass.TypesInfoand check their body the same way literals are checked today.Generated task
goroutinemissingrecover's defer-target detection to accept named-function/method recover helpers, with new testdata coverage for both the accepting and still-rejecting cases. (Issue filed, labelsergo, temporary_idaw_sg_grec1.)Metrics
pkg/; 63 registered custom analyzers inpkg/linters/registry.goHistorical context
Prior runs (R56–R60) progressively closed the syntactic-stdlib-match regression family,
SuggestedFixcompile-correctness gaps (writebytestring, sprintfint, tolowerequalfold), and numerous enforce-readiness/doc-sync issues. All of those are now clean and stable. This run's main non-finding contribution was repairing the memory gap so future runs don't have to re-derive the last month of registry history fromgh apialone.Next-run focus
sg61a1lands; re-audit with the corrected registry-count detector (pkg/linters/registry.go, notcmd/linters/main.go, which is now dead for this purpose).*ast.FuncLittargets without a named-function fallback.sergo-strategies.jsonlactually gets written each run going forward — this run kept its patch terse specifically to test whether that was the cause of the prior gap.References:
All reactions