Repository navigation
Dispatch a dedicated PR Finisher from PR Sous Chef - #74166
Conversation
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
| engine: copilot | ||
| timeout-minutes: 45 | ||
| env: | ||
| PR_FINISHER_WORK_SUMMARY: ${{ inputs.work_summary }} |
| `ACTION_REQUIRED` checks outside the approval allowlist to Copilot: those need | ||
| a human, not another implementation pass. | ||
| Run `node scripts/pr-sous-chef.mjs <N> --simulate` for the final refresh and | ||
| copy its `nudges[0].body` exactly into the safe-output comment. An empty `nudges` | ||
| means no implementation nudge is needed. This command is read-only: it generates | ||
| use its `nudges[0].pr_number` as `inputs.pr_number` and its `nudges[0].body` |
| @@ -427,11 +437,11 @@ export function formatNudge(pr) { | |||
| if (pr.zero_diff_stalled) tasks.push("Implement the requested change, or close this zero-diff PR with a reason."); | |||
| return [ | |||
| marker, | |||
| "@copilot address the following outstanding work in one pass:", | |||
| "PR finisher dispatch requested for the following outstanding work:", | |||
|
@copilot run pr-finisher skill |
| path: /tmp/gh-aw/agent | ||
| safe-outputs: | ||
| needs: [prefilter] | ||
| dispatch-workflow: |
| ...tasks.map((task, index) => `${index + 1}. ${task}`), | ||
| "", | ||
| "Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI.", | ||
| "The dedicated pr-finisher workflow will apply the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not trigger CI.", |
| engine: copilot | ||
| timeout-minutes: 45 | ||
| env: | ||
| PR_FINISHER_WORK_SUMMARY: ${{ inputs.work_summary }} |
|
✅ 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.
|
|
✅ 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.
|
|
✅ Test Quality Sentinel completed test quality analysis. Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
There was a problem hiding this comment.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Request changes
The changed workflows still expose two merge-blocking risks already captured by the existing review threads: attacker-controlled review/comment text is passed through work_summary into the Finisher prompt, and Sous Chef can dispatch an arbitrary eligible PR number rather than a deterministically prefiltered target. These can turn untrusted PR content into agent instructions and allow unintended branch writes. Please resolve those existing findings before merging.
The specialist pass was unavailable because its file-read tool invocation was rejected; this review is based on the prefetched diff and existing review comments.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⊞ 1.7K
Comment /review to run again
|
Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. 🧪 Test Quality Sentinel ReportSummary✅ Score: 88/100 | Status: APPROVED
Test ClassificationTest Quality AnalysisAll 80 tests are behavioral tests validating design invariants: High-Value Patterns:
Error Assertions:
Mock Strategy:
Inflation ContextThe 6.93x test-to-production ratio (104 lines added to test, 15 to production) exceeds the 2:1 guideline, but is justified: The new finisher dispatch feature requires extensive YAML workflow validation and state machine verification that naturally produces verbose test code. No duplication detected across test cases. Quality Signals✅ No implementation-focused tests Verdict: Tests demonstrate strong behavioral coverage of the PR Finisher dispatch logic. Inflation is justified by workflow complexity.
|
There was a problem hiding this comment.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
✅ Test Quality Sentinel: 88/100. 0% implementation tests (threshold: 30%). All 80 tests are behavioral with comprehensive edge-case coverage. Test inflation (6.93x) is justified by YAML workflow validation complexity.
🧪 Test quality analysis by Test Quality Sentinel · copilot · haiku45 · ~34 AIC · ⊞ 9.2K
Comment /review to run again
Ran the PR Finisher pass. Local formatting, lint, and impacted unit-test checks passed; no files changed. No in-scope review threads were found. CI checks are still running on the current head, and GitHub reports mergeability as unstable until they finish. |
There was a problem hiding this comment.
🟡 Changes recommended
The finisher dispatch uses an unsupported safe-output command, while unresolved publication and deduplication flaws can trigger CI, leave PRs unchanged, or repeatedly requeue the same work.
8 open issues
Use the generated safe-output CLI and its flat arguments · New Exclude fork PRs before dispatching · New Fail closed on threat-detection outages · New Prevent publication pushes from triggering CI · New Preserve base-merge ancestry to avoid repeated BEHIND dispatches · New Fail publication when the patch artifact is missing · New Record no-op work to prevent repeated dispatches · New Deduplicate protected-file fallback issues · New
What changed in this PR
Moves PR Sous Chef’s implementation delegation to a dedicated gh-aw PR Finisher workflow for updating existing pull requests.
Changes:
- Replaces Copilot mentions with
main-branch dispatches carrying explicit PR numbers and work summaries. - Adds PR eligibility checks, pinned checkouts, scoped publication excluding workflow YAML, and deferred review-thread resolution.
- Extends active-run detection, state deduplication, and regression coverage.
| File | Description |
|---|---|
scripts/pr-sous-chef.test.mjs |
Adds dispatch, deduplication, and finisher eligibility tests. |
scripts/pr-sous-chef.mjs |
Updates delegation summaries and finisher run/state detection. |
.github/workflows/pr-sous-chef.md |
Configures finisher dispatch and approved-integrity access. |
.github/workflows/pr-sous-chef.lock.yml |
Compiles the updated dispatcher configuration. |
.github/workflows/pr-finisher.md |
Defines PR validation, implementation, publication, and review handling. |
.github/workflows/pr-finisher.lock.yml |
Provides the executable compiled finisher workflow. |
Review effort: Max (auto)
| dispatch of the dedicated `pr-finisher` workflow with `inputs.pr_number` set | ||
| to this eligible PR number. Use only `safeoutputs dispatch_workflow`, never | ||
| `assign_to_agent`, a direct API write, or an `@copilot` mention. |
| throw new Error("pr_number must be a positive integer"); | ||
| } | ||
| const { data: pr } = await github.rest.pulls.get({ ...context.repo, pull_number: number }); | ||
| if (pr.state !== "open" || pr.draft || pr.head.repo?.full_name !== process.env.GITHUB_REPOSITORY || |
| safe-outputs: | ||
| needs: [preflight] |
| push-to-pull-request-branch: | ||
| target: ${{ needs.preflight.outputs.pr_number }} |
| exclude-lock-yml: true | ||
| excluded-files: [".github/workflows/*.yml", ".github/workflows/*.yaml"] |
| exclude-lock-yml: true | ||
| excluded-files: [".github/workflows/*.yml", ".github/workflows/*.yaml"] | ||
| protected-files: fallback-to-issue | ||
| fallback-as-pull-request: false |
| ## One bounded implementation pass | ||
|
|
||
| 1. Read the PR state, review threads and latest checks once and reuse that snapshot. | ||
| Stop with `noop` if it is closed, draft, opted out, or no actionable work remains. |
| function isNudge(comment) { | ||
| return isSousChefComment(comment) && (comment.body ?? "").includes("@copilot"); | ||
| const body = comment.body ?? ""; | ||
| if (/The code changes were not applied\.|a fallback review issue was created instead due to protected file changes:|Direct push to the original pull request branch was not possible/.test(body)) return false; |
|
🎉 This pull request is included in a new release. Release: |


Replace Sous Chef’s Copilot mention/assignment delegation with a dedicated
pr-finisherworkflow that applies PR feedback and pushes fixes to the existing branch, excluding compiled workflow YAML.pr-finisheronmain; pass the PR number and work summary explicitly rather than inheriting the caller’s PR context.