Allow allowlisted Warp bots to invoke /oz-review#485
Allow allowlisted Warp bots to invoke /oz-review#485warp-dev-github-integration[bot] wants to merge 1 commit into
Conversation
Bot-authored PR comments are dropped by the webhook router before the /oz-review check, so a /oz-review comment posted by a Warp automation account (e.g. the factory-client agent re-requesting review after addressing feedback) never reaches the review workflow. Add REVIEW_INVOCATION_BOT_ALLOWLIST (seeded with warp-dev-github-integration) and let an allowlisted bot's /oz-review on a PR route to review-pull-request, in both _route_issue_comment and _route_pull_request_review_comment. All other bot-authored comments are still dropped, and the existing per-PR review throttle continues to bound re-reviews. Co-Authored-By: Warp <agent@warp.dev>
|
@warp-dev-github-integration[bot] 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 a narrow REVIEW_INVOCATION_BOT_ALLOWLIST for Warp-managed bots to invoke /oz-review from PR comments/review comments, while preserving the default bot-authored comment drop. The tests cover allowlisted and non-allowlisted bot behavior for both routing surfaces plus issue-comment edge cases.
Concerns
- No blocking correctness, security, or spec-alignment concerns found in the attached diff.
spec_context.mdreports that no approved or repository spec context was found, so there is no material spec drift to assess.
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
What
Add a narrow allowlist so Warp-managed bots can invoke
/oz-review, seeded withwarp-dev-github-integration.Why
The webhook router drops all bot-authored comments before it checks for
/oz-review(in_route_issue_commentand_route_pull_request_review_comment), via the_is_botguard. As a result, a/oz-reviewcomment posted by a Warp automation account — e.g. the factory-client agent re-requesting a review after addressing review-bot feedback — is silently dropped with reason"comment authored by automation user"and never reachesreview-pull-request. This was observed on warpdotdev/warp#13060.How
REVIEW_INVOCATION_BOT_ALLOWLIST = frozenset({"warp-dev-github-integration[bot]"})plus an_is_review_invocation_allowlisted_bothelper (mirrors the existingtriage_bot_author_allowlistmatching: lowercased login incl.[bot], case-insensitive).review-pull-requestwhen it is on a PR, carries/oz-review, and the author is allowlisted. Every other bot-authored comment is still dropped./oz-review(not/oz-verifyor@oz-agent). The existing per-PR review throttle (resolve_review_context, up to 3×) continues to bound re-reviews, so allowlisting does not enable unbounded reviews.tests/test_routing.pyfor both routers: allowlisted bot routes, non-allowlisted bot dropped, case-insensitivity, allowlisted bot without/oz-reviewdropped, and/oz-reviewon a plain issue dropped.Note: could later be made config-driven like
triage_bot_author_allowlist; kept as a module constant per "for now justwarp-dev-github-integration".Verification
Ran the routing tests under
unittest(the sandbox lacks pip/uv to install the full dependency set):python3 -m unittest tests.test_routing→ 77 passing (70 baseline + 7 new). CI (run-tests.yml) runs the complete pytest suite with deps installed.Requested via the factory-client Slack thread: https://warpdev.slack.com/archives/C0BCE7AELJ2/p1782529955064949?thread_ts=1782529955.064949&cid=C0BCE7AELJ2
Conversation: https://staging.warp.dev/conversation/a2993749-0a0f-43df-a0de-4207df8da88f
Run: https://oz.staging.warp.dev/runs/019f0710-9f57-7e35-92bf-509b3378c967
This PR was generated with Oz.