Skip to content

fix(peer-review): --fresh-judge no longer aborts the whole resume panel#272

Merged
jacsamell merged 1 commit into
mainfrom
fix/fresh-judge-aborts-resume-panel
Jun 3, 2026
Merged

fix(peer-review): --fresh-judge no longer aborts the whole resume panel#272
jacsamell merged 1 commit into
mainfrom
fix/fresh-judge-aborts-resume-panel

Conversation

@jacsamell
Copy link
Copy Markdown
Contributor

Problem

cube prv <pr> --fresh-judge judge_2 came back with 0/5 decisions — every judge UNAVAILABLE (MISSING) at 0s — even though judges 1/3/4/5 had perfectly good sessions to resume. --fresh-judge, meant to re-run one judge, silently nuked the whole panel.

Root cause

  1. _clear_named_judge_sessions wipes judge_2's session before the panel launches (correct, that's how --fresh-judge forces a clean re-run).
  2. But launch_judge_panel never received the fresh-judge list. With judges 1/3/4/5 holding sessions, the panel runs in resume mode.
  3. Its construction loop hits judge_2's missing session, can't tell a deliberate clear from a vanished one, and raises No session found (allow_fresh defaults off) — before any judge runs.
  4. _run_pr_review swallowed that RuntimeError (panel_results = [], no log) → wordless whole-panel abort. The warn-and-march anti-pattern.

Confirmed by instrumentation: zero entries in the post-gather classification loop, so the panel died during construction, not during any judge run.

Fix

  • Thread fresh_judges into launch_judge_panel (every call site).
  • Gate the missing-session decision on a new pure helper _missing_session_starts_fresh: a --fresh-judge key (or --allow-fresh) starts fresh; a genuinely unexpected missing session still raises.
  • Stop silently swallowing the construction RuntimeError in _run_pr_review — surface the cause.

Verified

Live panel on a real PR: before 0/5 produced decisions; after, judge_2 starts fresh while 1/3/4/5 resume → 5/5 produced decisions.

ⓘ Judge Principal: session cleared by --fresh-judge — starting fresh, others resume
↩️ Resuming Judge PO/QA / Backend / Frontend & UX / Security
Panel result — 5/5 judges produced decisions

Tests

5 new (truth table for _missing_session_starts_fresh + signature guard). Full automation + cli suites green (414 passed).

🤖 Generated with Claude Code

`cube prv <pr> --fresh-judge judge_2` produced 0/5 decisions — every judge
MISSING at 0s — even though judges 1/3/4/5 had valid sessions to resume.

Chain: _clear_named_judge_sessions wipes judge_2's session before the panel
(so --fresh-judge re-runs it cleanly), but launch_judge_panel never received
the fresh-judge list. Its resume-mode construction saw judge_2's missing
session, couldn't distinguish a deliberate clear from a vanished one, and
raised 'No session found' (allow_fresh defaults off). _run_pr_review then
swallowed that RuntimeError into a wordless whole-panel abort — the
warn-and-march anti-pattern again.

Fix:
- Thread fresh_judges into launch_judge_panel (all call sites).
- Gate the missing-session decision on a new pure helper
  _missing_session_starts_fresh: a --fresh-judge key (or --allow-fresh)
  starts fresh; an unexpected missing session still raises.
- Stop swallowing the construction RuntimeError silently in _run_pr_review —
  print the cause.

Verified on a live panel: before 0/5 produced decisions; after, judge_2
starts fresh while 1/3/4/5 resume → 5/5 produced decisions.

Tests: _missing_session_starts_fresh truth table + signature guard
(5 new). Full automation+cli suites green (414 passed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jacsamell jacsamell merged commit 835283f into main Jun 3, 2026
1 of 2 checks passed
@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 3 minutes and 13 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: 61b64c4d-fec8-471d-8262-431c1eddcb65

📥 Commits

Reviewing files that changed from the base of the PR and between f3db0a5 and b3bd5d0.

📒 Files selected for processing (3)
  • python/cube/automation/judge_panel.py
  • python/cube/commands/peer_review.py
  • tests/automation/test_fresh_judge_resume_panel.py

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

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