Repository navigation
fix(pr-pipeline): start fresh instead of resuming a stale lane branch with no pull request - #9463
Conversation
… with no pull request findPrior resumed a stopped run's lane branch whatever its distance from main, so a re-admitted issue continued a branch 865 commits behind and the runner's whole-branch checks failed over the stale base. A resume now needs the branch to be zero commits behind the default branch, read from the behind_by of the compare call find-prior already makes. A branch behind it starts fresh from the default tip under a new lane branch; the old branch is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address the ready-phase review: fail the issue-prior step on a compare answer with no whole-number behind_by, as for ahead_by; log one line for a stale branch instead of two that contradict; word the outcome comments so a restart continues from the branch only while it is not behind the default branch; update the issue-prior contract doc; add the changes fragment; list funding among the resumable outcomes in the workflow comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed I found no security issues in this pull request, so there are no inline comments and no hold. What changed: A resume from an earlier run's lane branch now needs Why it is not a finding:
critical-findings: 0 |
|
claude-review reviewed No blocking or advisory findings on head f731abf. I read
One tradeoff the author already states: resuming now needs zero commits behind, so on a fast-moving default branch most stopped or turn-cap restarts will start fresh and drop their partial work. That is a design choice, not a defect. |
No related issue: lane stop F23 (Issue Triage), run 39979677366
Summary
Issue #7152 was re-admitted and work-resolve-issue resumed
work-resolve-issue/issue-7152-39105891323-1, a branch from an earlier stopped run that was 1 commit ahead of main and 865 behind (run 39979677366). The model committed nothing new, the runner's whole-branch check (check-changelog-fragments.sh --check) failed over the stale base, and the issue went to needs-human with no PR. A resume now requires the branch to be zero commits behind the default branch. A stale branch starts fresh from main instead.Fix
findPriorreturnsrun(with astalenote naming the branch and its behind count) instead ofresumewhen the marked run's branch is behind the default branch. The model then works from the trusted default tip, and the apply job writes a newissue-<n>-<run>-<attempt>branch. The old branch is left in place; nothing deletes it.findPriorMainreadsbehind_byfrom theGET /comparecall it already makes for each lane branch, so the change adds no API reads. Abehind_bythat is not a whole number fails the step, the same wayahead_bydoes.issue-priorcontract indocs/conventions/pr-pipeline/pr-run-activity.mdand apr-pipelinechanges fragment are updated to match.findPrioralready stops the run when one is open, and pr-unblock's resolve-conflicts path merges main into PR branches. No new write power, and the runner's whole-branch check is unchanged.Verification
node --test .github/scripts/work-resolve-issue/*.test.mjs: 257 pass, 0 fail. New tests cover: a stopped run's branch behind main (1, 865) starts fresh; a malformedbehind_byfails the step; an open lanes-App PR on a behind branch still stops; a later re-admission does not fall back to the stale branch;--find-prioremits no resume outputs for a behind branch. Existing tests still cover a fresh issue and a resume at distance 0.actionlintonpr-run-activity-read.yml: clean.scripts/check-changelog-fragments.sh --check: valid.scripts/check-affected.sh --tests: 10 passed, 4 skipped.Related
N/A
🤖 Generated with Claude Code