IW-566: phase-pr --no-wait — open the pull request, leave the CI wait to the caller #571
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!571
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-566"
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-prcan now open a pull request and stop, leaving the CI wait to the caller. The switchis
--no-wait.The wait was previously inseparable from the command:
--batchchose what happens after green,and the timeout flags only sized the wait. That is right when a human is driving. It is wrong for
an unattended phase, where the model's own wall-clock budget is spent inside
sleep 30while theorchestrator — which already owns a CI wait it never reaches — sits idle. Measured on IW-555:
17.3 minutes of a 90-minute session, and the session was killed with the phase unfinished.
No waiting logic was added.
iw ci-gateis already a first-class wait with the same three exitcodes and the same three flags; what this removes is an assumption about who runs it.
Changes
core/commands/PhasePr.scala--no-waitswitch in the declaration, carried throughPhasePrOptionsandResolved.--batch --no-waitrefused inrun, naming both flags, exit 1, before any push or pullrequest — the two do not compose, since
--batchmerges on the green it was told not to waitfor.
handOffWait: the terminal path. Card atci_pendingwithci_wait_startedcleared,then commit, print the same JSON, exit 0.
reportOpenPullRequest: the commit-and-report tail, previously stated twice.does, the exit 0/1/3 wording, and an example of the unattended pair.core/test/PhasePrHarnessTest.scala— 7 tests, one per acceptance criterion (111 added,0 removed).
Behaviour that did not change
Without the flag,
phase-prbehaves exactly as before. The 53 pre-existing harness tests passunmodified — the test file's diff is 111 added / 0 removed, which was the acceptance criterion
for this. When CI is not expected,
--no-waitstill hands over toawaiting_review, since aci_pendingcard would announce a wait nothing will answer.Testing
--no-waitadds no process boundary, sotest/phase-pr.batsstaysthe one-round-trip smoke test.
No reviewer found a correctness defect.
Known red, not caused by this branch:
./iw ./testdoes not exit 0 here and did not beforeeither —
test/start.bats"the tmux session does not carry iw's internal plumbing" failsidentically on a clean worktree at
f3a938bc, which contains none of this code. Tracked as #556.This does not yet deliver the measured saving
The flag alone moves nothing. The
wf-implementation-workflowskill still runsphase-mergein-session, and
phase-mergeruns its own CI gate — so the sleep would simply move from onecommand to the other. That companion change lives in the kanon plugin repository. Do not report
the 17.3-minute saving as delivered until it ships.
Follow-ups filed
#568 (duplicated
ci_pendingcard shape), #569 (batch/noWaitas two guarded Booleans),#570 (lint gate runs scalafix but not scalafmt).
Release notes
project-management/issues/IW-566/release-notes.md(Czech).Review
Start at
project-management/issues/IW-566/review-packet.md— entry points, scenarios and thetest summary.
Closes #566
🤖 Generated with Claude Code
Issue: IW-566 Phase: 1 - `--no-wait` end to end — options, conflict guard, card state, help This commit marks the checkpoint for phase 1 context generation. Use wf-implement IW-566 to return to this point. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>`--no-wait` end to end — options, conflict guard, card state, help Artifacts: - phase-01-tasks.md 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>--no-waitend to end — options, conflict guard, card state, help--no-waitend to end — options, conflict guard, card state, help' (#567) from IW-566-phase-01 into IW-566 31383a86f1