🛠️ fix: harden GitHub transport diagnostics#52
Merged
SigureMo merged 4 commits intoMay 23, 2026
Conversation
Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens gh-llm’s GitHub transport diagnostics and retry behavior, aiming to reduce false negatives in doctor output and provide more actionable follow-up steps when GraphQL/transport errors occur.
Changes:
- Adjust
doctorto downgrade noisygh auth statusfailures to a warning when both REST and GraphQL probes succeed. - Increase retry attempts for GitHub transport failures (notably GraphQL-backed reads) and broaden retryable error detection (e.g., stream/TLS/proxy/5xx indicators).
- Update layered diagnostics messaging and suggested follow-up commands to prefer direct API probes over
gh auth status.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_cli.py | Adds/updates tests covering doctor warning behavior, expanded retry cases (e.g., stream errors), and new retry counts/messages. |
| src/gh_llm/github_api.py | Increases retry/backoff limits, adds mutation-specific retry cap, and expands retryable error detection (including stdout+stderr inspection). |
| src/gh_llm/diagnostics.py | Updates GraphQL transport diagnosis text and shifts suggested next steps toward direct REST/GraphQL probes; broadens transport pattern detection. |
| src/gh_llm/commands/doctor.py | Refactors probe execution and reconciles auth-status failures into warnings when API probes succeed. |
| README.md | Documents the new doctor warning behavior and updated “Try next” probe guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Codex <noreply@openai.com>
SigureMo
reviewed
May 23, 2026
Co-authored-by: Codex <noreply@openai.com>
SigureMo
requested changes
May 23, 2026
Co-authored-by: Codex <noreply@openai.com>
SigureMo
approved these changes
May 23, 2026
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
gh auth statusfailures as doctor warnings when REST and GraphQL probes both succeed.Validation
uv run ruff check .uv run ty check --error-on-warning src/gh_llm testsuv run pytest -qprettier --check README.mdgh-llm pr view 79119 --repo PaddlePaddle/Paddle --auto-collapse-author PaddlePaddle-bot --auto-collapse-author Paddle-CI-Bot