Skip to content

Retry transient PR Sous Chef API failures - #72282

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan-symmetrical-robot
Oct 27, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan-symmetrical-robot

Conversation

@pelikhan

@pelikhan pelikhan commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Reuse withRetry for 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.
  • Propagate asynchronous reads sequentially, retaining API-budget checks, eligibility gates, and fail-closed queue publication. Keep diagnostics on stderr so targeted refreshes retain JSON-only stdout.
  • Include shared retry helpers in the prefilter sparse checkout and regenerate the workflow lock.
  • Make AGENTS.md require report_progress only when available, with direct Git publication otherwise subject to the same validation gates.
  • Clarify the security-review lifecycle: check same-reviewer follow-up support before launch, prepare complete source/lock evidence for one-shot reviewers, and distinguish tooling gaps from code defects. Condense the guide by 28% in words while preserving section anchors, all ten review questions, and safety gates. Add lifecycle and consumption-budget regressions.

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.

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>
@pelikhan
pelikhan marked this pull request as ready for review October 27, 2026 01:16
Copilot AI max review requested due to automatic review settings October 27, 2026 01:16
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · opus55 · ~12 AIC · ⌖ ~38 AIC · ◇ ~3 AIC · ⊞ 1.9K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · gpt56 · ~14 AIC · ⌖ ~7 AIC · ⊞ 14.8K · ◷

Generated by Ponytail Reviewer for #72282

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>
@pelikhan
pelikhan merged commit 2b8cc96 into main Oct 27, 2026
26 checks passed
@pelikhan
pelikhan deleted the pelikhan-symmetrical-robot branch October 27, 2026 01:19
@github-actions

Copy link
Copy Markdown
Contributor

Hey @pelikhan 👋 — thanks for implementing bounded retries for transient GitHub API failures! This is solid work.

Your PR is well-structured:

  • Comprehensive testing — 74 tests covering transient recovery, permanent errors, timeout retries, and exhaustion scenarios.
  • Clear scope — retry logic for GitHub CLI reads with exponential backoff, jitter, and fail-fast for auth/permission errors.
  • Good documentation — workflow, AGENTS.md, and inline changes all explain the retry behavior.

The changes look ready for review. Nice work!

Generated by ✅ Contribution Check · copilot · auto · ~26 AIC · ⌖ ~1 AIC · ⊞ 9.2K · ◷

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Comment thread scripts/pr-sous-chef.mjs
});
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;
Comment thread scripts/pr-sous-chef.mjs
{
maxRetries: 2,
...retryConfig,
shouldRetry: error => error.status !== 401 && error.status !== 403 && isTransientError(error),
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants