Recover from patch apply failures during sandbox pull#398
Merged
Conversation
1d37ba0 to
d8658d8
Compare
de465c8 to
736c82e
Compare
d8658d8 to
3a19651
Compare
When git apply fails pulling changes from a sandbox, retry with --reject to partially apply hunks that succeed and write .rej files for conflicts. Save the full patch to .rwx/sandboxes/patch-rejected.diff for manual inspection. Warn about leftover .rej files on next sync.
3a19651 to
e16e35c
Compare
jmsanders
approved these changes
Mar 5, 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
git applyfails pulling sandbox changes locally, retries withgit apply --rejectto partially apply clean hunks and write.rejfiles for conflicts.rwx/sandboxes/patch-rejected.difffor manual inspection.rejfiles at the start of the next sync (sync still proceeds)Example output
Pull with conflicts:
Next sync with unresolved
.rejfiles:Test plan
--rejectretry produces.rejfiles and reports them in warnings--rejectsucceeds fully.rwx/sandboxes/patch-rejected.diff.rejfiles.rejfile + saved patch + warning output.rejwarning appears on next sync, disappears after cleanup