Conversation
7b70b69 to
4923245
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 4923245. Configure here.
| } | ||
| if options.Yes || !plan.RequiresConfirmation() { | ||
| autoApply := options.Yes || (options.Watch && !plan.HasDestructiveActions()) | ||
| if autoApply || !plan.RequiresConfirmation() { |
There was a problem hiding this comment.
Watch confirm ignores cancellation
Medium Severity
Watch mode now routes archive and delete through confirmApply, which blocks on stdin and never observes the watch Context. signal.NotifyContext consumes the first Ctrl+C, so that interrupt neither dismisses the prompt nor exits the watch loop. A later yes still applies the destructive plan.
Additional Locations (1)
Triggered by learned rule: Watch: conflict abort must cancel the watch loop
Reviewed by Cursor Bugbot for commit 4923245. Configure here.


Context
Watch mode currently treats every filesystem-triggered sync as pre-approved. That is convenient for routine edits, but it also allows a local deletion to archive a LaunchDarkly variation, or a server deletion to remove a local file, without confirmation.
What changes
--watch --yesas the explicit non-interactive opt-in.For example:
Verification
go test ./internal/sync/promptgo test ./...git diff --checkNote
Overview
Watch mode no longer auto-applies destructive sync actions (archiving in LaunchDarkly or deleting local files). Routine creates/updates still apply without prompting when
--watchis on.Adds
Plan.HasDestructiveActions()and uses it inreviewAndConfirmPlan: watch auto-apply only when the plan has no archive/delete actions. Destructive watch runs prompt "Sync these changes? [y/N]" when a TTY is available; otherwise they fail with the existing rerun with --yes path unless the user passed--watch --yes.Refactors watch option cloning into
optionsForWatchSync, which stops forcingYes: trueon every watcher-triggered sync so--yesremains an explicit opt-in per run.Reviewed by Cursor Bugbot for commit 4923245. Bugbot is set up for automated code reviews on this repo. Configure here.