Pattern fetching via Gitea contents API intermittently returns HTTP 500:
time=2026-05-11T07:45:46.943Z level=WARN msg="could not fetch patterns" path=. repo=rodin/ddd-patterns error="list contents \".\": list contents .: HTTP 500: {\"message\":\"\",\"url\":\"https://gitea.weiker.me/api/swagger\"}"
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() in cmd/review-bot/main.go.
Acceptance Criteria
GetAllFilesInPath retries on 5xx errors (max 3 attempts)
Exponential backoff between retries
Log retries at WARN level
Fail gracefully after all retries exhausted (current behavior)
## Problem
Pattern fetching via Gitea contents API intermittently returns HTTP 500:
```
time=2026-05-11T07:45:46.943Z level=WARN msg="could not fetch patterns" path=. repo=rodin/ddd-patterns error="list contents \".\": list contents .: HTTP 500: {\"message\":\"\",\"url\":\"https://gitea.weiker.me/api/swagger\"}"
```
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()` in `cmd/review-bot/main.go`.
## Acceptance Criteria
- [ ] `GetAllFilesInPath` retries on 5xx errors (max 3 attempts)
- [ ] Exponential backoff between retries
- [ ] Log retries at WARN level
- [ ] Fail gracefully after all retries exhausted (current behavior)
rodin
added the wip label 2026-05-11 07:53:42 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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)