Skip to content

chore(panel): cut debug noise from panel render path#198

Merged
jacsamell merged 1 commit into
mainfrom
cleanup-panel-render-noise
May 21, 2026
Merged

chore(panel): cut debug noise from panel render path#198
jacsamell merged 1 commit into
mainfrom
cleanup-panel-render-noise

Conversation

@jacsamell
Copy link
Copy Markdown
Contributor

@jacsamell jacsamell commented May 21, 2026

Summary

Removes 5 dev-debug print sites that leaked into the panel render path over the last 2 weeks. Each one was both noise on the operator's terminal AND a new dynamic-interpolation surface that could carry untrusted brackets through Rich.

  • Decision-file probes (Looking for judge_X: <path> (exists: ...)) — gone
  • Per-judge missing-decision warnings — gone (summary already calls them out by name)
  • Split fetch/found existing-comments lines — collapsed to one
  • "Resuming N judges" + N follow-up → Label lines — collapsed (PR + branch paths)
  • "PR lens breakdown" + per-judge skip lines — consolidated into one routing line

Why

Discussion with operator surfaced the pattern: every recent feature added "just one print, the operator should see this" via console.print or print_info. There's no log.debug discipline, so dev-debug ended up on the live panel. Result: noisy panel render AND each new print is a new MarkupError-trip site.

Pairs with #197 (chokepoint) — that one makes prints crash-proof, this one cuts the prints that were never operator-facing to begin with.

Test plan

  • cube prv <pr> — visually confirm: phase headers + one line per judge progress + summary. No probe lines, no per-judge missing-decision warnings, no split fetch/found lines.

🤖 Generated with Claude Code

Summary

Removes five debug print statements from the panel render path to reduce terminal noise and the attack surface for markup injection via Rich:

judge_panel.py (~9 lines added, 2 removed):

  • File-routing filter now emits a single consolidated print_info line showing lens breakdown plus skipped judges (if any), rather than per-judge skip logging.

peer_review.py (~11 lines added, 14 removed):

  • Resume messaging consolidates all resumed judge labels into one comma-joined line instead of iterating per judge.
  • Missing decision files are now silently skipped (no per-judge warning) during aggregation.
  • Fetch-existing-comments logging unified to a single print_info call with count, replacing prior dim/console output.

The remaining panel output is now: phase headers, one progress line per judge, and the final summary. No probe lines, per-judge missing-decision warnings, or split fetch/found lines.

Pairs with PR #197 (which hardens remaining prints) by eliminating unnecessary prints instead of just securing them.

Review Change Stack

Five sites that printed dev-debug per panel run, all of which expanded
the crash surface for free (each was a new bracket-bearing dynamic
interpolation site):

- peer_review.py:565 — "Looking for judge_X: <path> (exists: ...)" probe
  per judge. Pure dev debug.
- peer_review.py:567 — per-judge "Decision file not found" warning.
  Same info is now in the panel summary's missing-judges callout, with
  one consolidated line instead of N warnings.
- peer_review.py:611-613 — split "Fetching existing comments" /
  "Found N existing comments" collapsed to one line with the count.
- peer_review.py:498-500, 824-826 — "Resuming N judges" header + a
  "→ Judge Label" line per judge. Collapsed into one comma-joined line.
- judge_panel.py:708-714 — separate "PR lens breakdown" + per-judge
  "Skipping X — no files in lens" lines consolidated into one line.

What stays on the panel render after this: phase headers, one progress
line per judge, the final summary. What used to leak — decision-path
probes, per-comment-fetch debug, per-judge label dumps — is gone.

Pairs with PR #197 (MarkupError chokepoint) but reduces actual surface
area instead of just making it crash-proof. Each line removed is one
fewer dynamic-interpolation site that can carry untrusted brackets.

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

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4bbd1a30-1918-4239-87ff-0347b7ab1183

📥 Commits

Reviewing files that changed from the base of the PR and between ede05ad and 28bb7e7.

📒 Files selected for processing (2)
  • python/cube/automation/judge_panel.py
  • python/cube/commands/peer_review.py
📜 Recent review details
🔇 Additional comments (7)
python/cube/automation/judge_panel.py (1)

710-725: LGTM!

python/cube/commands/peer_review.py (6)

498-499: LGTM!


501-501: LGTM!

Also applies to: 503-503


611-611: LGTM!


824-825: LGTM!


827-827: LGTM!

Also applies to: 829-829


565-566: ⚡ Quick win

Unable to rewrite the review comment (missing input). The message doesn’t include the original text inside <review_comment>...</review_comment>, so I can’t produce a rewritten version. Paste the exact review comment you want rewritten.


Walkthrough

Judge panel file-routing and peer review flows consolidate their logging output: judge panel filters accumulate skipped judges and emit a single summary; peer review resume flows print comma-joined labels instead of per-label messages; decision aggregation silently skips missing files and comment fetching uses unified logging.

Changes

Logging and messaging consolidation across judge panel and peer review flows

Layer / File(s) Summary
Judge panel routing summary consolidation
python/cube/automation/judge_panel.py
Judge panel file-routing filter accumulates kept and skipped judges during filtering, then emits a single consolidated summary message with lens breakdown and aggregated "skipped (no files in lens)" suffix, replacing per-judge skip logging.
Peer review resume messaging consolidation
python/cube/commands/peer_review.py
PR and branch review resume flows print single concise lines containing comma-joined session labels, removing the prior per-label console.print output and ellipsis-based formatting.
Decision aggregation and comment deduplication logging
python/cube/commands/peer_review.py
Missing per-judge decision files are silently skipped without per-file warnings during aggregation; existing-PR-comments fetch logging switches from dim/console output to print_info with fetched count.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • aetheronhq/agent-cube#172: This PR's refactoring of launch_judge_panel's "drop judges when their persona lens has zero files" logic and output consolidation builds upon the file-routing and empty-lens guard logic introduced in that prior PR.

Poem

A rabbit hops through logs so bright,
Consolidating day and night,
Where many messages once flew,
Now cleaner summaries shine through,
Judge and peer in harmony,
Logging flows with clarity! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly aligns with the main objective of removing debug noise from the panel render path, accurately summarizing the primary change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@jacsamell jacsamell merged commit 9a6601d into main May 21, 2026
1 of 2 checks passed
@jacsamell jacsamell deleted the cleanup-panel-render-noise branch May 21, 2026 08:48
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