Skip to content

Auto-resolve merge conflicts in upstream sync - #5

Merged
dogmar merged 2 commits into
mainfrom
claude/fix-upstream-merge-automation-73Ctv
Mar 27, 2026
Merged

dogmar merged 2 commits into
mainfrom
claude/fix-upstream-merge-automation-73Ctv

Conversation

@dogmar

@dogmar dogmar commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Auto-resolve known conflict categories during upstream merge (docs, changelogs, lockfile, examples, deleted CI workflows)
  • Abort with clear error if unresolvable conflicts remain (e.g. source code)
  • After resolving lockfile conflicts, run pnpm install --no-frozen-lockfile to reconcile with fork's root package.json
  • Add tanstack/config setup step so pnpm/Node are available for lockfile reconciliation
  • List auto-resolved files in the PR body for transparency

Auto-resolution rules

Pattern Resolution Rationale
docs/* Take upstream Generated docs; autofix CI regenerates
.github/workflows/release.yml Keep deleted Fork uses publish-fork.yml
packages/*/CHANGELOG.md Take upstream Fork doesn't add entries
pnpm-lock.yaml Take upstream + pnpm install Reconcile with fork deps
examples/**/package.json Take upstream Fork doesn't modify examples
Everything else Fail Requires manual review

Test plan

  • Trigger sync workflow manually when upstream has new changes
  • Verify auto-resolution works for known conflict categories
  • Verify workflow fails cleanly if source code conflicts exist

https://claude.ai/code/session_01QCPv9A7pkCeR42zoJ9fujU

When the merge has conflicts, automatically resolve files that the fork
never customizes:
- docs/ — generated reference docs (take upstream, autofix CI regenerates)
- .github/workflows/release.yml — deleted in fork (keep deleted)
- packages/*/CHANGELOG.md — upstream changelogs (take upstream)
- pnpm-lock.yaml — lockfile (take upstream)
- examples/**/package.json — example deps (take upstream)

If any conflicts remain outside these categories, the workflow aborts
with a clear error listing the files that need manual intervention.
Auto-resolved files are listed in the PR body for visibility.

https://claude.ai/code/session_01QCPv9A7pkCeR42zoJ9fujU
After taking upstream's pnpm-lock.yaml during conflict resolution, run
pnpm install --no-frozen-lockfile to incorporate any fork-specific
dependencies from our root package.json. Adds the tanstack/config
setup step so pnpm and Node are available for this.

https://claude.ai/code/session_01QCPv9A7pkCeR42zoJ9fujU
@dogmar
dogmar force-pushed the claude/fix-upstream-merge-automation-73Ctv branch from 8c3ce85 to 38a40f4 Compare March 27, 2026 22:55
@dogmar
dogmar merged commit 71624b5 into main Mar 27, 2026
3 checks passed
@dogmar
dogmar deleted the claude/fix-upstream-merge-automation-73Ctv branch March 30, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant