phase-merge's state-only path merges a head whose CI is still Running #593
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#593
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?
Found during IW-491.
When only
review-state.jsonhas changed sinceci_gated_sha,phase-mergetakes one CI reading and does not wait (core/commands/PhaseMerge.scala:187-196). ARunningreading is accepted, so the merge can land a head whose own run has not finished. Commit9d577408made this trade on purpose: the changed head differs from the gated head only in the card.The trade is weaker than it looks. The run on the new head can still fail (a flaky job, a CI change on main), and nothing records that the merged head was never judged.
PROPOSED FIX. Decide explicitly. Either wait for a terminal verdict on the state-only path too, or keep the trade and write on the merged card that the merged head was not judged.
Closed as a duplicate of #601, which takes this defect and three others as one investigation on one branch. This one is phase 4 there.
The four share a cause: the card and the CI reading do not agree on which head they speak about. Fixing them apart would read the same code four times.