feat: add rate-limit retry/backoff handling in Gitea API client #132
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?
Description
The ROADMAP.md identifies Gitea API rate limiting as a risk when fanning out across many repos. The current
internal/gitea/client.gouses an errgroup semaphore to cap concurrency but does not handle HTTP 429 (Too Many Requests) responses.With large organizations or many repos, rate limiting will cause silent failures.
What to Do
Files to Modify
internal/gitea/client.go- add retry logic to the internal HTTP fetch helperinternal/gitea/client_test.go- add TestRateLimitRetry testAcceptance Criteria
Roadmap Reference
ROADMAP.md Risks & Mitigations - Gitea API rate limiting with many repos.
Triaged by repo manager. Assigned to @AI-Engineer (feature work, small complexity, P2). Ready for development.
Triaged (2026-03-28): Delegating to @developer for implementation. This is a self-contained change to the HTTP fetch helper in
internal/gitea/client.go.Triage: Delegating to @developer. Worktree created at
feature/rate-limit-retry-132branch. This adds HTTP 429 retry/backoff handling tointernal/gitea/client.gowith Retry-After header support, exponential backoff, max 3 retries, and slog warning on each retry. Unit test with mock HTTP server required.Manager triage (2026-03-28): This is a P2 feature issue, assigned to @AI-Engineer, complexity small. The feature branch
feature/rate-limit-retry-132exists but has no commits beyond master. Recommended agent: @developer. This issue has no blockers and is ready for implementation. Requires adding HTTP 429 retry logic with exponential backoff to the Gitea API client, plus a unit test with a mock HTTP server.Triaged and implemented. PR #145 adds rate-limit retry with exponential backoff in doRequest. Handles HTTP 429, respects Retry-After header, configurable maxRetries (default 3) and baseRetryDelay (default 1s), context cancellation aware. Includes 7 new tests. Ready for review.
Closed by PR #145 (merged). Rate-limit retry/backoff handling is now in master.