phase-pr pushes a card-only commit after a red verdict, so a false red leaves a green head under a ci_failed card #592

Closed
opened 2026-09-21 14:50:30 +00:00 by claude · 1 comment
Member

Found during IW-491 (phase 2 left it out of scope).

After a red verdict, PhasePr.stop (core/commands/PhasePr.scala:535-558) calls persist, which commits and pushes the card. That push makes a new head, and CI runs again on it. When the red was false (a flaky job), the new head goes green, but the card still says ci_failed. Seen on IW-583, run 890.

IW-491 phase 2 already removed the same push from the green path: after green, phase-pr writes the card to disk and does not commit or push it.

PROPOSED FIX. Do the same on the red and stop path: write the card, do not push it. Check first that batch-implement and phase-merge still read a dirty ci_failed card correctly.

Found during IW-491 (phase 2 left it out of scope). After a red verdict, `PhasePr.stop` (`core/commands/PhasePr.scala:535-558`) calls `persist`, which commits and pushes the card. That push makes a new head, and CI runs again on it. When the red was false (a flaky job), the new head goes green, but the card still says `ci_failed`. Seen on IW-583, run 890. IW-491 phase 2 already removed the same push from the green path: after green, `phase-pr` writes the card to disk and does not commit or push it. PROPOSED FIX. Do the same on the red and stop path: write the card, do not push it. Check first that `batch-implement` and `phase-merge` still read a dirty `ci_failed` card correctly.
Author
Member

Closed as a duplicate of #601, which takes this defect and three others as one investigation on one branch. This one is phase 2 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.

Closed as a duplicate of #601, which takes this defect and three others as one investigation on one branch. This one is phase 2 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#592
No description provided.