Contracts
branch-integration-conflict-contract.md
Branch Integration Conflict Contract
This contract defines the observable behavior of default squash integration and its dry-run forecast for ordinary source conflicts.
Execution
preference.
deterministic, repository-relative conflict paths.
and worktrees remain unchanged by the rejected integration.
- Default squash integration does not apply a repository-wide conflict-side
- A same-hunk conflict in ordinary source content returns failure and reports
- Failure occurs before the target ref advances or lifecycle cleanup begins.
- The target checkout, target ref, mission ref, work-package states, branches,
- Disjoint changes to the same ordinary file are combined losslessly.
Governed artifacts
the newer side wins, with the target winning equal-recency ties.
- Registered custom merge drivers remain authoritative for their paths.
- PRIMARY planning artifacts continue to use the existing history-aware policy:
- Those governed policies do not extend to ordinary source paths.
Dry-run
scoped to the current mission-branch tip: it forecasts conflicts already present on the mission branch against the target. It does NOT first consolidate the lane branches the way a real merge does, so a conflict that lives only in an un-consolidated lane commit is not visible to the forecast. The real merge still stops safely on it — the forecast is a readiness signal, not a completeness guarantee.
TARGET_BRANCH_CONTENT_CONFLICT and includes the mission branch, target branch, sorted conflict paths, and remediation guidance.
lifecycle completion, or clean up branches/worktrees.
- Squash dry-run exercises the same isolated integration primitive as execution,
- A predicted source conflict exits non-zero with
- Forecasting does not advance refs, change tracked checkout bytes, emit
- A clean JSON forecast preserves the established successful payload key set.
Compatibility
Explicit merge and rebase strategies are outside this change and retain their existing behavior.