Repository navigation
Description
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:
- cuts each slice branch from the original
workbase, and - never integrates a completed slice into
workbefore 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
workbefore its dependent successor branches, so the successor is cut from aworkthat 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
- Distinct from Slice-DAG PR opener: wrong PR topology — phases collapsed into one /work PR instead of three per-phase PRs #2680 (slice-DAG PR topology — different bugs: temp-worktree
/tmppath, omnibus PR in slice mode). - Surfaced because Orchestrator-driven on-demand agent spawning: lift the event pump out of the pod so idle agents don't exist #3023's implement phase deadlocked (Post-BRC event-pump deadlock: confirmed slice never closes (containers won't exit); no self-heal; advance_phase(force=true) trips #2806 + re-entry thrash #3043) and the slices were landed as manual PRs ([issue-3023][slice-1/3] Orchestrator-side phase-level idle-budget a... #3034/[issue-3023][slice-2a/3] derive_next_action in-process alias (prereq for on-demand spawner) #3037/[issue-3023][slice-3/3] Retire consensus_wrapper.py + entrypoint simplification #3044 → On-demand agent spawning: orchestrator-owned event loop, no idle pods (#3023) #3045), exposing the integration conflicts that an automated merge-to-
workwould also have hit.
Found while landing #3023.
Activity
fix(orchestrator): reject overlapping-but-unordered slices at plan in…
docs: update slice-DAG docs for overlap-violation error [doc-updater] (…
Validate slice DAG is a forest at plan propose time (#3211) (#3215)
plan(#3200): serialize slices into one dependency chain (#3046 file-o…
plan(#3200): v2 — build #3189 anchors + #3186 resume in-pipeline, Non…
plan(#3200): serialize slices into one dependency chain (#3046 file-o…
plan(#3200): v2 — build #3189 anchors + #3186 resume in-pipeline, Non…
plan(#3200): serialize slices into one dependency chain (#3046 file-o…
plan(#3200): v2 — build #3189 anchors + #3186 resume in-pipeline, Non…
plan(task_planner): serialize 19 slices into one linear dependency ch…
plan(simplifier): align companion with serialized linear-chain plan r…
plan(task_planner): serialize 19 slices into one linear dependency ch…
plan(simplifier): align companion with serialized linear-chain plan r…
refactor(shared): decompose egg_contracts/plan_parser into sub-packag…
refactor(shared): decompose egg_contracts/plan_parser into sub-packag…
task_planner: split PR D into its own slice-3; disambiguate per-slice…
task_planner: split PR D into its own slice-3; disambiguate per-slice…
task_planner: split PR D into its own slice-3; disambiguate per-slice…
task_planner: split PR D into its own slice-3; disambiguate per-slice…
task_planner: merge slices 1+2 into single slice (shared file overlap…
task_planner: restructure plan as linear slice chain for #3046 compli…