fix(#159): retry fullsend post-review on transient API failures#161
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fix(#159): retry fullsend post-review on transient API failures#161fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Wrap the fullsend post-review call in a retry loop (max 3 attempts with 5s/15s backoff) to handle transient GitHub API errors such as 422 Unprocessable Entity during PR transitional states. Previously, a single non-zero exit (other than code 10 for stale-head) caused post-review.sh to exit immediately. This meant a valid review comment could be posted while the formal review API call failed, leaving the PR without an outcome label and requiring human diagnosis. Changes: - scripts/post-review.sh: add retry loop around fullsend post-review. Exit code 10 (stale-head) bypasses retry and uses existing handler. On exhausted retries, a degraded-mode fallback applies the outcome label directly so the PR is not left in limbo. The script still exits 1 to signal the formal review was not posted. - scripts/post-review-test.sh: add 7 integration tests covering retry-then-succeed, retries-exhausted with fallback for approve/ comment/request-changes actions, stale-head bypass, and retry log message format. POST_REVIEW_RETRY_DELAY env var overrides backoff for all retries (set to 0 in tests to skip sleep). Closes #159
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wrap the fullsend post-review call in a retry loop (max 3 attempts with 5s/15s backoff) to handle transient GitHub API errors such as 422 Unprocessable Entity during PR transitional states.
Previously, a single non-zero exit (other than code 10 for stale-head) caused post-review.sh to exit immediately. This meant a valid review comment could be posted while the formal review API call failed, leaving the PR without an outcome label and requiring human diagnosis.
Changes:
Exit code 10 (stale-head) bypasses retry and uses existing handler.
On exhausted retries, a degraded-mode fallback applies the outcome
label directly so the PR is not left in limbo. The script still
exits 1 to signal the formal review was not posted.
retry-then-succeed, retries-exhausted with fallback for approve/
comment/request-changes actions, stale-head bypass, and retry
log message format.
POST_REVIEW_RETRY_DELAY env var overrides backoff for all retries (set to 0 in tests to skip sleep).
Closes #159
Post-script verification
agent/159-retry-post-review)51561b23f669baf5e6ad027c5de39b0fdb199ab9..HEAD)