FN-5783: enforce branch-group autoMerge precedence for shared promotions
Honor group-level autoMerge precedence when promoting shared branch groups. - add core/store helpers to preserve branch-group autoMerge overrides and resolve effective precedence against task/project settings - gate branch-group promotion eligibility in engine merge coordination and emit promotion-gated audit metadata - update dashboard planning/subtask flows for shared mission triage routing and add reliability/unit coverage - include docs and changeset updates for branch-group autoMerge precedence behavior Files changed: .../fn-5783-branch-group-automerge-precedence.md | 5 + AGENTS.md | 1 + docs/settings-reference.md | 2 +- docs/workflow-steps.md | 2 + .../core/src/__tests__/branch-group-store.test.ts | 18 ++++ packages/core/src/__tests__/task-merge.test.ts | 18 ++++ packages/core/src/index.ts | 1 + packages/core/src/mission-store.ts | 13 +++ packages/core/src/store.ts | 17 ++++ packages/core/src/task-merge.ts | 8 ++ .../dashboard/src/__tests__/mission-e2e.test.ts | 98 ++++++++++++++++-- .../src/__tests__/routes-planning.test.ts | 109 ++++++++++++++++++++- packages/dashboard/src/planning.ts | 1 + .../src/routes/register-planning-subtask-routes.ts | 28 ++++++ packages/dashboard/src/subtask-breakdown.ts | 1 + .../branch-group-automerge-precedence.test.ts | 102 +++++++++++++++++++ packages/engine/src/group-merge-coordinator.ts | 31 +++++- packages/engine/src/merger.ts | 30 ++++-- 18 files changed, 466 insertions(+), 19 deletions(-) Fusion-Task-Id: FN-5783 Fusion-Task-Lineage: 74327984-b14f-445c-81cd-5295ee562382
This commit is contained in:
@@ -199,7 +199,7 @@ Defaults from `DEFAULT_PROJECT_SETTINGS`; key scope from `PROJECT_SETTINGS_KEYS`
|
||||
| `groupOverlappingFiles` | `boolean` | `true` | Serialize execution when file scopes overlap. |
|
||||
| `pluginTrustPolicy` | `"off" | "warn" | "enforce"` | `"warn"` | Plugin provenance enforcement mode: `off` records verification metadata only, `warn` blocks only `invalid` signatures, `enforce` allows only `verified-trusted` or `trusted-local`. |
|
||||
| `overlapIgnorePaths` | `string[]` | `[]` | Optional project-relative file or directory paths to exclude from overlap blocking (for example `docs` or `generated/openapi.json`). Entries are trimmed, deduplicated, and must not be absolute or contain `..` traversal. |
|
||||
| `autoMerge` | `boolean` | `true` | Auto-finalize tasks from `in-review`. Tasks can override this per-task (including at create time in New Task modal via **Auto-merge** = Default/Enabled/Disabled). |
|
||||
| `autoMerge` | `boolean` | `true` | Auto-finalize tasks from `in-review`. Tasks can override this per-task (including at create time in New Task modal via **Auto-merge** = Default/Enabled/Disabled). For grouped branch flows, per-task `autoMerge` governs member→group-integration landing while group `autoMerge` governs group→default-branch promotion eligibility. |
|
||||
| `mergeRequestContractShadowEnabled` | `boolean` | `false` | Phase-1 FN-5741 write-only shadow flag (project/global setting). When enabled, executor/self-healing/merger persist merge-request records and `completion_handoff_accepted` markers for observation only; legacy mergeQueue + lifecycle remains authoritative. |
|
||||
| `mergeStrategy` | `"direct" \| "pull-request"` | `"direct"` | Completion mode (local direct merge vs PR-first). |
|
||||
| `directMergeCommitStrategy` | `"auto" \| "always-squash" \| "always-rebase"` | `"always-squash"` | Direct-merge commit routing mode. `always-squash` (default) forces the legacy squash path. `auto` keeps the legacy squash path for branches with zero or one substantive commit, but switches multi-substantive direct merges to a history-preserving rebase-and-merge/cherry-pick path so commit boundaries, subjects, and `Fusion-Task-Id` trailers survive on `main`. `always-rebase` always preserves per-commit history. Only applies when `mergeStrategy="direct"`. |
|
||||
|
||||
@@ -44,6 +44,8 @@ Built-in coding IR currently encodes the legacy lifecycle path as graph stages:
|
||||
|
||||
Interpreter authority is gated on parity: interpreter-driven coding runs must match legacy behavior for observable task transitions and reliability invariants (file-scope guards including `FileScopeViolationError`, squash/merge contract, self-healing expectations, `autoMerge:false` terminal-until-merged, and `moveTask(in-progress→todo)` hard-cancel semantics).
|
||||
|
||||
For grouped branch flows (`branch_groups`), auto-merge precedence is split: per-task `autoMerge` controls member→group-integration landing, while group `autoMerge` controls group→default-branch promotion eligibility.
|
||||
|
||||
#### IR-gap reconciliation (v1)
|
||||
|
||||
The workflow redesign brief references `agent-call` nodes and typed edges (`success|failure|conditional|fan-out-join`), but shipped v1 IR only supports node kinds `start|prompt|script|gate|end` plus optional string edge `condition`.
|
||||
|
||||
Reference in New Issue
Block a user