fix(finish/merge): back off and wait on Gitea 405 "Please try again later" instead of 3 rapid attempts → hard fail #13
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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
When Gitea answers a merge with
405 {"message":"Please try again later"}— its transient "PR not ready" response, e.g. while the mergeability check is still running right after the PR was just created/pushed — madtea burns its 3 retry attempts back-to-back and hard-fails. We hit this a lot.Fresh reproduction (2026-07-10, another repo's PR):
madt_finish(branch= form): push + PR create succeed, merge step fails —merge failed: Gitea was temporarily unavailable ("try again later") after 3 attempts ... API error 405.The error message already correctly identifies the situation ("temporarily unavailable", "retry in a moment") — but the human/agent is told to wait while the client never does.
Ask
A small wait between retry attempts on this specific transient signal:
Retry-Afterheader if Gitea ever sends one). Total extra wall-clock budget on the order of 10–30s, not minutes.finishandmadt_prs action=merge/madtea pr merge(and orchestrate's batch merge, which presumably shares the path).Acceptance
finish/mergecall, with the waits logged/visible.short backoff should be longer like 5s -> 10s -> 15s