IW-578: phase-merge commits the review-state card before the merge, so the post-merge advance completes #587
No reviewers
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli!587
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-578"
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?
Summary
iw phase-mergemerged the pull request on the forge, then rangit checkout <feature>while the review-state card was still uncommitted.ci-gate's heartbeat and hand-over write the card with no commit. Git refused the checkout, because the card blob on the phase branch differs from the one on the feature branch. The worktree stayed on the dead phase branch,tasks.mdkept the phase open, the card carried a "worktree was not advanced" warning, and the command exited 1. This happened on both phases of IW-555.Defect fixed
PhaseMerge.doMergeAndAdvancenow commits the card (ReviewStateWrite.tryCommit) immediately before the merge. This is the same orderPhasePr.doBatchMergealready uses. ThePhaseMergedCardwrite stays after the advance, on the feature branch.Testing
PhaseMergeHarnessTest: the heartbeat path, the state-only path afterci-gate, and "no uncommitted card write when the merge starts".FakeCommandEnv:FakeGitcan now refuse a checkout while a card write is uncommitted (opt-in), so a harness test can see this defect.test/phase-merge.batswith real git: one committed and one uncommitted card change on the phase branch. Before the fix it failed with the IW-555 message.Follow-ups filed
#583, #584, #585, #586.
Release notes
See
project-management/issues/IW-578/release-notes.md(Czech).🤖 Generated with Claude Code
Closes #578