IW-491: phase-pr pushes a commit after reading CI, so its green can describe a stale head #596
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!596
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-491"
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
The CI gate in
phase-pr,phase-mergeandci-gatenow judges the commit that is the pull request head.Defects fixed
Phase 1 — the wait budgets were measured from a head that was gone (false red). The card has a new root field
ci_wait_sha, the head that a wait measures.CiGate.pollseeds the wait from it. When the pull request head is not the recorded head, both budgets (run appearance and--timeout) start again.ci_wait_startedandci_wait_shaare written and cleared together. Before this fix, a resumedphase-pr, aphase-mergerecovery retry or aci-gateafter a manual push could read "CI did not run" and stop a batch with no retry. (PR #590)Phase 2 — the Green path committed and pushed the card after the verdict (false green). After a green verdict,
phase-prwrites the card to disk. It does not commit or push it.ci_gated_shais now the pull request head when the command exits. (PR #591)Testing
CiGateHarnessTest,PhasePrHarnessTest,PhaseMergeHarnessTestandCiGateCommandHarnessTestreproduce each defect: a recovery push late in a wait, a resumed wait 61 minutes after the stamp (the IW-583 gap), and no commit or push after green.CiGateTest,ReviewStateUpdaterTest,ReviewStateValidatorTestandReviewStateSchemaTestcover the new card field.Follow-ups filed
iw-cli #592, #593, #594, #595; dev-docs #317 (the
review-state-schemaskill entry forci_wait_sha). Comments added to #585 and #586.Release notes
See
project-management/issues/IW-491/release-notes.md(Czech).🤖 Generated with Claude Code
Closes #491