Skip to content

Prevent recurring PR Sous Chef safe-output failures - #53676

Merged
pelikhan merged 6 commits into
mainfrom
copilot/deep-report-root-cause-safe-outputs
Aug 18, 2026
Merged

Prevent recurring PR Sous Chef safe-output failures#53676
pelikhan merged 6 commits into
mainfrom
copilot/deep-report-root-cause-safe-outputs

Conversation

CopilotAI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

PR Sous Chef repeatedly failed after successful agent runs because GitHub reports unsupported stacked-PR branch updates as either HTTP 403 or 422. Unscoped review queries also produced foreign thread IDs rejected by safe-output safeguards.

  • Stacked PR handling

    • Treat the canonical unsupported-update response as non-fatal for both observed statuses.
    • Keep stack-sync fallback explicitly enabled.
  • Repository scoping

    • Restrict the PR processor to github/gh-aw review threads and reviews.
  • Regression coverage

    • Cover HTTP 403 stacked-PR responses.
    • Enforce fallback configuration and repository scoping in the workflow contract.

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Category: chore (WIP) | Risk: low | Priority: low (score 20)

  • Draft, opened minutes ago with 0 diff — agent still generating changes (Investigate root cause of PR Sous Chef safe_outputs job failures)
  • Batch: pr-batch:wip-drafts (6 similar just-opened WIP PRs)

Recommended action: defer — recheck once agent finishes and diff is populated

Generated by 🔧 PR Triage Agent · auto · 53.1 AIC · ⌖ 2.52 AIC · ⊞ 8.3K ·

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Investigate root cause of PR Sous Chef safe_outputs job failuresPrevent recurring PR Sous Chef safe-output failuresAug 18, 2026
CopilotAI requested a review from pelikhanAugust 18, 2026 12:39
Comment thread.github/workflows/pr-sous-chef.md Outdated
body: true
operation: append
update-branch: true
update-branch.stacks: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot rename this field to "sync-stack"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Renamed the field to sync-stack across the workflow, parser, schema, docs, and tests in c614ead.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI requested a review from pelikhanAugust 18, 2026 13:03
@pelikhan
pelikhan marked this pull request as ready for review August 18, 2026 13:23
CopilotAI balanced review requested due to automatic review settings August 18, 2026 13:23
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

CopilotAI 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.

Pull request overview

Prevents PR Sous Chef safe-output failures by handling stacked-PR 403 responses and constraining review queries.

Changes:

  • Treats canonical stacked-PR 403/422 errors as non-fatal.
  • Renames the fallback option to sync-stack.
  • Scopes PR Sous Chef queries to github/gh-aw.
Show a summary per file
FileDescription
pkg/workflow/update_pull_request.goParses sync-stack.
pkg/workflow/update_pull_request_test.goTests configuration parsing.
pkg/parser/schemas/main_workflow_schema.jsonUpdates the frontmatter schema.
pkg/cli/pr_sous_chef_workflow_contract_test.goAdds workflow contract assertions.
docs/src/content/docs/reference/frontmatter-full.mdUpdates reference documentation.
actions/setup/js/update_pull_request.test.cjsAdds 403 regression coverage.
actions/setup/js/update_pull_request.cjsRecognizes stacked-PR 403 responses.
.github/workflows/pr-sous-chef.mdEnables fallback and scopes queries.
.github/workflows/pr-sous-chef.lock.ymlRefreshes compiled metadata.
.github/aw/safe-outputs-management.mdDocuments sync-stack.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 10/10 changed files
  • Comments generated: 2
  • Review effort level: Balanced

const status = getErrorStatus(error);
const message = getErrorMessage(error).toLowerCase();
return status === 422 && message.includes("updating a stacked pr's branch via this endpoint is not supported");
return (status === 403 || status === 422) && message.includes("updating a stacked pr's branch via this endpoint is not supported");
Comment on lines +1167 to +1169
expect(result.success).toBe(true);
expect(mockGithub.rest.pulls.update).toHaveBeenCalled();
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("branch from base (non-fatal)"));
CopilotAIand others added 2 commits August 18, 2026 13:40
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented Aug 18, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot resolve the merge conflicts on this branch.

Resolved in dcdda5a — merged origin/main and regenerated pr-sous-chef.lock.yml via make recompile; the sync-stack feature is preserved.

…ation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
pelikhan merged commit 7ad76f1 into mainAug 18, 2026
37 of 38 checks passed
@pelikhan
pelikhan deleted the copilot/deep-report-root-cause-safe-outputs branch August 18, 2026 15:00
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.1

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] PR Sous Chef: root-cause chronic safe_outputs job failures (16 open duplicate auto-filed issues)

3 participants

@pelikhan