Add retry logic for pattern fetch API calls #68
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?
Problem
Pattern fetching via Gitea contents API intermittently returns HTTP 500:
This happens even for public repos like
rodin/ddd-patterns. Manual testing shows 5/5 successes - the 500s appear to be transient, possibly load-related when multiple review jobs hit the API simultaneously.Impact
Reviewers run without pattern context when fetch fails, reducing review quality.
Solution
Add retry with exponential backoff (2-3 attempts, 1s/2s delays) to
fetchPatterns()incmd/review-bot/main.go.Acceptance Criteria
GetAllFilesInPathretries on 5xx errors (max 3 attempts)