feat(sync): reconcile prompt variation changes - #813
Conversation
c145a51 to
de80ad0
Compare
de80ad0 to
2bed547
Compare
2bed547 to
3854a8e
Compare
3854a8e to
b427151
Compare
b427151 to
79b386a
Compare
b7fdbc7 to
a9e204b
Compare
a9e204b to
fadb398
Compare
nieblara
left a comment
There was a problem hiding this comment.
I think this seems fine, but the destructive actions would be executed from that forced-auto mode for applying changes, not sure if we want that!
8aeee8a to
8f89857
Compare
8f89857 to
7cc8f21
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7cc8f21. Configure here.
0f141f8 to
2d7f4ce
Compare
7638c10 to
d2da217
Compare
e0714b5 to
fc46439
Compare
fc46439 to
07a2b20
Compare
Good point. Thought about this a little bit more and the intended behavior should be for watch mode to auto-apply non-destructive changes, but still prompt for confirmation before archive or delete actions. I created a ticket to track that follow-up. |
07a2b20 to
b3fc595
Compare
b3fc595 to
005bed3
Compare

Context
The manifest records the last state accepted locally and in LaunchDarkly. Comparing that baseline with both current sides lets sync distinguish a local edit, server edit, deletion, and true conflict without adding a backend sync endpoint.
What changes
Review focus
Verification
go test ./internal/sync/...git diff --checkRelated changes
Review the stack in this order:
Note
Overview
Adds
internal/sync/prompt, the core library for reconciling prompt variations between local files, LaunchDarkly, and the sync manifest.Planning compares manifest baseline fingerprints to current local and server state and picks deterministic actions (push, pull, create, archive, delete, manifest bookkeeping, conflict, or error). First-sync and
upsertbehavior are handled separately from tracked three-way merges.Review output renders plans and post-sync outcomes as plaintext, Markdown, or JSON, including colored unified diffs (side-by-side on wide terminals) via
go-difflib, with readable placeholders for missing or archived resources.Execution re-checks fingerprints immediately before each mutation, applies server changes through existing variation APIs and local changes through the workspace store, verifies local writes, and on ambiguous API failures re-reads LaunchDarkly before treating a write as success. The reviewed manifest is copied so only successful resources advance the returned manifest; failures are reported per resource.
Tests cover the three-way action matrix, first-sync rules, manifest immutability, and JSON/diff messaging.
Reviewed by Cursor Bugbot for commit 005bed3. Bugbot is set up for automated code reviews on this repo. Configure here.