Repository navigation
Retry transient PR Sous Chef API failures - #72282
Conversation
Reuse withRetry for GitHub CLI reads while preserving sequential eligibility checks, API budget gates, and fail-closed queue publication. Include retry helpers in the prefilter checkout and cover recovery and exhaustion with mocked regressions. Allow direct Git publication after validation when report_progress is unavailable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Test Quality Sentinel completed test quality analysis.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
Plan reviewer follow-up support before launch, keep verdicts tied to exact snapshots, and explain tooling gaps without implying a code defect. Preserve safety gates and section anchors while shortening the guide and enforcing a documentation consumption budget. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Hey @pelikhan 👋 — thanks for implementing bounded retries for transient GitHub API failures! This is solid work. Your PR is well-structured:
The changes look ready for review. Nice work!
|
There was a problem hiding this comment.
🔵 Needs a closer look
Retry-classification defects remain unresolved, and final security sign-off for the emitted lock and timeout changes is still pending.
2 open issues
What changed in this PR
Adds bounded retries to PR Sous Chef’s GitHub CLI reads so transient failures can recover while queue generation remains fail-closed.
Changes:
- Makes API reads asynchronous and sequential, with bounded retries and failure-handling regressions.
- Includes shared retry helpers in the prefilter checkout and regenerates the compiled workflow.
- Clarifies publication fallback and security-review follow-up requirements, with guidance regression checks.
| File | Description |
|---|---|
scripts/pr-sous-chef.test.mjs |
Converts API tests to async and adds retry and failure regressions. |
scripts/pr-sous-chef.mjs |
Adds CLI retries and propagates awaited reads through queue generation. |
AGENTS.md |
Documents direct Git publication when report_progress is unavailable. |
.github/workflows/pr-sous-chef.md |
Includes retry helpers in checkout and documents retry behavior. |
.github/workflows/pr-sous-chef.lock.yml |
Updates generated hashes and the prefilter sparse checkout. |
.github/skills/agentic-workflows/tests/test_guidance.py |
Checks reviewer lifecycle guidance, safety requirements, and document-size limits. |
.github/aw/debug-security-review.md |
Condenses security guidance and clarifies follow-ups and tooling gaps. |
Review effort: Max
| }); | ||
| return result.stdout; | ||
| } catch (error) { | ||
| const message = error.killed && error.signal === "SIGTERM" && error.code !== "ERR_CHILD_PROCESS_STDIO_MAXBUFFER" ? "GitHub CLI request timeout after 60000ms" : error.stderr?.trim() || error.message; |
| { | ||
| maxRetries: 2, | ||
| ...retryConfig, | ||
| shouldRetry: error => error.status !== 401 && error.status !== 403 && isTransientError(error), |
|
🎉 This pull request is included in a new release. Release: |

Why
PR Sous Chef run 40373400188 stopped during a single-PR metadata refresh when GitHub GraphQL returned HTTP 504. A transient read failure should receive bounded retries without allowing a partial or empty-success queue to start the agent.
Approach
withRetryfor GitHub CLI reads with two retries, exponential backoff, and jitter. Normalize CLI stderr into HTTP statuses; HTTP 401/403, malformed successful JSON, and buffer overflows fail immediately.AGENTS.mdrequirereport_progressonly when available, with direct Git publication otherwise subject to the same validation gates.Validation
node --test scripts/pr-sous-chef.test.mjs: 74 tests passed, including transient recovery, permanent errors, timeout retries, and exhaustion after partial queue inspection.python3 -m unittest discover -s .github/skills/agentic-workflows/tests -p test_guidance.py -v: 59 tests passed.make recompile: 348/348 workflows compiled; only the intended lock changed.make agent-report-progress: passed.make agent-report-progress-no-test: passed for the documentation follow-up.git diff --check: passed.Pending review
Initial source security review passed with no confirmed vulnerabilities. Final sign-off for the emitted lock and subsequent timeout-classification/test delta remains pending because same-reviewer follow-up was unavailable; publication does not claim a final security PASS. The guidance changes clarify this limitation without waiving the review requirement. No live workflow rerun or dispatch was performed.