Skip to content

Add updatedAt-based conflict resolution for pinnedExtensions#803

Draft
JonahBraun wants to merge 1 commit intomainfrom
feature/pin-updatedAt-conflict-resolution
Draft

Add updatedAt-based conflict resolution for pinnedExtensions#803
JonahBraun wants to merge 1 commit intomainfrom
feature/pin-updatedAt-conflict-resolution

Conversation

@JonahBraun
Copy link
Copy Markdown
Contributor

@JonahBraun JonahBraun commented Mar 25, 2026

When both local and remote modify the same pin entry during a merge, use the updatedAt timestamp to determine the winner — the most recent change takes precedence. Stable (unpin) entries default to updatedAt: 0 so any active pin always wins over an unpin unless the unpin is newer.

Part of the extension pinning project. See the architecture doc.

Changes

  • Add updatedAt field to the PinnedExtension type in types/index.d.ts
  • Add pin-specific conflict resolution in resolvers.ts that compares updatedAt timestamps when both sides modified the same pin entry

Note

Medium Risk
Changes merge behavior for metadata.json extension pin entries, which could affect how sync conflicts are resolved and potentially override a user's intended pin/unpin if timestamps are wrong or missing.

Overview
Adds pin-specific conflict resolution for meta.pinnedExtensions during metadata.json 3-way merges: when both ours and theirs changed the same pin entry, the version with the highest updatedAt now wins.

Extends the project metadata type so each pinnedExtensions record includes updatedAt (and documents that version "stable" represents an unpinned state).

Written by Cursor Bugbot for commit 4f71e43. This will update automatically on new commits. Configure here.

@JonahBraun JonahBraun marked this pull request as draft March 25, 2026 23:32
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