Phase 4: Worktree and phase lifecycle declare #502
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli!502
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-463-phase-04"
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?
Phase 04 implementation for IW-463.
Files
Browse changed files: https://code.iterative.works/iterative-works/iw-cli/-/blob/IW-463-phase-04/
Declares the three phase commands. phase-advance: both flags Args.resolved from the branch, per the context's worked recipe. phase-commit: --title required, --items/--issue-id/--phase-number Args.resolved; the inline usage string goes. phase-merge composes the Step 2 shared Args[CiGateConfig] plus --max-retries (validated with PhaseMergeArgs.parseMaxRetries), --issue-id and --phase-number; CiGateArgs.parseConfig is no longer called from this file. Declares exit 3 (it reaches CommandResult.resume) and exit 1 naming --timeout in both meaning and caller action, matching PhasePr's exit 1 text for a spent budget. Adds FakeGit.getCurrentBranchCallList so a --help harness case can prove no git call was made. LESSONS: running a new --help/unknown-flag harness test against an unmigrated gated command (phase-merge, before this commit) can hang the JVM forever rather than fail an assertion, because FakeClock's sleep is a no-op and its now never advances without an explicit call — the poll loop spins with no exit condition. Two Mill daemon processes for this worktree were left in that spin state and had to be killed by PID; the daemon's own state directory (out/mill-daemon) was left corrupt afterward ("Worker wire broken") and had to be removed to let a fresh daemon start. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WehHdHp9MRKJkrhGFiKNxaRecorded at the moment found while sweeping the repo for start's --effort/<issue-id> callers: test/help-intercept.bats:207 escaped a literal "iw start" search because the binary name is quoted separately from the subcommand ("$PROJECT_ROOT/iw" start), which is this project's own BATS idiom throughout. The stale assertion only surfaced when ./iw ./test ran the BATS suite, not from ./iw ./test unit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WehHdHp9MRKJkrhGFiKNxa