Skip to content

Slice-DAG: dependent slices branch off frozen work base (not stacked / not integrated-forward) -> modify/delete merge conflicts at integration #3046

Closed

Description

@jwbron

Summary

In a slice-DAG implement phase, dependent slices are branched independently off the same frozen work base instead of being stacked along the dependency edges (or integrated forward into work between slices). When dependent slices touch overlapping files, this guarantees merge conflicts at integration time — including unavoidable modify/delete conflicts. Observed on #3023.

Evidence (#3023, 3 dependent slices)

All three slice branches share the same merge-base (40113b112, the work base) and none is an ancestor of another:

git merge-base --is-ancestor slice-1 slice-2  -> false
git merge-base --is-ancestor slice-2 slice-3  -> false
git merge-base --is-ancestor slice-1 slice-3  -> false
# merge-base(work, slice-N) == 40113b112 for all N

They edit overlapping files, so merging them into work conflicts. A virtual merge of slice-1 + slice-3:

$ git merge-tree --write-tree --messages slice-1 slice-3   # exit 1
CONFLICT (modify/delete): orchestrator/consensus_wrapper.py deleted in slice-3 and modified in slice-1
CONFLICT (modify/delete): orchestrator/tests/test_consensus_wrapper.py deleted in slice-3 and modified in slice-1
Auto-merging orchestrator/concurrent_executor.py
Auto-merging orchestrator/routes/pipelines.py

slice-1 adds its TASK-1-3 coexistence guard inside consensus_wrapper.py; slice-3 deletes consensus_wrapper.py. Branched independently off the same base, these collide. (slice-2a is disjoint, so it's clean — the defect bites whenever two dependent slices share files.)

Root cause

The scheduler runs dependent slices sequentially (correct ordering per the DAG) but:

  1. cuts each slice branch from the original work base, and
  2. never integrates a completed slice into work before its dependent successor branches/runs.

So the git topology never reflects the DAG dependency — successors never build on predecessors. For overlapping dependent slices, integration conflicts are then guaranteed, and the operator/work→main PR inherits them.

Either fix resolves it

  • (a) Stack along DAG edges — branch slice-N from its predecessor's tip (per the dependency DAG) rather than from work. PRs chain: work ← slice-1 ← slice-3.
  • (b) Integrate-forward — merge each completed slice into work before its dependent successor branches, so the successor is cut from a work that already contains its predecessors.

Independence matters: only slices with disjoint file sets are safe to branch off the shared base in parallel; dependent/overlapping slices must be stacked or integrated-forward.

Notes

Found while landing #3023.

Activity

  1. added
    bug
    on Jun 9, 2026
  2. added 11 commits that reference this issue on Jun 25, 2026
  3. added 4 commits that reference this issue on Jul 6, 2026
    c6f6b35
    7a54494
    2a5ed00
    56a9460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions