Skip to content

fix(sync): keep fork-generated files on merge conflict (sync failing since Oct 6) - #58

Merged
SmailG merged 1 commit into
SmailG:mainfrom
back1ply:fix/sync-generated-file-conflicts
Oct 19, 2026
Merged

SmailG merged 1 commit into
SmailG:mainfrom
back1ply:fix/sync-generated-file-conflicts

Conversation

@back1ply

@back1ply back1ply commented Oct 16, 2026 •

Copy link
Copy Markdown

Every scheduled Sync upstream run since 2026-10-06 has failed. The last one that succeeded was #57 on 2026-10-05. main is now about 119 commits behind cursor/plugins.

Cause

cursor/plugins now ships its own .claude-plugin/marketplace.json. It lists one plugin, origin-apps. When the workflow merges upstream/main, that file add/add-conflicts with this fork's generated marketplace, and README.md conflicts as well. The conflict handler then:

  1. checks out upstream's README.md and runs scripts/rebuild-readme.mjs while marketplace.json is still unresolved, so the script crashes:
    CONFLICT (add/add): Merge conflict in .claude-plugin/marketplace.json
    CONFLICT (content): Merge conflict in README.md
    SyntaxError: Expected property name or '}' in JSON at position 2
        at readJSON (scripts/rebuild-readme.mjs:7:28)
    
  2. would apply "upstream wins" to marketplace.json even if step 1 got through. That would rename the marketplace from cursor-plugins-claude to cursor-plugins and keep upstream's one-entry plugin list, so existing /plugin install …@cursor-plugins-claude installs would break.

Fix

The fork generates both files, so resolve them with --ours. The existing Sync manifests and Rebuild README steps then regenerate them from the merged tree. Every other conflicted file still resolves in favor of upstream, as before.

Testing

I ran the patched step against main merged with the current upstream/main (f713f14):

  • both conflicts resolve, and the merge commit is created
  • sync-manifests.mjs reports 17 plugins (+0 -0) and picks up origin-apps. The marketplace name stays cursor-plugins-claude.
  • rebuild-readme.mjs lists 17 plugins
  • validate-plugins.mjs: "All plugins validated successfully."

I'm sending this as a PR because Issues and Discussions are turned off on this repo.

🤖 Generated with Claude Code

Upstream cursor/plugins now ships its own .claude-plugin/marketplace.json
(origin-apps), which add/add-conflicts with this fork's generated one.
The conflict handler rebuilt README.md before that conflict was resolved,
so rebuild-readme.mjs crashed parsing conflict markers and every daily
sync has failed since 2026-10-06.

Resolve marketplace.json and README.md with --ours; the existing
"Sync manifests" and "Rebuild README" steps regenerate both from the
merged tree. Taking upstream's marketplace.json would also have renamed
the marketplace from cursor-plugins-claude to cursor-plugins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1
  • sync

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: SmailG/claude-cursor-plugins/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1be5b5b9-02d7-4b1b-9939-239e0f587331

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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.

@SmailG
SmailG merged commit dac0f42 into SmailG:main Oct 19, 2026
1 check passed
@SmailG

SmailG commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Thanks, this landed on main through #59, which folded it in alongside the agent frontmatter change, so GitHub shows this PR as merged. The merge kept your commit (1ca4787) and its authorship.

While testing the fixed sync against current upstream, a second blocker turned up: upstream's 182f2ce changes .github/workflows/validate-plugins.yml, and GITHUB_TOKEN cannot push commits that touch workflow files. #59 adds an optional SYNC_TOKEN secret for that, plus a guard that fails with a clear message when the secret is missing, and an issue report when a sync fails.

Your branch has not been touched.

@back1ply
back1ply deleted the fix/sync-generated-file-conflicts branch October 19, 2026 17:54
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.

2 participants