Merge pull request #1226 from plarson/fix/dirty-integration-merge-block

fix(engine): block dirty integration merge landings
This commit is contained in:
gsxdsm
2026-05-31 13:49:58 -07:00
committed by GitHub
8 changed files with 97 additions and 15 deletions

View File

@@ -267,7 +267,7 @@ export const DEFAULT_PROJECT_SETTINGS = {
],
prerebaseDivergenceThreshold: 50,
mergeConflictStrategy: "smart-prefer-main",
merger: { mode: "ai", maxReviewPasses: 3 },
merger: { mode: "ai", maxReviewPasses: 3, allowDirtyLocalCheckoutSync: false },
mergeDiffVolumeMinLines: undefined,
mergeDiffVolumeThreshold: undefined,
mergeDiffVolumeAllowlist: undefined,

View File

@@ -367,6 +367,12 @@ export interface MergerSettings {
* hard-failing (blocking). Default: 3. The reviewer uses the project's
* validator/reviewer model lane — there is no merge-specific model setting. */
maxReviewPasses?: number;
/** Dangerous compatibility escape hatch for the AI merge landing path.
* When false (default), Fusion refuses to land an AI merge if the checked-out
* integration worktree is dirty. When true, restores the legacy stash →
* fast-forward → restore behavior for operators who explicitly accept that
* unrelated local edits can be reintroduced after landing. */
allowDirtyLocalCheckoutSync?: boolean;
}
export const AUTO_RECOVERY_MODES = ["off", "deterministic-only", "programmatic", "ai-assisted"] as const;