Skip to content

[deep-report] Join the CheckForUpdatesAsync goroutine and drop its time.After timer leak #47609

Description

@github-actions

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 ·

  • expires on Jul 25, 2026, 7:32 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions