feat: implement issue #574 — pr-review: PRs with >300 changed files hard-fail the cascade (gh pr diff 406); define org standard for oversized PRs#606
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 31 minutes and 9 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds fallback handling for pull requests exceeding GitHub's 300-file unified-diff limit. When ChangesOversized PR Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a fallback mechanism to handle oversized pull requests (exceeding 300 changed files) where GitHub's unified-diff endpoint returns an HTTP 406 error. It adds documentation, a helper function to detect the error, fallback logic in the review script to assemble a diff from the per-file REST API, and unit tests. The feedback suggests using the optional object identifier iterator .[]? in the jq filter within scripts/review-one-pr.sh to prevent execution errors if the API returns an empty response.
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #606 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #606 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@scripts/review-one-pr.sh`:
- Around line 442-443: The two printf invocations that print the assembled-diff
note break the sentence awkwardly; update the printf usage that references
_changed_files so the whole note is printed as one coherent sentence (replace
the two separate printf calls with a single printf that emits the full message
without the mid-sentence newline, or rephrase the text to move the clause
“exceeds GitHub’s 300-file unified-diff cap” earlier), targeting the printf
lines that contain "# NOTE: diff assembled from per-file REST API (%s changed
files exceeds" and the following "# GitHub's 300-file unified-diff cap; patches
may be partial or absent for large files)" so the output reads cleanly on one
line.
- Around line 432-451: The fallback silently swallows failures of the gh api
call (the command with gh api ... --paginate --slurp | jq ... 2>/dev/null ||
true), which can leave PR_DIFF empty; change this so the REST API error is
captured and logged: run the gh api pipeline without redirecting stderr to
/dev/null (or capture its stderr into a temp file like _fallback_err), check the
command's exit status ($?); if it fails, emit a clear warning to stderr (e.g.,
echo "warning: gh api fallback failed: <error details>" >&2) referencing the gh
api invocation and the temp files (_fallback_tmp and _fallback_err) so callers
can diagnose network/rate-limit errors before continuing to assemble PR_DIFF.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4b512722-0df0-4767-ba8f-910372ee259a
📒 Files selected for processing (5)
.github/workflows/lint.ymlAGENTS.mdscripts/engine.shscripts/review-one-pr.shtests/test_oversized_pr.bats
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #606 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…tch bridge (#654) * fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge PR #618 (issue #591) fixed the `idea:approved` auto-trigger: claude-code-action aborts with "Unsupported event type: discussion", so the planner re-invokes itself via workflow_dispatch through a `redispatch` bridge job. PR #606 (an unrelated pr-review change) was branched off main before #618 landed and, on merge, silently reverted the fix — deleting the redispatch job, redispatch.sh, and its bats test, and restoring the broken direct-on-discussion `if`. As a result, labelling a Discussion `idea:approved` (e.g. #650) again failed with "Unsupported event type: discussion" and never planned. Restore #618 verbatim, preserving the current claude-code-action v1.0.148 pin: - re-add the `redispatch` job; `plan` runs only on workflow_dispatch - restore scripts/initiative-planner/redispatch.sh - restore tests/test_initiative_planner_redispatch.bats - restore the README rows for redispatch.sh and its test https://claude.ai/code/session_01WRJisJyfNK2CuR4f1n9cao * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
Closes #574
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation