Skip to content

ci: give the deep review CodeRabbit-grade formatting, a human blurb, and 2x turns - #245

Merged
allxsmith merged 1 commit into
mainfrom
claude/deep-review-formatting
Jul 7, 2026
Merged

allxsmith merged 1 commit into
mainfrom
claude/deep-review-formatting

Conversation

@allxsmith

@allxsmith allxsmith commented Jul 7, 2026 •

Copy link
Copy Markdown
Owner

What

Reworks the deep-review prompt in claude-review.yml so its output is structured, scannable, and human — closer to CodeRabbit — and doubles its turn budget.

Why

On #243 the deep review read as a jumbled paragraph, posted one terse summary line, and missed two real bugs CodeRabbit caught with deeper per-file analysis. Three fixes:

  1. Structured inline findings. Every finding is now Markdown: bold title + severity (🔴 Critical / 🟠 Major / 🟡 Minor) + category, then What / Why it matters / Fix (a ```suggestion block or fenced diff), long traces folded into <details>, and a ```mermaid diagram when a flow picture beats prose.
  2. A real summary review. A severity table + an Overall read + a short, human "California surfer" blurb — technical enough for the fix agent, readable enough for you. Built in a file and posted via gh api -F body=@file so the tables survive; the machine-parsed <!-- claude-deep-review --> marker stays line 1.
  3. Double the budget — --max-turns 60 → 120. Richer, verified, well-formatted findings need room, and the extra depth should help it stop missing code-level bugs.

Not in this PR

The bounded 3-round reviewer↔bestaxbot rebuttal on refuted findings — that needs gate/state-machine changes (routing refuted deep-review threads to the reviewer, a rebuttal-round counter separate from the fix-iteration cap, and a clean contested→human exit). It's coming as a dedicated follow-up so a bug there can't destabilize the loop. The same formatting + surfer tone will be applied to the re-review/verify reviewer in that PR.

Scope

claude-review.yml only — prompt text + one turn number. No logic, permission, or model changes. YAML validated.


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Improved automated review output formatting for more consistent and structured feedback.
    • Expanded review processing limits, allowing deeper analysis before finalizing results.
    • Standardized the final review summary layout, including clearer findings, overall assessment, and a short recap.

…and 2x turns

The deep review posted terse, jumbled-paragraph findings and a one-line
summary — hard for a human to scan and thinner than CodeRabbit's structured
output. Rework the reviewer prompt so its output is both AI-actionable and
human-readable:

- Every inline finding is now structured Markdown: bold title + severity
  (Critical/Major/Minor) + category tag, What / Why it matters / Fix
  (a suggestion block or fenced diff), long traces folded into <details>,
  and a mermaid diagram when a flow picture beats prose.
- The certifying summary review is now a severity table + an Overall read +
  a short, human 'California surfer' blurb — written to a file and posted
  via gh api -F body=@file so the tables/markdown survive intact. The
  machine-parsed <!-- claude-deep-review --> marker stays the first line.
- Double the reviewer's budget (--max-turns 60 -> 120): richer, verified,
  well-formatted findings need more room, and the deep review missed two
  real bugs on #243 that CodeRabbit caught with deeper per-file analysis.

Follow-up (separate PR): the bounded 3-round reviewer<->bestaxbot rebuttal
on refuted findings, which needs gate/state-machine changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVR5yWevceZEFbTJmpviiM
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR modifies the Claude deep review GitHub Actions workflow, increasing the --max-turns limit from 60 to 120 and rewriting the deep-review prompt to require a structured summary output written to a file, with a marker line, findings table, and narrative sections.

Changes

Claude review workflow configuration

Layer / File(s) Summary
Max-turns and prompt output rewrite
.github/workflows/claude-review.yml
--max-turns raised from 60 to 120; deep-review prompt rewritten to write summary to /tmp/deep-review.md starting with <!-- claude-deep-review --> marker, a findings table, Overall section, and surfer blurb, with defined zero-findings behavior, replacing the prior brief summary format.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • allxsmith/bestax#223: Both PRs modify the same --max-turns setting in claude-review.yml's deep-review configuration.
  • allxsmith/bestax#218: Both PRs increase --max-turns limits for Claude GitHub Actions workflows.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change well, but it omits most required template sections like packages, issue refs, type of change, and checklist. Reformat the PR description to match the template and add the missing sections: affected package(s), related issues, type of change, checklist, screenshots/demos, and additional context.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the workflow formatting change and doubled turn budget.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/deep-review-formatting

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

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://8cb66b8e.bestax.pages.dev

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/claude-review.yml (1)

140-168: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Template shows an instructional line above the marker, contradicting the "very first line" rule.

Line 166 says the literal marker must be the VERY FIRST line of the posted body, but the template at line 146 places (write this to /tmp/deep-review.md, filling in the values) above the marker on line 147. If the model treats the whole indented block literally, that parenthetical could end up as the actual first line of /tmp/deep-review.md. The downstream gate only checks contains(...) so this wouldn't break the loop, but it's worth tightening for clarity/robustness.

♻️ Suggested tweak
-               then post it:
+               then post it (the fenced block below is the exact file
+               content — do not include this parenthetical in the file):

-                 (write this to /tmp/deep-review.md, filling in the values)
                  <!-- claude-deep-review -->
                  ## Deep review — <N> finding(s)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/claude-review.yml around lines 140 - 168, The deep-review
template is inconsistent with the “marker must be the VERY FIRST line” rule
because the parenthetical instruction appears before the marker in the quoted
block. Update the template in claude-review.yml so the generated
/tmp/deep-review.md content starts immediately with the literal <!--
claude-deep-review --> marker, and move any instructional text outside the body
template or below the marker. Use the deep-review body template around the
summary section as the place to verify the marker placement.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/claude-review.yml:
- Around line 140-168: The deep-review template is inconsistent with the “marker
must be the VERY FIRST line” rule because the parenthetical instruction appears
before the marker in the quoted block. Update the template in claude-review.yml
so the generated /tmp/deep-review.md content starts immediately with the literal
<!-- claude-deep-review --> marker, and move any instructional text outside the
body template or below the marker. Use the deep-review body template around the
summary section as the place to verify the marker placement.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 13b91277-462d-470f-a4a3-dadb44f8ff21

📥 Commits

Reviewing files that changed from the base of the PR and between b1ff2dd and 3faf509.

📒 Files selected for processing (1)
  • .github/workflows/claude-review.yml

@allxsmith
allxsmith merged commit c4e80c0 into main Jul 7, 2026
18 checks passed
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants