fix: check CSMA output for rate limit errors even on exit 0 - #1711
Merged
Conversation
The gh CLI (notably `gh project view`) can exit 0 while printing a GraphQL rate limit error to stderr. The CSMA wrapper previously only entered the retry loop on non-zero exit codes, so these errors passed through undetected — downstream `jq` would fail to parse the error text as JSON and `set -e` would kill the script with no retries. Now all three CSMA runners (github_csma_run, github_csma_run_pipe, github_csma_run_cmd) always inspect combined stdout+stderr for rate limit patterns regardless of exit code. Fixes: https://github.com/fullsend-ai/.fullsend/actions/runs/26447310264 Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
Site previewPreview: https://0d5f50cf-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsNo findings. |
rh-hemartin
approved these changes
Jun 1, 2026
3 tasks
3 tasks
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
ghCLI (notablygh project view) can exit 0 while printing a GraphQL rate limit error to stderr. The CSMA wrapper previously only entered the retry loop on non-zero exit codes, so these errors passed through undetected — downstreamjqwould fail to parse the error text andset -ewould kill the script with no retries.github_csma_run,github_csma_run_pipe,github_csma_run_cmd) always inspect combined stdout+stderr for rate limit patterns regardless of exit code.Root cause: prioritize run 26447310264 failed because
gh project viewreturned exit 0 withGraphQL: API rate limit exceeded for installation ID 131739396.on stderr. The CSMA wrapper saw exit 0 and returned success. The error text was then piped tojqwhich couldn't parse it, andset -ekilled the script immediately — zero retries.Test plan
exit0-rate-limit-retry: gh exits 0 with rate limit error for first 2 calls, then succeeds — verifies CSMA retries and the full script completesexit0-rate-limit-exhausted: persistent exit-0 rate limit errors — verifies CSMA exhausts retries and reports the rate limit error on stderr🤖 Generated with Claude Code