[sergo] Sergo Report: cached-syntactic-stdlib-match-reverify+new-neveraudited-linter-sweep - 2026-08-19 #53902
Closed
Replies: 1 comment
|
This discussion was automatically closed because it expired on 2026-08-20T04:06:36.340Z.
|
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
Ran Sergo R61 after a large gap since the last memorized run (R60, 2026-07-08). The linter registry has grown substantially in the interim — from 43 to 66 analyzers — with 60+ runs' worth of issues already filed and closed by the team in that window. This run reconciled state, retired one fully-resolved probe class, and surfaced one new, previously-unaudited finding.
Tool & registry updates
cmd/linters/main.gonow just callslinters.All()— the oldgrep -c Analyzer main.godetector reads 0. New detector:grep -c '\.Analyzer,' pkg/linters/registry.go, cross-checked againstpkg/linters/doc.go's "N active analyzers" header (both agree: 66, doc-sync currently clean).gh api repos/github/gh-aw/issues?labels=sergo&state=open: only one open item,#52229 probe3-DELETE-ME— a stray non-substantive artifact, not a real finding, left untouched.Strategy split (50/50)
Cached component — re-verify
syntactic_stdlib_match: Previously (R59/R60) 5 linters were known to compareident.Name == "pkg"instead of usingastutil.IsPkgSelector, a pattern prone to false positives (shadowed identifiers) and false negatives (import aliases). Re-ran the grep across all 66 linters: zero hits. This vein is now fully migrated and closed — retiring it as an active probe (recorded in memory; only worth re-checking if a brand-new linter reintroduces raw.Namecomparisons).New-exploration component — never-audited-linter sweep: Extracted every linter name ever mentioned across the full sergo issue title corpus (100+ issues) and diffed it against all 66 registered analyzer names. Exactly one linter,
generatedyamlheredoc, had zero mentions in 60+ prior runs — a genuine blind spot. Deep-read its logic with Serena/Grep and found a real correctness gap (below).Findings
generatedyamlheredoc— bare(( ... ))arithmetic with<<misreported as a heredoclineContainsShellHeredoc(pkg/linters/generatedyamlheredoc/generatedyamlheredoc.go:89) guards against false-flagging shell arithmetic shifts by checking for the literal substring"$((". It does not recognize bash's other arithmetic spelling, the bare(( expr ))compound command/conditional ((( count << 1 )),if (( retries << 1 > max )); then).isShellWordByteaccepts digits0-9, so any numeric right-hand operand of<<(<< 1,<< 2, ...) is misread as a heredoc delimiter.$((1 << 2))spelling (correctly unflagged); there is no test for the bare-((spelling, so the gap is untested..gostring literal combines bare((with<<today, and the linter isn't wired into any CILINTER_FLAGSenforcement list. But it's aimed squarely at generated-workflow shell strings, exactly where arithmetic idioms (retry backoff, bitmask flags) are likely to appear as generator logic grows, with no legitimate fix available once it fires (there's no heredoc to remove).#53901), labeledsergo, with reproduction steps and a suggested fix (broaden the guard to also match bare"((", add a testdata case).Repository context gathered this run
pkg/: 66 registered analyzers (pkg/linters/registry.go:83-150), doc-sync clean againstpkg/linters/doc.go.cmd/linters/main.gogrep topkg/linters/registry.gogrep — noted in memory for future runs.syntactic_stdlib_match,scope_boundary_funclit, or suppression-wiring gaps found on spot-checked linters (hardcodedfilepathancestor walks areGenDecl/CallExpr-scoped, not the loop/goroutine-boundary pattern that historically caused bugs).Generated tasks
generatedyamlheredoc's arithmetic guard to recognize bare(( ... ))in addition to$(( ... )), with a regression test case (#53901).Metrics
Historical context
Next-run focus (R62)
#53901landed.All reactions