mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-25 07:05:57 +03:00
[GH-ISSUE #143] Parallel mode: merge conflicts leave orphaned branches and unmerged work #55
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DBULL7 on GitHub (Jan 31, 2026).
Original GitHub issue: https://github.com/mikeyobrien/ralph-orchestrator/issues/143
Summary
When running
ralph parallel, merge conflicts during the squash-merge phase leave the orchestrator in a broken state with orphaned branches and unmerged work. This has been a recurring issue since parallel mode was introduced.Environment
Bugs Identified
1. Merge conflict handling marks phase as success despite failure
When there are local uncommitted changes that conflict with a phase's squash merge, the error occurs but the phase is still marked as
success=True:This leaves valuable work stranded in worktree branches that never get merged.
2. Nested worktrees accumulate and don't get cleaned up
When phases spawn sub-phases (e.g.,
core_models→player_coach_models→coach_model), worktrees nest 3+ levels deep:When
cleanup_on_failure=False, these never get cleaned and accumulate across runs.3. Branch accumulation across multiple runs
Each failed run leaves behind all its
_ralph-internal/*branches. After 3-4 failed runs, there can be 15+ orphaned branches making manual recovery difficult.4. Unmerged work warning comes too late
The warning about unmerged branches appears in stderr after the phase is already marked failed:
But by this point the orchestrator has already moved on or terminated.
Reproduction
ralph parallelrun with nested phasesExpected Behavior
success=Falsecleanup_on_failure=Trueshould actually clean up nested worktreesralph cleanupcommand (or similar) to nuke all_ralph-internal/*branches and worktrees in one goSuggested Fixes
ralph cleanup --allto remove all internal branches/worktreesralph recoverto find unmerged branches and offer to cherry-pick themWorkaround
Manual recovery (what I had to do):
This is tedious and error-prone. Would love a built-in solution.
Happy to provide more logs or help test fixes. This is blocking productive use of parallel mode.