Fixing many bugs caused by Copilot CLI not thinking#97
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the repo’s agentic automation pipeline by ensuring agent-created PRs are consistently labeled for downstream workflows and by fixing the review-responder’s operational ordering so thread resolution doesn’t fail after code pushes. It also corrects related docs for branch protection and admin merge procedures.
Changes:
- Guarantee
awlabel application by configuring it in the Issue Implementercreate-pull-requestsafe-output config. - Update Review Responder instructions to reply/resolve threads before pushing, preventing stale thread ID failures.
- Fix/extend docs for branch protection settings and
gh pr mergeauto-merge flag usage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/agentic-workflows.md | Corrects branch protection API example (dismiss_stale_reviews: false), adds required_conversation_resolution: true, and updates admin merge instructions to gh pr merge --auto. |
| .github/workflows/review-responder.md | Adds explicit ordering guidance to reply/resolve before pushing to avoid thread resolution failures. |
| .github/workflows/issue-implementer.md | Adds labels: ["aw"] to create-pull-request safe-output config to make labeling deterministic. |
| .github/workflows/issue-implementer.lock.yml | Regenerates compiled workflow artifacts to reflect the new aw label config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
52d9bc2 to
5d13165
Compare
- issue-implementer: added labels: ["aw"] to create-pull-request config so the label is guaranteed at config level, not agent discretion. Closes #96. - review-responder: added explicit instruction to reply and resolve threads BEFORE pushing code. Pushing invalidates thread IDs and makes them unresolvable. Refs #95. - pr-rescue: added git config for user.name/email. Rebase fails without committer identity on GitHub Actions runner. Closes #98. - docs: fixed dismiss_stale_reviews (false not true), --auto flag, added required_conversation_resolution to branch protection example. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5d13165 to
63ddbdb
Compare
There was a problem hiding this comment.
Pull request overview
This PR hardens the repo’s agentic workflow pipeline by fixing configuration gaps that caused missing labels, unresolvable review threads, and PR rescue failures, plus aligning the docs with the intended branch protection/merge behavior.
Changes:
- Guarantee
awlabel application at PR creation time in the Issue Implementer workflow config. - Update Review Responder instructions to reply/resolve threads before pushing, preventing stale thread IDs.
- Make PR Rescue more robust: configure git identity for rebases, only rebase when
mergeStateStatusisBEHIND, and add fetch/checkout/push failure handling. - Update workflow/docs examples for branch protection and auto-merge CLI flags.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/agentic-workflows.md | Aligns branch protection JSON and admin merge procedure with the workflow assumptions (conversation resolution + correct gh pr merge flag). |
| .github/workflows/review-responder.md | Adds explicit ordering to avoid stale review thread IDs when resolving. |
| .github/workflows/pr-rescue.yml | Adds git identity + more robust rebase loop behavior and error handling for stuck PR rebases. |
| .github/workflows/issue-implementer.md | Ensures aw label is applied via safe-output config rather than agent memory. |
| .github/workflows/issue-implementer.lock.yml | Regenerated lock to reflect the updated Issue Implementer safe-outputs configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove labels: ["aw"] from issue-implementer create-pull-request config. The config-level labels feature has a gh-aw runtime bug where the post-creation label API call fails with a node ID resolution error. This caused PR #104 to be created without the aw label. Reverts the labels portion of PR #97. The agent instruction to add the aw label remains and works reliably (worked for PRs #61-91). Closes #107, refs #108 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes
1. Implementer: aw label guaranteed (closes #96)
Added labels: ["aw"] to create-pull-request config. Previously the label depended on the agent remembering — PR #93 was created without it, causing quality-gate to noop.
2. Review Responder: resolve before push (refs #95)
Added explicit instruction: reply, resolve, then push. The previous ordering (push, reply, resolve) invalidated thread IDs, causing resolve to fail. With required_conversation_resolution enabled, unresolved threads block auto-merge.
3. PR Rescue: git identity (closes #98)
Added git config for user.name/email — rebase fails without committer identity on Actions runner.
4. PR Rescue: BLOCKED check too broad (closes #99)
Changed merge state check from BEHIND or BLOCKED to only BEHIND. BLOCKED could mean unresolved threads or failing CI — rebasing those makes things worse.
5. PR Rescue: single failure aborts loop (closes #100)
Wrapped git fetch and git push in error handling so one failed PR does not kill the entire rescue loop.
6. PR Rescue: cancel-in-progress can corrupt branches (closes #101)
Changed to cancel-in-progress: false. Cancelling mid-rebase could leave branches half-rebased.
7. PR Rescue: unguarded checkout and abort (closes #102)
Guarded git checkout with if/continue and git rebase --abort with || true.
8. Docs fixes
Closes #96, #98, #99, #100, #101, #102. Refs #95.