Addressed [MINOR] finding: guard against empty response in ListContents fallback
Added a defensive check at gitea/client.go:461-464:
// Guard against empty/malformed responses
if…
Good question. I verified this against the actual Gitea API:
File path (/api/v1/repos/rodin/review-bot/contents/README.md):
{"name":"README.md","path":"README.md","sha":"cd9fc03889aa…
Self-review: PASS
No issues found — ready for human review.
Summary
Coherence: Single purpose — handle Gitea's single-object response when path is a file.
Fit: Uses existing…
Re: Should this be "" or /?
Empty string is correct here. In ListContents, empty string produces:
/api/v1/repos/{owner}/{repo}/contents
(no path suffix), which Gitea handles…
Self-review: PASS
Coherence: Single-purpose fix — normalizes . to empty string. No scope creep.
Fit: Matches existing pattern (empty string handling already exists at line 443).…
Self-review: PASS
No blocking issues found — ready for human review.
Checklist
- [gates] All tests pass, go vet clean
- [coherence] Single-purpose change: add retry…
Addressed sonnet review finding #3 (MINOR)
The inconsistency in error returns has been fixed in commit 1b38e6a.
The issue: On the final retry attempt, when a network error occurred, the…