Skip to content

fix(peer-review): honour --judge in PR mode#270

Merged
jacsamell merged 1 commit into
mainfrom
fix/judge-flag-pr-mode
Jun 3, 2026
Merged

fix(peer-review): honour --judge in PR mode#270
jacsamell merged 1 commit into
mainfrom
fix/judge-flag-pr-mode

Conversation

@jacsamell
Copy link
Copy Markdown
Contributor

What

cube prv <pr> --judge judge_4 silently ran the entire panel. The --judge filter was wired into the cube-managed and --local/--branch paths but dropped on the way into _run_pr_review (the --pr path), which never received it.

It looked like it worked because the only times we reached for --judge were when every other judge had already approved the current HEAD, so the target judge was the lone survivor of the skip-guard anyway. The coincidence masked the dropped flag.

Fix

  • peer_review_command's --pr branch now forwards single_judge=judge.
  • _run_pr_review gained a single_judge param and narrows the panel via a new pure _narrow_to_single_judge helper.
  • Unknown key fails loud (typer.Exit) instead of silently running every judge — a no-op filter is worse than an error.

Tests

3 new regression tests: plumbing forwarding, narrowing keeps only the named judge, unknown key raises. Full tests/cli suite green (225 passed).

🤖 Generated with Claude Code

…ing it

`cube prv <pr> --judge judge_4` quietly ran the entire panel: the flag was
threaded into the cube-managed and --local/--branch paths but dropped on the
way into _run_pr_review (the --pr path). It only looked like it worked when
every other judge was already approved, so judge_4 was the lone survivor
anyway — masking the bug.

peer_review_command's --pr branch now forwards single_judge, and
_run_pr_review narrows judges_to_run via a new _narrow_to_single_judge helper
that fails loud on an unknown key (a silent no-op filter is worse than an
error). Regression tests pin the plumbing and the raise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

@jacsamell, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 15 minutes and 49 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a0510904-6018-48f1-b7a2-fbb7e685146c

📥 Commits

Reviewing files that changed from the base of the PR and between 49478cf and 4f6af38.

📒 Files selected for processing (2)
  • python/cube/commands/peer_review.py
  • tests/cli/test_judge_filter_pr_mode.py

Comment @coderabbitai help to get the list of available commands and usage tips.

@jacsamell jacsamell merged commit 372f5ce into main Jun 3, 2026
1 of 2 checks passed
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