Repository navigation
fix: reject mode-only changes instead of silently dropping them - #79
Merged
2 commits merged intoSep 27, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
|
Warning Review limit reachedNext included review available in 46 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 |
A chmod-only change produces a diff entry with no hunks. Like binary files, nothing in the plan can claim it, coverage validation passes, and the mode change is missing from every sub-PR. Reject it up front with the same kind of message as binary files.
vitali87
force-pushed
the
fix/reject-mode-only-changes
branch
from
August 30, 2026 13:06
0954845 to
cd7ee80
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015rnEEjXWDBdePRhKMmZr1w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A mode-only change (
chmod +x run.sh) shows up in the diff aswith zero hunks. The planner has nothing to assign,
validate_coveragepasses (no hunks means no gap), and the mode change is absent from every sub-PR — the same silent-drop failure mode #61 fixed for binary files. (Pure renames used to hit this too; #49's--no-renamesturns them into delete+add with hunks, so they are handled.)Fix
validate_no_binary_filesalso rejects hunk-less entries withHUNKLESS_FILES_UNSUPPORTED:Diff contains files with no text hunks (mode-only or empty changes), which cannot be assigned to a sub-PR: run.sh. Commit them separately and re-run. Because it lives in the same check it is enforced everywhere #61 enforces it:splitbefore planning,validate_plan, andexecuteon a saved plan.Applying mode changes in the worktree is the real feature (read
new modefrom the header andchmodin the group's worktree); this PR makes the drop loud rather than silent.Tests
Mode-only entry alongside a text file: the validator raises with the path;
validate_planrejects even when the text hunks are fully covered. 450 tests pass, ruff clean.Stacked on #61 (
fix/reject-binary-files).