feat(core): add mergeAdvanceAutoSync project setting
Schema for what the merger should do in other worktrees still checked out on the integration branch when it advances the branch ref. Modes: off — legacy (user pulls manually) ff-only — fast-forward only when other worktree is clean stash-and-ff — Smart Pull pipeline (default) Threads through DEFAULT_PROJECT_SETTINGS, PROJECT_SETTINGS_KEYS (auto via Object.keys), the docs settings table, and parity + persistence tests. Merger consumption lands in the follow-up engine change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
14
.changeset/merge-advance-auto-sync-setting.md
Normal file
14
.changeset/merge-advance-auto-sync-setting.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
"@fusion/core": minor
|
||||
---
|
||||
|
||||
feat(core): add `mergeAdvanceAutoSync` project setting (`"off" | "ff-only" | "stash-and-ff"`)
|
||||
|
||||
Adds the schema for a new project setting that controls what happens in **other** worktrees still checked out on the integration branch when the merger advances the branch ref. Previously the merger only updated `refs/heads/<branch>` and left every other checkout's index and working tree pinned at the old tip, so `git status` in the user's project-root checkout reported the new commits as inverted "staged changes to be committed."
|
||||
|
||||
Modes (default `"stash-and-ff"`):
|
||||
- `"off"` — preserve the legacy behavior; user must `git pull` or click the Merge Advance Notice banner Pull button.
|
||||
- `"ff-only"` — auto-fast-forward only clean worktrees; dirty worktrees stay untouched and the banner still surfaces.
|
||||
- `"stash-and-ff"` — run the Smart Pull pipeline (stash → fast-forward → pop). Pop conflicts emit `merge:auto-sync` audit events with `outcome: "stash-pop-conflict"` and surface through the existing dashboard stash-conflict modal.
|
||||
|
||||
Schema-only in this changeset; the merger hook that consumes the setting lands in the follow-up engine change.
|
||||
Reference in New Issue
Block a user