Parent: #54
Problem
During v1.1 phase 01 execution, plan branches 01-01, 01-02, 01-03 were never pushed to origin and never merged into the phase branch. Only 01-04 was pushed (because it was the last branch HEAD was on).
Root Cause
The per-plan push/merge loop (lines 395-448 of execute-phase.md) runs as a batch after ALL executors in a wave complete. If execution is interrupted (context limit, checkpoint, etc.), no plan branches get pushed or merged. The final push at step 10.5 (git push origin HEAD) only pushes whichever branch HEAD is currently on.
Evidence
origin/feature/v1.1-01-01 → a69ce5a (base, never updated)
origin/feature/v1.1-01-02 → a69ce5a (base, never updated)
origin/feature/v1.1-01-03 → a69ce5a (base, never updated)
origin/feature/v1.1-01-04 → 3cf67e6 (has work, pushed via git push origin HEAD)
local feature/v1.1-01-01 → bf219b2 (5 commits ahead)
local feature/v1.1-01-02 → f49c010 (7 commits ahead)
local feature/v1.1-01-03 → 6ba3539 (10 commits ahead)
Phase branch: still at 129ae08 (executor work never merged)
Changes (execute-phase.md)
2D. Fix 1 — Push each plan branch IMMEDIATELY after its executor completes
Move push from batch loop to right after each executor returns:
cd "$WORK_DIR" && git push origin "$PLAN_BRANCH" 2>/dev/null || git push -u origin "$PLAN_BRANCH" 2>/dev/null || true
2D. Fix 2 — Push ALL plan branches at step 10.5
Replace git push origin HEAD with a loop that pushes all known plan branches plus the phase branch.
2D. Fix 3 — Add push to offer_next routes
Even partial completions push to origin.
2E. Make merge loop resilient
After each wave's executors complete AND branches are pushed, merge into phase branch with explicit error handling. If merge fails → STOP (don't silently continue with a phase branch missing executor work).
cd "$WORK_DIR" && git checkout "$DESIGNATED_BRANCH"
for each completed plan branch:
MERGE_RESULT=$(git merge "$PLAN_BRANCH" --no-ff -m "merge: plan into phase" 2>&1)
if echo "$MERGE_RESULT" | grep -q "CONFLICT\|fatal"; then
# STOP — don't proceed with broken state
fi
done
git push origin "$DESIGNATED_BRANCH" || true
Files
.claude/commands/vit/execute-phase.md (zones 2D, 2E)
.claude/vit/workflows/execute-phase.md (push_to_remote step)
Parent: #54
Problem
During v1.1 phase 01 execution, plan branches 01-01, 01-02, 01-03 were never pushed to origin and never merged into the phase branch. Only 01-04 was pushed (because it was the last branch HEAD was on).
Root Cause
The per-plan push/merge loop (lines 395-448 of
execute-phase.md) runs as a batch after ALL executors in a wave complete. If execution is interrupted (context limit, checkpoint, etc.), no plan branches get pushed or merged. The final push at step 10.5 (git push origin HEAD) only pushes whichever branch HEAD is currently on.Evidence
Changes (execute-phase.md)
2D. Fix 1 — Push each plan branch IMMEDIATELY after its executor completes
Move push from batch loop to right after each executor returns:
2D. Fix 2 — Push ALL plan branches at step 10.5
Replace
git push origin HEADwith a loop that pushes all known plan branches plus the phase branch.2D. Fix 3 — Add push to offer_next routes
Even partial completions push to origin.
2E. Make merge loop resilient
After each wave's executors complete AND branches are pushed, merge into phase branch with explicit error handling. If merge fails → STOP (don't silently continue with a phase branch missing executor work).
Files
.claude/commands/vit/execute-phase.md(zones 2D, 2E).claude/vit/workflows/execute-phase.md(push_to_remote step)