fix: handle PR comment fork branches safely#434
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds trust gating and branch-target handling for respond-to-PR-comment runs on forked pull requests, including fallback follow-up PR creation when the fork head cannot be modified directly.
Concerns
- The fallback apply path always creates a new follow-up PR. Because the fallback branch name is deterministic per original PR, any later response run for the same PR will fail when GitHub reports an existing PR for that head/base pair, even though the branch was updated successfully.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds trusted-actor gating for fork PR comment-response runs and expands branch handling for same-repo heads, directly modifiable fork heads, and follow-up PR fallback flows. It also updates prompts, apply behavior, documentation, and tests around those branch strategies.
Concerns
No blocking correctness, security, or error-handling concerns found in the reviewed diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
@peicodes @vkodithala This sets us up so that at least Warpers can mention Oz to fix issues on PRs that come from forks. It includes some logic that let's us detect if the PR opener has allowed pushing changes to their fork (ref) or if we need to open a PR against it. |
|
Thanks for this!! |
Summary
Tests
python3 -m pytest testsCo-Authored-By: Oz oz-agent@warp.dev