fix(ci): resolve modify/delete conflicts in sync conflict PRs
Merged
RI
3mo ago+45+45+01234567890123456789-5-5-0123456789
What
- Fix
Create PR for conflictsinsync-branches.ymlwhen upstream sync hits modify/delete conflicts (e.g..github/workflows/ci.ymldeleted onplus, modified upstream). - Refetch upstream objects before merge to reduce promisor lazy-fetch errors during merge.
Why
Run 32394290222 shows PR #109 fixed the promisor crash and correctly detected merge conflicts, but the job still failed at Create PR for conflicts:
git merge upstream/main -X theirsauto-resolved content conflicts- modify/delete on
.github/workflows/ci.ymlstayed unmerged - Step exited 1 → no conflict PR created
How
- Added
merge_upstream_preferred()in.github/scripts/sync-gh-helpers.sh: runs-X theirs, then for remaining unmerged paths runsgit checkout --theirs+git add(covers modify/delete), then commits. - Both
sync-main-branchandsync-plus-branchconflict PR steps use the helper. - Added
git fetch --refetch --no-filter upstream mainafter initial upstream fetch. - Conflict PR branches now checkout from
origin/plus/origin/main.
Testing
- Reproduced failure signature from run 32394290222 logs.
- Locally simulated partial clone + upstream merge; helper completes merge when only modify/delete conflict remains on
ci.yml.
Not Tested
- Full GitHub Actions re-run after merge (please re-run Sync Branches from Upstream →
plus).
Notes
- Open sync PRs #81 and #82 left untouched.
- Conflict PR may re-introduce upstream
.github/workflows/ci.yml; review before merging sync PR.


Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by CodeRabbit
- Bug Fixes
- Improved automated branch synchronization by preferring upstream changes during merges.
- Added handling for unresolved conflicts, including selecting or removing upstream files where appropriate.
- Ensured failed conflict resolution restores the affected branch to a clean state.
- Maintenance
- Improved upstream refetching to ensure complete branch data is available during synchronization.