-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
4 / 44 of 4 issues completedClosed
4 / 44 of 4 issues completed
Copy link
Labels
Description
Overview
This tracking issue implements improvements to gh-aw's usage of the sourcegraph/conc library for concurrent artifact downloading, based on findings from the Go Fan review.
Source: Discussion #8587
Current State
The project currently uses conc for concurrent artifact downloading in pkg/cli/logs_orchestrator.go with:
- ✅ Scoped concurrency with
pool.NewWithResults[DownloadResult]() - ✅ Bounded concurrency via
WithMaxGoroutines(MaxConcurrentDownloads) - ✅ Automatic panic recovery
- ✅ Type-safe result collection
Planned Improvements
High Priority
- Add context cancellation support - Enable graceful shutdown on Ctrl+C for long-running downloads
- Document concurrency decisions - Explain configuration choices and behavior guarantees
Medium Priority
- Add concurrent download test coverage - Test panic recovery, result ordering, and resource cleanup
- Document panic behavior - Clarify automatic panic recovery for code reviewers
Lower Priority
- Make concurrency limits configurable - Allow tuning based on system resources and API limits
Benefits
- 🎯 Better user experience: Graceful cancellation of long-running operations
- 📚 Improved maintainability: Clear documentation of concurrency decisions
- 🛡️ Regression prevention: Comprehensive test coverage for concurrent behavior
- ⚙️ Flexibility: Configurable concurrency based on environment
Related Resources
- sourcegraph/conc GitHub
- Current usage:
pkg/cli/logs_orchestrator.go:481 - Module summary:
specs/mods/sourcegraph-conc.md
AI generated by Plan Command for discussion #8587