IW-583: phase-advance commits the review-state card before it checks out the feature branch #589

Merged
mph merged 14 commits from IW-583 into main 2026-09-21 11:20:13 +00:00
Member

Summary

iw phase-advance ran git checkout <feature> before it committed the review-state card. A card left uncommitted by a gate (phase-merge timeout or CI failure, a paused phase-pr/phase-merge wait, iw ci-gate) made git refuse the checkout, so phase-advance exited 1 after a manual merge and did nothing. Same root cause as IW-578, which fixed only phase-merge.

Defects fixed

  • Phase 1 — A dirty review-state card blocks the checkout in phase-advance (#588). PhaseAdvance.doAdvance now commits the card before the checkout, only on the phase branch and only after checkMerged passes. Both card commits share one commit message.

Testing

  • PhaseAdvanceHarnessTest: a dirty card no longer blocks the checkout (failed before the fix); no commit when the PR is not merged; a dirty user file still refuses the checkout.
  • test/phase-advance.bats: real git, bare origin — an uncommitted card still lets phase-advance check out the feature branch.
  • CI passed on the phase PR.

Follow-ups

  • The premature "CI did not run" verdict seen in this issue is filed as a comment on #485 (same missing grace window).

Release notes

Příkaz iw phase-advance nyní spolehlivě převede práci zpět na hlavní větev úkolu i v situaci, kdy po předchozím kroku zůstal v pracovní kopii neuložený stavový záznam fáze. Uživatel tak po ručním sloučení pull requestu už nemusí nic opravovat ručně. Příkaz stavový záznam uloží sám, až poté, co ověří, že pull request fáze je sloučen; ostatní neuložené soubory zůstávají chráněny jako dříve.

Full notes: project-management/issues/IW-583/release-notes.md

🤖 Generated with Claude Code

Closes #583

## Summary `iw phase-advance` ran `git checkout <feature>` before it committed the review-state card. A card left uncommitted by a gate (`phase-merge` timeout or CI failure, a paused `phase-pr`/`phase-merge` wait, `iw ci-gate`) made git refuse the checkout, so `phase-advance` exited 1 after a manual merge and did nothing. Same root cause as IW-578, which fixed only `phase-merge`. ## Defects fixed - **Phase 1 — A dirty review-state card blocks the checkout in `phase-advance`** (#588). `PhaseAdvance.doAdvance` now commits the card before the checkout, only on the phase branch and only after `checkMerged` passes. Both card commits share one commit message. ## Testing - `PhaseAdvanceHarnessTest`: a dirty card no longer blocks the checkout (failed before the fix); no commit when the PR is not merged; a dirty user file still refuses the checkout. - `test/phase-advance.bats`: real git, bare origin — an uncommitted card still lets `phase-advance` check out the feature branch. - CI passed on the phase PR. ## Follow-ups - The premature "CI did not run" verdict seen in this issue is filed as a comment on #485 (same missing grace window). ## Release notes Příkaz `iw phase-advance` nyní spolehlivě převede práci zpět na hlavní větev úkolu i v situaci, kdy po předchozím kroku zůstal v pracovní kopii neuložený stavový záznam fáze. Uživatel tak po ručním sloučení pull requestu už nemusí nic opravovat ručně. Příkaz stavový záznam uloží sám, až poté, co ověří, že pull request fáze je sloučen; ostatní neuložené soubory zůstávají chráněny jako dříve. Full notes: `project-management/issues/IW-583/release-notes.md` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Closes #583
phase-advance checks out the feature branch before it commits the card

Artifacts:
- analysis.md

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
phase-advance checks out the feature branch before it commits the card

Artifacts:
- tasks.md
- review-state.json (tasks_ready)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Issue: IW-583
Phase: 1 - A dirty review-state card blocks the checkout in phase-advance

This commit marks the checkpoint for phase 1 context generation.
Use dx-fix IW-583 to return to this point.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A dirty review-state card blocks the checkout in phase-advance

Artifacts:
- phase-01-tasks.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs(IW-583): add release notes
Some checks failed
CI / changes (pull_request) Successful in 3s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
CI / compile (pull_request) Has been cancelled
cc16c2db5e
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
chore(IW-583): update review-state to all_complete
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 12s
CI / compile (pull_request) Successful in 1m38s
CI / dashboard-build (pull_request) Successful in 1m14s
CI / test (pull_request) Successful in 15m34s
ef2c702805
mph merged commit 1ab9178765 into main 2026-09-21 11:20:13 +00:00
Sign in to join this conversation.
No description provided.