Skip to content

ci(review): let the Aibex bot request a Claude review - #709

Merged
aibex-agent[bot] merged 1 commit into
mainfrom
aibex/t_cWxb3Lwj5vv6mBtWCdsnBqqA
Nov 22, 2026
Merged

aibex-agent[bot] merged 1 commit into
mainfrom
aibex/t_cWxb3Lwj5vv6mBtWCdsnBqqA

Conversation

@aibex-agent

@aibex-agent aibex-agent Bot commented Nov 22, 2026

Copy link
Copy Markdown

A pull request opened by the Aibex App never got a Claude review. The bot's @claude /review was refused twice:

  1. The job's if: admits only an OWNER, MEMBER or COLLABORATOR comment, so the bot's comment skipped the job.
  2. The action checks the actor again and rejects any bot not in allowed_bots: Workflow initiated by non-human actor: aibex-agent (type: Bot). Add bot to allowed_bots list.

This admits aibex-agent[bot] in both places, the same way aibexhq/aibex's copy of this workflow does. No other bot gets in.

Left out on purpose:

  • aibex's review-on-open trigger (pull_request: [opened, ready_for_review]). This repo is public and its review runs only on request (AGENTS.md, "Requesting the Claude review"), and agents already post @claude /review when they open a PR.
  • aibex's architecture/knowledge prompt section. Those directories don't exist here.
  • /focus. aibex doesn't admit the bot there either.

Because issue_comment workflows run from the default branch, this takes effect once merged. This PR's own review has to come from a maintainer's @claude /review.

This only changes CI, so there's no changeset.

The on-demand review refused a bot's `@claude /review` twice over: the
job's author_association gate skipped it, and the action itself rejects
any non-human actor not in allowed_bots. Admit aibex-agent[bot] in both
places, as aibexhq/aibex's copy of this workflow does. The review stays
on demand: aibex's review-on-open trigger is not brought over.
@aibex-agent
aibex-agent Bot marked this pull request as draft November 22, 2026 03:40
@aibex-agent
aibex-agent Bot marked this pull request as ready for review November 22, 2026 03:40
@aibex-agent

aibex-agent Bot commented Nov 22, 2026

Copy link
Copy Markdown
Author

@claude /review

1 similar comment
@theCodeDrift

Copy link
Copy Markdown
Member

@claude /review

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @theCodeDrift's task in 1m 25s —— View job


Review complete

Review mode: incremental — read 0 prior review thread(s) before reviewing. .prior-review.json contained no review threads and no reviews — only two top-level comments, both just the trigger phrase @claude /review with no findings in them. There is nothing previously raised to classify as addressed or still-open, so this is effectively the first substantive review of this PR.

  • Read prior review data (.prior-review.json) — no prior threads/reviews found
  • Fetch PR diff and metadata
  • Read changed workflow file in full
  • Review for correctness/security issues
  • Post findings and summary

Assessment

The diff is small and does exactly what the PR description and commit message say: it admits aibex-agent[bot] in the two places that were refusing its @claude /review comment —

  1. .github/workflows/claude-code-review-on-demand.yml:131 — adds github.event.comment.user.login == 'aibex-agent[bot]' to the job's if: gate, alongside the existing OWNER/MEMBER/COLLABORATOR checks. The parenthesization is correct, comment.user.login is populated on both issue_comment and pull_request_review_comment payloads, and the PR-only restriction for issue_comment (github.event.issue.pull_request) is untouched. [bot]-suffixed logins aren't available to ordinary accounts, so this doesn't weaken the gate for anyone else.
  2. .github/workflows/claude-code-review-on-demand.yml:347 — adds allowed_bots: "aibex-agent" to the claude-code-action step, matching the exact actor name the action's own error message (quoted in the PR body) names. This only affects the action's internal actor check; it doesn't broaden --allowedTools or the job's permissions:.

Both changes are narrowly scoped to this one bot login/name, consistent with the stated goal of not opening this up to any other bot. The surrounding header comments were updated in sync with the code change, and the PR correctly leaves out the review-on-open trigger and other aibex-specific features that don't apply to this repo.

One advisory-only observation posted as an inline comment on line 131: the gate gates on who commented, not whose PR it is, so it currently trusts that the Aibex App only ever posts this trigger on PRs it opened itself. That mirrors the existing trust model for human maintainers (who can already trigger a review on any PR, including forks), so it's not a new hole — just worth being aware of if that assumption about the App's behavior ever changes.

No correctness, security, or test-adequacy issues found beyond that advisory note. This is CI-only configuration with no code paths to unit test, consistent with the PR's "no changeset" note.

github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR') &&
github.event.comment.author_association == 'COLLABORATOR' ||
github.event.comment.user.login == 'aibex-agent[bot]') &&

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.

[New] Minor/advisory, not a bug: this gate is keyed only on who commented (aibex-agent[bot]), not on whose PR it is. A maintainer's own @claude /review is already similarly unscoped (any OWNER/MEMBER/COLLABORATOR comment triggers a review of whatever PR it's on, including a fork's), so this isn't a new trust boundary — but worth being explicit that the header's claim "the App acts only for threads a maintainer's herd started" is an assumption about the Aibex App's own behavior, not something this if: enforces. If the App can ever be made to post @claude /review on a PR it didn't open (e.g. a fork PR from an unrelated contributor), this condition alone would let that review run. Nothing to change here unless that assumption turns out to be wrong.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed, and leaving it as is. The bot is trusted on the same terms as a maintainer: it only acts for threads a maintainer's herd started, and it can only post a trigger on a PR when such a thread tells it to. A fork PR gets the same exposure from a maintainer's own comment today. If the App ever comments on its own initiative, add a check on whose PR it is here (github.event.issue.user.login / github.event.pull_request.user.login).

— AI Coding Agent

@aibex-agent
aibex-agent Bot merged commit 77f28d1 into main Nov 22, 2026
18 checks passed
@aibex-agent
aibex-agent Bot deleted the aibex/t_cWxb3Lwj5vv6mBtWCdsnBqqA branch November 22, 2026 03:49
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