PR Review Agent: make failure runs diagnosable and harden transient setup failures#353
Conversation
Dev-Lead — rate-limited (intent: fix-bot-comment)PR: #353 |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Dev-Lead — rate-limited (intent: human)PR: #353 |
|
Note @don-petry I received your request but all AI engines are currently rate-limited. Please re-mention |
There was a problem hiding this comment.
Pull request overview
This PR improves the diagnosability and resilience of the PR Review Agent workflow by making authentication problems visible early, retrying transient npm install failures, and uploading failure-only debug artifacts.
Changes:
- Add an early “Verify auth scopes” step that prints
gh auth statusoutput and fails fast when required scopes are missing. - Add a small
npm_install_retrywrapper and use it for Claude/Gemini CLI installs. - Upload a debug artifact on workflow failure containing candidate lists and cascade/legacy logs from
/tmpand${{ runner.temp }}.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| auth_status="$(gh auth status 2>&1)" | ||
| echo "$auth_status" |
| # Current scripts emit diagnostics under /tmp/cascade. | ||
| prs.txt | ||
| /tmp/cascade/** | ||
| # Legacy/supplemental review logs from earlier review scripts. | ||
| /tmp/review-*.log | ||
| # Keep runner.temp paths too for cross-runner compatibility. |
|
@copilot - review, analyze, address and resolve the comments. Ensure CI is passing. |
Addressed and pushed in 7c1af5e. I fixed both actionable workflow review issues: (1) |
Dev-Lead — rate-limited (intent: human-pr)PR: #353 |
|
Note I received your request but all AI engines are currently rate-limited. I'll retry automatically once the rate limit clears. |
Dev-Lead — rate-limited (intent: fix-bot-comment)PR: #353 |
Dev-Lead — rate-limited (intent: human)PR: #353 |
|
Note @don-petry I received your request but all AI engines are currently rate-limited. Please re-mention |
Dev-Lead — human-pr (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64a7ac5e27
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| # Collect both current cascade logs and legacy/supplemental log paths. | ||
| with: | ||
| name: pr-review-debug-${{ github.run_number }} |
There was a problem hiding this comment.
Make failure artifact name unique per rerun attempt
Using pr-review-debug-${{ github.run_number }} can make this step fail on workflow re-runs, because github.run_number is stable across re-run attempts while upload-artifact@v4+ fails when an artifact with the same name already exists unless overwrite: true is set. In a fail-then-rerun scenario, the second failed attempt may not upload diagnostics at all due to a 409 conflict, which undermines the new observability path this change is adding.
Useful? React with 👍 / 👎.
Dev-Lead — human-pr (applied)Changes committed and pushed. |
|
No description provided. |
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rdening (resolve conflicts) - Improve pr-review workflow failure diagnosability - Add early auth scope verification - Retry transient npm install failures - Upload debug artifacts on failure - Harden setup resilience Closes #353 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Recent PR Review Agent failures were non-diagnosable because affected runs had no retrievable logs/jobs, and failures appeared transient in a narrow time window. This PR improves observability for failed runs and reduces setup fragility in the CLI install phase.
Auth visibility + scope enforcement
Verify auth scopesstep inpr-review.yml.gh auth statusoutput and fails fast if required scopes are missing (repo,read:org), so auth regressions are visible at the top of the run.Failure diagnostics artifact
if: failure()artifact upload step after cascade review.prs.txt, cascade logs, legacy review logs) from both/tmpand${{ runner.temp }}paths with 14-day retention.Transient npm install resilience