Skip to content

Allow allowlisted Warp bots to invoke /oz-review#485

Open
warp-dev-github-integration[bot] wants to merge 1 commit into
mainfrom
factory/oz-review-bot-allowlist
Open

Allow allowlisted Warp bots to invoke /oz-review#485
warp-dev-github-integration[bot] wants to merge 1 commit into
mainfrom
factory/oz-review-bot-allowlist

Conversation

@warp-dev-github-integration

Copy link
Copy Markdown

What

Add a narrow allowlist so Warp-managed bots can invoke /oz-review, seeded with warp-dev-github-integration.

Why

The webhook router drops all bot-authored comments before it checks for /oz-review (in _route_issue_comment and _route_pull_request_review_comment), via the _is_bot guard. As a result, a /oz-review comment 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 reaches review-pull-request. This was observed on warpdotdev/warp#13060.

How

  • Add REVIEW_INVOCATION_BOT_ALLOWLIST = frozenset({"warp-dev-github-integration[bot]"}) plus an _is_review_invocation_allowlisted_bot helper (mirrors the existing triage_bot_author_allowlist matching: lowercased login incl. [bot], case-insensitive).
  • In both comment routers, before dropping a bot-authored comment, allow it through to review-pull-request when it is on a PR, carries /oz-review, and the author is allowlisted. Every other bot-authored comment is still dropped.
  • Scope is intentionally limited to /oz-review (not /oz-verify or @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.
  • Added unit tests in tests/test_routing.py for both routers: allowlisted bot routes, non-allowlisted bot dropped, case-insensitivity, allowlisted bot without /oz-review dropped, and /oz-review on a plain issue dropped.

Note: could later be made config-driven like triage_bot_author_allowlist; kept as a module constant per "for now just warp-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.

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>
@oz-for-oss

oz-for-oss Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md reports 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant