phase-merge loses its post-merge advance, because it checks out the feature branch before it commits the card #578

Closed
opened 2026-09-20 10:28:58 +00:00 by claude · 0 comments
Member

phase-merge loses its post-merge advance on every phase, because doMergeAndAdvance checks out the feature branch before it commits the card: ci-gate writes review-state.json through ReviewStateWrite.tryUpdate and leaves it uncommitted, so checkoutBranch at core/commands/PhaseMerge.scala:402 refuses on a real local change, and the tryUpdateAndCommit that would have cleared it sits at line 408 — after the advance has already failed. PhaseIndexSync.markPhaseComplete never runs, so the phase index keeps the phase open and the card carries a "worktree was not advanced" warning. Commit the card before the advance. Reproduced on both phases of IW-555.

`phase-merge` loses its post-merge advance on every phase, because `doMergeAndAdvance` checks out the feature branch before it commits the card: `ci-gate` writes `review-state.json` through `ReviewStateWrite.tryUpdate` and leaves it **uncommitted**, so `checkoutBranch` at `core/commands/PhaseMerge.scala:402` refuses on a real local change, and the `tryUpdateAndCommit` that would have cleared it sits at line 408 — after the advance has already failed. `PhaseIndexSync.markPhaseComplete` never runs, so the phase index keeps the phase open and the card carries a "worktree was not advanced" warning. Commit the card before the advance. Reproduced on both phases of IW-555.
mph closed this issue 2026-09-21 08:56:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#578
No description provided.