-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
When default-workflow is re-run after a partial failure, step-04-setup-worktree can fail hard if the derived branch already exists locally or remotely.
Reproduction
In a rerun of default-workflow for qa-team remediation, Step 4 failed with:
fatal: a branch named 'feat/issue-3-recipevartaskdescription' already exists
After removing the local worktree/branch and rerunning, Step 4 failed again on push with:
! [rejected] feat/issue-3-recipevartaskdescription -> feat/issue-3-recipevartaskdescription (non-fast-forward)
Expected
- The workflow should handle reruns safely.
- If a branch/worktree already exists, it should either reuse it intentionally, clean it up safely, or generate a unique recovery branch name.
- Remote push conflicts should be handled explicitly rather than aborting the whole workflow.
Actual
- A stale local branch/worktree or remote branch causes Step 4 to fail before any remediation work can proceed.
Suggested Fix
- Detect existing local worktrees/branches before
git worktree add -b .... - Detect existing remote branch before push.
- Add an explicit rerun/recovery path (reuse existing branch, or generate a unique suffix).
- Surface the recovery decision in recipe output.
Impact
- Recipe reruns are brittle
- Failed runs leave behind state that blocks subsequent runs
- Users have to do manual git cleanup outside the workflow to continue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working