Skip to content

Commit ebfeb3d

Browse files
committed
fix: stop evolution when review fails
Critical bug fix: evolve.sh was continuing to merge even when review phase failed with 'Issues found — merge blocked'. Now properly: - Exits with error code 1 when review fails - Does NOT merge if review blocked - Prevents auto-merge of rejected PRs This ensures the 6-phase evolution loop properly respects the review phase gate.
1 parent 093cc07 commit ebfeb3d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/evolution/evolve.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,17 @@ PR_NUMBER=$(gh pr list --repo "$GITHUB_REPO" --head "$BRANCH" --json number --jq
199199
log "Phase 4: Review..."
200200
sleep 5
201201
if ! ./iterate --phase review --gh-owner GrayCodeAI --gh-repo iterate 2>>"$LOG_FILE"; then
202-
log "WARNING: review phase exited with error — continuing"
202+
log "ERROR: review phase failed — blocking merge"
203+
log "Review found issues. Evolution stopped. Fix issues and retry."
204+
exit 1
203205
fi
204206

205207
# ── Phase 5: Merge ──
206208
log "Phase 5: Merge..."
207209
sleep 5
208210
if ! ./iterate --phase merge --gh-owner GrayCodeAI --gh-repo iterate 2>>"$LOG_FILE"; then
209-
log "WARNING: merge phase exited with error — continuing"
211+
log "ERROR: merge phase failed"
212+
exit 1
210213
fi
211214

212215
# ── Phase 6: Communication ──

0 commit comments

Comments
 (0)