phase-pr cannot open a pull request without also waiting for CI, so an unattended phase spends its own budget on sleep #566
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#566
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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-prpushes the sub-branch, opens the pull request, and then waits for CI. The wait is notseparable:
--batchdecides what happens after green (merge instead of stopping for review), notwhether to wait, and
--timeout/--poll-windowonly size the wait.For an interactive session that is right. The human is driving, one command carries the phase from
"commits are ready" to "CI proved it", and watching the result is the point.
For an unattended run it is the wrong owner.
./iw kanon/batch-implementgives each phase's Claudesession a wall-clock ceiling — 90 minutes by default — and the session spends its own budget doing
sleep 30. Measured on IW-555 on 2026-09-14: 17.3 minutes of a 90-minute session, twophase-prinvocations of 481 s each, and the session was killed by the ceiling with the phaseunfinished. The orchestrator was idle throughout, and it already owns a CI wait it never got to use
(
CiGate.awaitCiin the kanon plugin, which shells out toiw ci-gate).The model's clock is the scarce resource. The orchestrator's is not.
What is asked for
A way for the caller to open the pull request and take the wait itself. Proposal:
--no-wait.pr_url), so the followingci-gatefinds itwith no argument —
ci-gatealready reads "the pull request the review-state card alreadyrecords".
verdict.
Nothing else changes. The wait already exists as a first-class command with the same three exit
codes and the same three flags, so this adds no waiting logic — it removes an assumption about who
runs it.
Both modes must keep working
phase-prbehaves exactly asit does today: push, open, wait, and with
--batchmerge on green. No existing invocationchanges behaviour, and no workflow document needs editing for the interactive path.
runs
iw ci-gate, and on red it starts a fresh session with the failure report — the recoverypath
phase-mergealready ships a hook for.--batchand--no-waitdo not compose--batchmerges as soon as CI proves green, which requires the wait it was told to skip. Rejectingthe combination with a clear message is better than defining a winner: the unattended caller that
passes
--no-waitmerges withphase-mergeafterwards, which is the command for it and whichalready takes the one-CI-reading shortcut after a green gate.
Acceptance
iw phase-pr --title T --no-waitopens the request, writespr_urlto the card, and exits 0without polling the forge.
iw ci-gateimmediately afterwards, with no arguments, finds that pull request and waits on it.--no-waittogether with--batchis refused, naming both flags.phase-prwith no--no-waitis unchanged: the existing tests for the wait, its exit 3resumption and its
--batchmerge all still pass.--helpstates that the caller owns the wait when the flag is given, and namesci-gate.