Repository navigation
Description
Summary
timesleepnocontext (26th custom linter) is registered in cmd/linters/main.go and documented, but is not in the CI-enforced analyzer set. An enforce-readiness sweep of its entire run scope (./cmd/... ./pkg/...) shows it is essentially clean: the only production site it flags is the deferred-cleanup false positive tracked separately. Once that FP is excluded, zero production violations remain, so the analyzer can be enforced by appending one flag.
Current CI state
.github/workflows/cgo.yml:1123 runs make golint-custom with 14 enforced flags:
-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib
-regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror
-uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak
-timesleepnocontext is absent.
Evidence — full-scope sweep
All 11 non-test time.Sleep calls under ./cmd/... and ./pkg/... mapped to their enclosing function's signature:
| Site | Enclosing function | Has context.Context param? |
|---|---|---|
pkg/workflow/docker_validation.go:219 |
validateDockerImage(image, verbose, requireDocker) |
no |
pkg/cli/run_workflow_tracking.go:73 |
getLatestWorkflowRunWithRetry(lockFileName, repo, verbose) |
no |
pkg/cli/trial_repository.go:156 |
ensureTrialRepository(...) |
no |
pkg/cli/logs_rate_limit.go:87/97/110/121 |
checkAndWaitForRateLimit(verbose) |
no |
pkg/cli/mcp_inspect_inspector.go:164/208 |
spawnMCPInspector(workflowFile, serverFilter, verbose) |
no |
pkg/cli/update_extension_check.go:411 |
cleanupStaleWindowsBackups(extDir, ownBackup) |
no |
pkg/cli/mcp_inspect.go:138 |
InspectWorkflowMCP(ctx, ...) via deferred cleanup closure |
yes — false positive (see precision issue) |
No production function with a real context.Context parameter contains a genuinely cancellable time.Sleep. (Note: checkAndWaitForRateLimit arguably should take a ctx, but that is a design change outside this analyzer's detection.)
Recommendation
- Land the precision fix first (deferred-cleanup FP carve-out) so
mcp_inspect.go:138is no longer reported. - Append
-timesleepnocontextto theLINTER_FLAGSin.github/workflows/cgo.yml:1123. - Confirm
make golint-custom LINTER_FLAGS="-timesleepnocontext -test=false"reports zero violations.
This follows the proven zero-violation enforce pattern used for fileclosenotdeferred (#35390), osexitinlibrary/rawloginlib (#35130), httpnoctx (#39016), and timeafterleak (now enforced).
Blocked by: the deferred-cleanup precision fix (companion issue). Effort: small once unblocked — one CI flag append.
Validation checklist
- Precision FP fix merged.
-
-timesleepnocontextadded tocgo.ymlLINTER_FLAGS. - CI green with the new flag.
Generated by 🤖 Sergo - Serena Go Expert · 280.5 AIC · ⌖ 13.9 AIC · ⊞ 5.3K · ◷
- expires on Jun 21, 2026, 9:37 PM UTC-08:00
Activity
Copilot commentedon Jun 15, 2026
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: 1DC0:FCBAC:97EF1DB:23867DCF:6A2FB86E)
github-actions commentedon Jun 15, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Jun 22, 2026
This issue was automatically closed because it expired on 2026-06-22T05:37:29.534Z.