feat(sync): orchestrate prompt synchronization - #820
Merged
Merged
Conversation
ctawiah
added this pull request to stack #821
September 24, 2026 17:59
This was referenced Sep 24, 2026
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 25, 2026 15:31
754b2e0 to
89f2262
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 25, 2026 16:00
89f2262 to
c234918
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 25, 2026 16:08
c234918 to
070a54e
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 25, 2026 16:11
070a54e to
16d6998
Compare
nieblara
approved these changes
Sep 28, 2026
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
2 times, most recently
from
September 28, 2026 21:38
60c617c to
527eff0
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 28, 2026 21:44
527eff0 to
21ff59e
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
3 times, most recently
from
September 29, 2026 00:04
bbeea91 to
501947b
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
2 times, most recently
from
September 29, 2026 00:17
4fe2b1a to
9d729d3
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 29, 2026 00:24
9d729d3 to
91636c3
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
4 times, most recently
from
September 29, 2026 00:45
1109bb2 to
d4c6aaf
Compare
Base automatically changed from
ctawiah/AIC-3446/prompt-reconciliation
to
main
September 29, 2026 00:49
ctawiah
force-pushed
the
ctawiah/AIC-3448/prompt-sync-orchestration
branch
from
September 29, 2026 00:49
d4c6aaf to
d712ac0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit d712ac0. Configure here.
| return err == nil && filepath.Dir(relative) != "." | ||
| } | ||
| } | ||
| return false |
There was a problem hiding this comment.
Directory rename drops watch set
Medium Severity
Rename or Remove on a managed directory unregisters that subtree, but relevant ignores those events unless the path is an already-tracked file. When the platform does not also emit per-file events or a Create for the new path, watch stops seeing that tree until some later unrelated sync calls Refresh.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d712ac0. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Context
The reconciliation engine produces individual actions, but a complete sync run still needs review, conflict handling, revalidation, and watch behavior. This layer provides that internal orchestration without adding the Cobra command.
What changes
fsnotifyto watch wrappers and referenced files without an initial sync.Review focus
Verification
go test ./internal/sync/...go test -race ./internal/sync/...git diff --checkRelated changes
Review the stack in this order:
Note
Overview
Adds
internal/sync/promptorchestration for Git-backed prompt sync: aRunnerwires bootstrap, link, detach, dry-run, and the full plan → conflict → review → revalidate → execute path.Interactive flows show per-conflict diffs and prompt for LaunchDarkly, local, or abort; conflicts still require a TTY even with
--yes. After review, local/server state is re-read and fingerprint-compared so writes use fresh data; conflict choices are applied on the reloaded plan, not the reviewed copy.--watchuses directfsnotifydependency: debounced watches on.launchdarklyand referenced files, content snapshots to ignore duplicate editor events, no sync until the first real change, and automatic plan refresh when sources change during sync or an open conflict prompt.Interactive forms gain context cancellation via
SelectContext/RunFormContext(RunWithContext, alt-screen removed) so watch mode can interrupt huh prompts.Reviewed by Cursor Bugbot for commit d712ac0. Bugbot is set up for automated code reviews on this repo. Configure here.