Repository navigation
fix(pr-pipeline): collect exact renames so a moved skill fits the patch cap - #11257
Conversation
…ch cap collect-patch.sh ran git diff --no-renames, so a pure move became a full deletion plus a full addition and blew the 262144-byte patch cap (#11124's morning-brief move: 864697 bytes). It now passes -M100%, the form pr-review-main's write-diff.py uses: an exact move is a rename header with no content, and a rename with edits stays a deletion and an addition. apply-patch.mjs needs no change: it applies with git apply and checks the tree the patch builds with --no-renames, so a rename's old and new path each meet every refusal, the predicates, max-files and the blob checks. New issue-row tests pin that for the header form. Refs: #11124 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. |
|
claude-review needs no new review of No findings. The change swaps What I checked by reading the code (I ran no tests):
Residual note, not a finding: in merge-base (text-patch) mode, the comment at Spend: none. This change has no cost or paid-plan effect. The test results in the PR description (181 apply-patch tests, the |
|
claude-security-review needs no new review of No security issues found in this pull request. Change: Why it opens no path: the patch comes from the read activity, which handles model-influenced output, so I checked every consumer of the patch.
Trusted-path matches: Spend: none. The change shrinks the patch size and adds no turns, runs or billing. critical-findings: 0 |
|
The pr-verify verifier failed head What it wrote (24 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
No related issue: lane defect fix (the shared read-patch collector wrote exact moves as delete plus add and exceeded the patch cap), found while the issue lane worked #11124; it delivers none of #11124's done-when items, which stay with the issue lane.
Summary
The read-patch collector ran
git diff --no-renames, so a pure move became a full deletion plus a full addition and went over the 262144-byte patch cap inpr-run-activity-read.yml. Issue #11124 moves the 422 KBmorning-briefskill, and that move was refused three times. The collector now writes exact renames as rename headers. This collector is shared by every patch-mode row, not only the issue lane.Fix
.github/scripts/read-patch/collect-patch.shpasses-M100%in place of--no-renames, the same formpr-review-main/write-diff.pyuses (fix(pr-pipeline): record the main-run review's size stop as an outcome and collapse exact renames #10961, feat(pr-pipeline): review an oversize main-run diff in chunks #11160).apply-patch.mjsneeds no change:git apply --cached, which accepts rename headers.diff-tree --no-renames. A rename's old path therefore meets every refusal as a deletion, and its new path as an addition. Both also meet the allow predicates,max-files, and the blob size and credential checks.rename-into-refusedstill runs with-Mon that tree.pr-run-activity-read.ymlapplies the patch and scans the bytes of the tree it builds, so the patch's form does not change what it reads.docs/conventions/pr-pipeline/pr-run-activity.mdnow says how the patch writes renames.Verification
Red first. Before the collector change, 6 of the new or changed
collect-patch.test.shchecks failed:config: the exact move is one renamefailed.After the change:
bash .github/scripts/read-patch/collect-patch.test.sh: all pass. Cases:similarity index 100%renames, no content hunk and under 1 KiB, and the patch applies to a fresh checkout and rebuilds the tree;diff.renames copies) still changes nothing: no copy headers.bash .github/scripts/read-patch/collect-patch-lane.test.sh: pass.node --testin.github/scripts/apply-patch: 181 pass, 0 fail. These new issue-row tests use the collector's-M100%form:.github/workflows/orCODEOWNERSis refused by the old path's rule;.github/workflows/or the central lane grant file is refused byrename-into-refused.They passed before the collector change too, because the apply side already checked both paths. They guard against regressions; they were not red first.
python3 -I scripts/sync-hold-floor.py --check: pass.CHECK_DATA_ROOT=$PWD bash scripts/check-affected.sh --tests:12 passed, 4 skipped over 5 changed files.No workflow was edited, so actionlint has nothing new to check.
Metrics
I measured locally by running
git mv plugins/harness-ops/skills/morning-brief plugins/work-items/skills/morning-brief(9 files) on95622795f7and running both collectors:--no-renames)-M100%)This covers the pure move only. Any moved file that #11124 also edits (for example its own skill name) drops below 100% similarity and still costs its full content twice. The 25 reference edits add their own hunks. The move is 18 tree entries against the issue row's
max-files: 300.Related
pr-review-main).🤖 Generated with Claude Code