Repository navigation
fix(pr-review-cli): review a diff over the read budget in chunks - #944
Conversation
A diff in scope over one review's 300000-byte read budget was reviewed by one model step and always concluded partial. Each model leg now splits it at file boundaries, each file whole, into at most 4 chunks with claude-code-plugins' .github/scripts/pr-review-main/split-diff.py, read from that repository's default-branch tip with the review plugin, and reviews each chunk in its own run-claude-cli step, in order. - Split step: runs only over the budget, into a chunk directory that must be new, refuses a symlinked diff, and outputs the chunk count and each chunk's file count. A refused or failed split reviews unsplit, which the extract step keeps partial. - Compose: one prompt per chunk naming its patch and the manifest, with the summary and comment caps divided by the chunk count so the combined review still fits one environment string. - Chunk k runs only when chunk k-1 succeeded and handed nothing on. The job's handoff, lane class and outcome report follow the last chunk that ran; a credit stop in any chunk is recorded. - Extract: complete only when every chunk's step succeeded and returned a well-formed review; findings, comments and files read are the chunks' sums, each chunk's files read capped at the files the job counted in it, and each chunk file must be a regular file within the budget. A failed, skipped or verdict-less chunk is incomplete, so the status check is never success before every chunk returns. - Job limits grow by the three extra chunk steps, their timing steps and the split step. Refs: melodic-software/claude-code-plugins#11575 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin step now also checks out .github/scripts/pr-review-main for split-diff.py; collect-settled-threads.test.cjs pinned the old set. Refs: melodic-software/claude-code-plugins#11575 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A head that commits .claude-lane/chunks failed the split step silently; it now warns and takes one review, which stays partial when over budget. Refs: melodic-software/claude-code-plugins#11575 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da585602e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review reviewed Code review: PR #944 (chunked review of an oversize diff)No findings. I read all four changed files: I didn't run the tests. The sandbox refused What I checked in the workflow, by reading it:
Minor, not worth blocking: the permission-mode check skips a later chunk whose Closing issue: Embedded text: the PR body contains no instructions aimed at the review. Manifest checks: no plugin manifest changed, so none apply. |
|
claude-security-review reviewed No security issues found in this pull request. critical-findings: 0 The change splits an oversize diff into at most 4 chunks. It adds one model step per chunk to both the key leg and the subscription leg of Checks I made:
The Settled threads and PR context: none were supplied, and the pull request's own text was not needed to judge the code. No plugin manifests changed. No trust-control files were touched: the token request, kill switch, trusted-actor list and merge-hold scripts are all outside this diff. |
A chunked review was told to report any reference to a file another chunk holds, which flagged valid caller-helper pairs split by the partition. The model now reads the other file's changes as context and reports only a verified incompatibility, in all three credential legs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nk-oversize # Conflicts: # .github/scripts/pr-review-cli.test.cjs # .github/workflows/pr-review-cli.yml
Closes melodic-software/claude-code-plugins#11575
Summary
The
claude-reviewlane (checkpr-review / claude-review-status) read part of an oversize diff and still concludedsuccess. #943 made a partial read fail closed aspartial. This change adds the chunked review the issue asks for, so an oversize diff is reviewed in full.Fix
split-diff.py, run withpython3 -Ifrom the default-branch clone the job already makes; the sparse set gains.github/scripts/pr-review-main. If the split refuses, or the head already holds the chunk directory, the diff is reviewed unsplit and stayspartialunder fix(pr-review-cli): fail a review that read only part of its scope #943's rule.claude-2toclaude-4run in order. Chunk k runs only after chunk k-1 succeeded and handed nothing off.pr-review-cli.yml:99-118,:3846). A caller matrix could not change that conclusion and would have to be copied into each caller.Verification
pr-review-cli.test.cjs: 47 of 47 pass. 6 of them fail against main's workflow, covering split, per-chunk compose, the ordered gating, summed coverage, fail-closed chunks and the planted chunk directory.collect-settled-threads, which pins the new sparse set.biome ci(2.5.11) is clean.actionlintis clean apart from the two filters main already needs.-I.${{ }}reaches arun:body, and no permission or secret changed.ubuntu-24.04.Related
🤖 Generated with Claude Code