Repository navigation
[sergo] Sergo Report: New-Linter Audit (reflectdeepequalusage) and Clean Reconcile - 2026-10-07 #66437
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Sergo - Serena Go Expert. A newer discussion is available at Discussion #66774. |
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 R89. Serena tool set stable at 24 tools. The linter registry grew from 76 to 77 analyzers (reflectdeepequalusage). Reconcile of open sergo-labeled issues matched the prior run prediction exactly with zero reverse-phantom flips. One new, high-confidence, self-documented bug was found in the brand new linter and filed. Overall this was a clean, low-drama run: no reverse phantoms to refile, cached fixes held up, and the only action needed was the new-linter audit.
Tool and registry changes
Strategy: 50 percent cached, 50 percent new exploration
Cached half: reconcile open sergo issues via gh api, then verify in code (not by trusting the open or closed label) whether each is still genuinely unfixed. New-exploration half: audit the newly registered 77th linter from scratch, since a brand new linter is by definition the least-covered target available this run.
Findings
Reconcile (cached). gh api state=open labels=sergo returned exactly 2 open issues: #65753 (contextcancelnotdeferred native-vs-wasm CI enforcement asymmetry) and #66009 (globwalkignorederror and strconvparseignorederror still missing bare-statement discard detection). Both match the prior run prediction exactly, with zero new reverse-phantom closures this run.
Cached-vein verification. Re-read astutil.MatchDiscardedErrorCall (astutil.go:50-79): it still accepts only *ast.AssignStmt, confirming #66009 remains fully accurate and needs no refile.
New finding (reflectdeepequalusage, first audit). The linter detects reflect.DeepEqual only when called directly as a selector expression. If the function is first assigned to a variable and invoked indirectly (r := reflect.DeepEqual; r(a, b)), astutil.PackageCall requires call.Fun to type-assert to *ast.SelectorExpr, which fails for a bare identifier, so the call is never reported. The notable part: this exact scenario is already present in the linter own positive-case test fixture (testdata/src/a/a.go, function testDeepEqualWithAlias) with a comment stating it should be flagged, but it is the only function in that file with no
// wantannotation, meaning the test suite has quietly encoded the false negative as expected behavior rather than catching it as a regression. No live production call sites use this aliasing pattern today, and the linter is not yet CI-enforced (doc_sync_test.go lists it under notYetEnforced pending case-by-case review of existing reflect.DeepEqual uses), so there is no immediate risk, but it is worth fixing or formally documenting as a scope limit before enforcement is turned on.Task generated
Filed as a single GitHub issue (see below) recommending either extending analyzeCall to resolve aliased references via types info, or removing the misleading comment and fixture entry if aliasing is intentionally out of scope.
Issue created
Metrics this run
Historical context
Total runs to date: 89. Average success score: 8.72. This continues a run of clean reconciles (R87, R88) where the bounded 3-run strategy memory window shows zero flips, suggesting the maintainers are keeping up with sergo-filed issues at a steady cadence. A maintenance note: the repo-memory strategies log was measured at 93160 bytes, close to the 102400-byte cap, so the oldest entry was pruned this run and a standing prune-before-append policy was adopted to keep the file size stable going forward.
Recommendations and next-run focus
References:
All reactions