Skip to content

Preserve local conflicts across repeated CMS syncs - #62

Merged
elemdos merged 1 commit into
masterfrom
fix/sticky-sync-conflicts
Oct 10, 2026
Merged

elemdos merged 1 commit into
masterfrom
fix/sticky-sync-conflicts

Conversation

@elemdos

@elemdos elemdos commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Under primo dev --author both, a CMS pull could preserve a local edit and print FILES WON, then overwrite or delete that file on the very next pull. The pull baseline now retains the CMS snapshot until local and CMS contents agree, so unresolved local edits stay protected across repeated cycles. Existing warning deduplication prevents repeated conflict messages.

Regression tests exercise the built sync function against real HTTP export archives and disposable files: repeated overwrite attempts, whole-directory deletion, new local files, convergence followed by a CMS-only edit, and explicit CMS-author overwrites with trash backups. The first three reproduced the bug before the fix.

Validation: full CLI suite with Node 22.22.3: 136 passed, 2 skipped; TypeScript build and git diff --check passed. Two-way sync remains experimental; its startup warning is a separate PR (#61).

Fixes #26.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 213cceff-2500-4110-b396-0c9bbf58e101

📥 Commits

Reviewing files that changed from the base of the PR and between 34deb1d and 5eeba6a.


📒 Files selected for processing (2)
  • src/commands/dev.ts
  • tests/dev-sync-conflicts.test.mjs


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@elemdos
elemdos merged commit 721a7b6 into master Oct 10, 2026
2 checks passed
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.

files-win conflict resolution only holds for one poll cycle

1 participant