fix: use push-to-pull-request-branch to stop creating stale fix-round PRs - #820
Conversation
fix-review-findings was using create_pull_request to push fixes, which creates a NEW PR on a deduplicated branch name instead of pushing to the existing PR. This caused dozens of stale fix-round PRs (e.g., fix/issue-645-29d389b9). Switched to push-to-pull-request-branch which pushes commits directly to the existing PR branch — no duplicate PRs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expert Code Review — PR #820Methodology: 3 independent reviewers with adversarial consensus 2 findings (1 posted inline, 1 below as overflow)
Overflow (outside diff — could not be posted inline)
Discarded findings (failed consensus)
CI Status
Test CoverageNo tests are applicable — this PR modifies only gh-aw workflow files (
|
There was a problem hiding this comment.
Review Summary
Two findings, one critical:
🔴 CRITICAL — Parameter name mismatch in prompt example vs compiled tool schema
File: .github/workflows/fix-review-findings.md line 140
Schema: .github/workflows/fix-review-findings.lock.yml lines 544–562
The prompt instructs the agent to call push_to_pull_request_branch({ "pr_number": ... }) but the compiled schema defines the parameter as pull_request_number. The schema also requires branch and message (both required: true) which the example omits entirely.
If the agent follows the prompt example instead of the MCP tool definition, the push is rejected by the MCP gateway for missing required fields and unknown parameter name. The review-fix loop would complete all analysis and fixes but fail to deliver them — a silent data-loss scenario.
The platform-injected safe_outputs_push_to_pr_branch.md prompt likely has correct parameter names and may save the agent in most runs, but the conflicting prompt example increases failure probability.
🟡 MODERATE — Rule 6 contradicts push_to_pull_request_branch semantics
File: .github/workflows/fix-review-findings.md line 176
Rule 6 ("One commit per finding") instructs the agent to make multiple local commits, but push_to_pull_request_branch uses a message field for the push commit. The interplay between multiple local commits and the single push message is unclear, and the prompt example omits the required message field entirely.
Generated by Expert Code Review (auto) for issue #820 · ● 31.3M
Root cause:
fix-review-findingsusedcreate-pull-requestto push fixes. gh-aw deduplicates branch names by appending a hash (e.g.,fix/issue-645-29d389b9), creating a NEW PR each time instead of pushing to the existing one.Fix: switched to
push-to-pull-request-branchsafe output, which pushes commits directly to the existing PR branch. No more duplicate PRs.