add retry logic for transient GitHub API errors during PR creation (Issue #1478)#1479
Open
konard wants to merge 5 commits into
Open
add retry logic for transient GitHub API errors during PR creation (Issue #1478)#1479konard wants to merge 5 commits into
konard wants to merge 5 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #1478
…ssue #1478) The `gh pr create` command could fail with transient GitHub server errors (e.g., "Something went wrong while executing your query") during GitHub service disruptions. The code had no retry mechanism for these errors, causing immediate failure. This adds exponential backoff retry (up to 3 attempts with 5s/10s/15s delays) for transient server errors, following the same pattern used for compare API and PR verification retries. Also adds case study documentation with root cause analysis. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 tests covering: - Transient error detection (GraphQL errors, 502/503/504, network errors) - Non-transient error exclusion (auth, validation, permissions) - Retry logic with exponential backoff (5s, 10s, 15s) - Original bug scenario reproduction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
C494:160A:1899070D:156DE0AF:69C2EF89 when reporting this issue.
konard
marked this pull request as ready for review
March 25, 2026 09:53
This reverts commit f953166.
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (1592KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Contributor
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
konard
added a commit
that referenced
this pull request
Mar 25, 2026
21 tests covering: - Exact PR #1479 false positive scenario reproduction - Grace period boundary conditions (0s, 119s, 120s, 300s) - Null commit date edge case - Workflow file PR trigger parsing patterns - Backward compatibility with issue #1466 (action_required) - End-to-end scenarios (fork PRs, paths-ignore, schedule-only) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 tasks
konard
added a commit
that referenced
this pull request
Mar 26, 2026
Downloaded PR #1479 details including statusCheckRollup (confirms lint and check-file-line-limits failures at 09:56:11, CI started at 09:55:18), PR comments showing the false positive "Ready to merge" timeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Fixes #1478
The
gh pr createcommand insolve.auto-pr.lib.mjscould fail with transient GitHub server errors (e.g.,"Something went wrong while executing your query") during service disruptions, causing the entire solve session to abort without any retry attempt.Root Cause
On 2026-03-24, a confirmed GitHub service disruption caused the
gh pr createGraphQL mutation to return a 500-class error. The Cyrillic characters in the PR title ("update враг снайпер") were initially suspected but ruled out — GitHub's API fully supports UTF-8/Cyrillic in PR titles.The code already had retry logic for:
But the
gh pr createcommand itself had no retry logic for transient server errors.Changes
src/solve.auto-pr.lib.mjs: Added retry loop with exponential backoff (3 attempts, 5s/10s/15s delays) for transient GitHub API errors during PR creation. Non-transient errors (auth, validation, "No commits between") still fail immediately.tests/test-pr-creation-retry-1478.mjs: 24 tests covering transient error detection, retry behavior, backoff timing, and the original bug scenario.docs/case-studies/issue-1478/: Full root cause analysis with timeline, evidence, and references to GitHub status page and cli/cli issues..changeset/pr-creation-retry-1478.md: Changeset for patch release.Test plan
node tests/test-pr-creation-retry-1478.mjs)🤖 Generated with Claude Code