You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build_patch collapses multiple hunks of one file under a single diff --git
header, but only the different-files path (test_build_patch_groups_by_file)
was covered. This adds the same-file case, locking that two hunks of one file
produce a single file header with both hunk bodies present.
Test plan
uv run pytest tests/unit/_patch_test.py — new test_build_patch_joins_hunks_of_same_file passes; full suite (246) green
Finalized this tick. Test-only change adding test_build_patch_joins_hunks_of_same_file, which locks the same-file grouping path in build_patch (two hunks of one file collapse under a single diff --git header with both bodies present) — previously only the different-files case (test_build_patch_groups_by_file) was covered.
Based on current main HEAD (0 commits behind, no file overlap) → no rebase needed.
/code-review (medium): clean, no meaningful findings. Inline diff_output is single-use, consistent with repo scoping conventions.
Single well-formed commit → no recommit needed.
CI green across all 7 checks (lint + test matrix on ubuntu/macos/windows × py3.10/3.14), merge state CLEAN.
Test-only PR adding test_build_patch_joins_hunks_of_same_file, which covers build_patch grouping two hunks of the same file under a single diff --git header. The test is correct and meaningful: it asserts exactly one file header and that both hunk bodies (+A, +C) are present, exercising the files.setdefault(...) grouping plus "\n".join(h.diff ...) path.
/code-review (medium): no findings.
Commit history: single clean conventional commit; /recommit no-op.
CI: green across all 7 jobs (lint + test on ubuntu/macos/windows × 3.10/3.14).
No rebase needed (main gained 0 commits since merge-base; state CLEAN).
No push made this tick, so the existing green CI is authoritative. Ready for maintainer review and merge.
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
recommend-mergepr: Agent finalized and endorses it: review and merge
1 participant
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.
build_patchcollapses multiple hunks of one file under a singlediff --githeader, but only the different-files path (
test_build_patch_groups_by_file)was covered. This adds the same-file case, locking that two hunks of one file
produce a single file header with both hunk bodies present.
Test plan
uv run pytest tests/unit/_patch_test.py— newtest_build_patch_joins_hunks_of_same_filepasses; full suite (246) green