IW-607: A resumed phase-pr judges the pushed head, not a stale one #692

Merged
mph merged 22 commits from IW-607 into main 2026-10-07 07:31:11 +00:00
Member

Summary

A resumed phase-pr pushes the branch onto a pull request that is already open and then gates CI at once. When the forge was slow to move the PR head to the pushed commit, the gate judged the old head: a stale red used up a recovery attempt, and a stale green handed over (or merged with --batch) a commit CI never judged.

Defects fixed

  • Phase 1 (#689): phase-pr reads the local HEAD after its push and passes it to the gate as CiGateTarget.expectedHead. The gate now waits while the forge reports another head (the existing IW-601 guard), and judges only the pushed commit. A HEAD that cannot be read leaves the gate as before (analysis decision D1).

Out of scope

  • kanon awaitCi has the same race. It needs a ci-gate option for the expected head — filed as #690.
  • A test gap on the red-report harvest path — filed as #691.

Testing

  • Regression tests in core/test/PhasePrHarnessTest.scala: stale red, stale green, a resume that pushed nothing new, a timeout while the forge keeps the old head, a first push, and an unreadable HEAD.
  • CI green on the phase PR (#689).

Release notes

See project-management/issues/IW-607/release-notes.md (Czech).

🤖 Generated with Claude Code

Closes #607

## Summary A resumed `phase-pr` pushes the branch onto a pull request that is already open and then gates CI at once. When the forge was slow to move the PR head to the pushed commit, the gate judged the old head: a stale red used up a recovery attempt, and a stale green handed over (or merged with `--batch`) a commit CI never judged. ## Defects fixed - **Phase 1 (#689):** `phase-pr` reads the local HEAD after its push and passes it to the gate as `CiGateTarget.expectedHead`. The gate now waits while the forge reports another head (the existing IW-601 guard), and judges only the pushed commit. A HEAD that cannot be read leaves the gate as before (analysis decision D1). ## Out of scope - kanon `awaitCi` has the same race. It needs a `ci-gate` option for the expected head — filed as #690. - A test gap on the red-report harvest path — filed as #691. ## Testing - Regression tests in `core/test/PhasePrHarnessTest.scala`: stale red, stale green, a resume that pushed nothing new, a timeout while the forge keeps the old head, a first push, and an unreadable HEAD. - CI green on the phase PR (#689). ## Release notes See `project-management/issues/IW-607/release-notes.md` (Czech). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Closes #607
phase-pr and kanon awaitCi can gate a stale head and use up a CI attempt

Artifacts:
- analysis.md
- issue.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
phase-pr and kanon awaitCi can gate a stale head and use up a CI attempt

Artifacts:
- tasks.md
- review-state.json (tasks_ready)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue: IW-607
Phase: 1 - A resumed phase-pr judges the head the forge held before its push

This commit marks the checkpoint for phase 1 context generation.
Use dx-fix IW-607 to return to this point.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A resumed phase-pr judges the head the forge held before its push

Artifacts:
- phase-01-tasks.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(IW-607): add release notes
Some checks failed
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
CI / lint (pull_request) Successful in 12s
CI / compile (pull_request) Has been cancelled
b479768366
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore(IW-607): update review-state to all_complete
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 12s
CI / compile (pull_request) Successful in 1m36s
CI / dashboard-build (pull_request) Successful in 1m15s
CI / test (pull_request) Successful in 15m36s
7f7b132f9c
mph requested changes 2026-10-06 21:18:12 +00:00
mph left a comment

We have conflicts.

We have conflicts.
docs(IW-607): rework for final PR review 16
All checks were successful
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 11s
CI / compile (pull_request) Successful in 1m41s
CI / dashboard-build (pull_request) Successful in 1m16s
CI / test (pull_request) Successful in 15m36s
a3f154cc0f
# Conflicts:
#	core/commands/PhasePr.scala
Issue: IW-607
Phase: 2 - Rework for final PR review 16

This commit marks the checkpoint for phase 2 context generation.
Use dx-fix IW-607 to return to this point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rework for final PR review 16

Artifacts:
- phase-02-tasks.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(IW-607): read the judged head from the forge's CI calls, not the card
Some checks failed
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
CI / changes (pull_request) Successful in 5s
CI / compile (pull_request) Has been cancelled
c490512408
IW-702 on main stopped every command from writing ci_gated_sha, so the
two stale-head tests that read it fail after the merge. They now assert
the head the gate read CI for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 2: Rework for final PR review 16 (#726)
Some checks failed
CI / format (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / compile (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
e90b50585c
chore(IW-607): mark phase 02 complete in tasks.md
All checks were successful
CI / changes (pull_request) Successful in 6s
CI / contract (pull_request) Has been skipped
CI / compile (pull_request) Successful in 1m38s
CI / format (pull_request) Successful in 10s
CI / dashboard-build (pull_request) Successful in 1m31s
CI / lint (pull_request) Successful in 12s
CI / test (pull_request) Successful in 18m17s
7279b59e3c
Author
Member

Implement: rework for review 16
The rework phase merged into IW-607 through #726; this pull request carries it.

Implement: rework for review 16 The rework phase merged into IW-607 through #726; this pull request carries it.
mph merged commit df28069261 into main 2026-10-07 07:31:11 +00:00
Sign in to join this conversation.
No description provided.