Repository navigation
feat(repo): cherry-pick and rebase on a partial clone (P37c-iv) - #185
Merged
Merged
Conversation
replay_commit, the one place cherry-pick and the rebase fold reach the file merge, now uses the pull-based tree engine on a partial clone. A subtree the sides agree on is carried by id, a region both touched is read (filled by id on a lazy clone, a gap error otherwise), and the result keeps the complete wrap union when anything was carried. A stopped pick or rebase keeps its carried subtrees in the decided root and applies the same refusals as a stopped merge. Completion grafts the out-of-view part from the decided root. The final write fills the view first, and abort checks it before removing anything. Sidecar cleanup is shared and never removes a file a tree tracks, which also fixes it for rebase --continue. ADR-0049 decision 10 records the design. Co-Authored-By: Claude Sonnet 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. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 11
✨ Finishing Touches
Comment |
…ided root The guard checked the merge head and the decided root but not the pick head, so a stopped pick whose decided-root file was gone completed by grafting from the tip and silently kept the old out-of-view content. Refuse instead; --abort still clears the state. ADR-0049 records three existing full-clone defects the review found (q18 to q20). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pick, rebase and merge aborts now remove only sidecars the restored tree does not track, and rebase --continue only those its completion parent does not track. Wider sets kept a sidecar the next commit would sweep in. Adds tests for a rebase abort that hits a view gap and a two-step rebase over a carried protected subtree, and fixes a stale comment and ADR reference. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tonibergholm-codento
approved these changes
Oct 18, 2026
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.
Summary
sc cherry-pickandsc rebase(with--continueand--abort) now work on a partial clone, on the engine and conflict contract of ADR-0049 decisions 2 to 8. Design in decision 10, added here.replay_commitcalls the tree engine on a partial clone: base is the commit's parent, ours the onto tree, theirs the commit. Carried subtrees are never read; a differing region is filled by id when lazy and a gap error otherwise.rebase --continueandcherry-pick --abort.sc ws,sc work) stay refused.Tests
partial_replay.rs: each result compared by root tree id with the same operation on a full repo. Carried subtree never fetched, differing region (lazy fills, non-lazy refuses), conflict in view completes like a full pick, abort and a view gap on abort, carried protected subtree keeps wraps, rebase carries the target's subtree through every step, rebase stop/abort/resolve/continue, in-view carried subtrees filled on pick and rebase.cherry_pick_and_rebase_work_on_a_partial_clone;backfill_all_lifts_partial_clone_refusalsnow usessparse disableas the refused op.ensure_viewfrom the pick path or the fold, and grafting from the tip instead of the decided root, each fail a test.🤖 Generated with Claude Code
Summary by CodeRabbit