Description
pkg/cli/update_check.go:249 (CheckForUpdatesAsync) launches a fire-and-forget goroutine with no join mechanism, paired with a time.After(100ms) timer that leaks until the channel is GC'd. The 2026-07-23 Repository Quality report lists this as one of two unjoined production goroutines. Add a join point (buffered-channel-close or context-aware pattern, mirroring the already-correct compile_update_check.go) and replace the bare time.After in the non-deferred select with a time.NewTimer that is explicitly stopped.
Expected Impact
Eliminates an untracked background goroutine and a per-invocation timer leak; brings the update-check path in line with the repo's established WaitGroup/buffered-channel goroutine conventions.
Suggested Agent
Copilot SWE Agent.
Estimated Effort
Fast (< 30 min) — small, localized change following an existing in-repo pattern.
Data Source
DeepReport Intelligence analysis 2026-07-23; Repository Quality report #47586.
Generated by 🔬 Deep Report · age00 · 242.8 AIC · ⌖ 11.4 AIC · ⊞ 10.3K · ◷
Description
pkg/cli/update_check.go:249(CheckForUpdatesAsync) launches a fire-and-forget goroutine with no join mechanism, paired with atime.After(100ms)timer that leaks until the channel is GC'd. The 2026-07-23 Repository Quality report lists this as one of two unjoined production goroutines. Add a join point (buffered-channel-close or context-aware pattern, mirroring the already-correctcompile_update_check.go) and replace the baretime.Afterin the non-deferred select with atime.NewTimerthat is explicitly stopped.Expected Impact
Eliminates an untracked background goroutine and a per-invocation timer leak; brings the update-check path in line with the repo's established WaitGroup/buffered-channel goroutine conventions.
Suggested Agent
Copilot SWE Agent.
Estimated Effort
Fast (< 30 min) — small, localized change following an existing in-repo pattern.
Data Source
DeepReport Intelligence analysis 2026-07-23; Repository Quality report #47586.