chore: verify errgroup semaphore cap (5-10) in aggregation layer concurrent API calls #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The roadmap (Phase 1.4) specifies: "Concurrent API calls across repos using
errgroupwith a semaphore (cap at 5-10)". Verify this design decision is correctly implemented and the cap is enforced to prevent rate limiting on the Gitea instance.What to do
internal/gitea/client.go— locateerrgroupusage inListAllIssuesandListAllPullRequestsgolang.org/x/sync/semaphore) limits concurrency to 5-10Acceptance Criteria
internal/gitea/client.gocontains explicit semaphore-based concurrency controlgo test -race ./...Roadmap Reference
Phase 1.4 — Design decisions: "Concurrent API calls across repos using
errgroupwith a semaphore (cap at 5-10)"Triaged and assigned to AI-Engineer. This is P1 -- the errgroup semaphore cap is a correctness concern for the aggregation layer. Should be addressed before further concurrent API work.
Sprint planning review (2026-03-28): This issue is already resolved in the codebase.
Inspecting
internal/gitea/client.goconfirms:maxConcurrent intfield on theClientstruct (line 27)5in the constructor (line 133)sem := make(chan struct{}, c.maxConcurrent)used in all fan-out functions (lines 277, 367, 480, 1000)The semaphore cap of 5 is correctly implemented with a buffered channel pattern. There are no unbounded concurrent API calls. This satisfies the roadmap spec exactly.
Closing as resolved — the code already meets the acceptance criteria.