Repository navigation
fix(work-resolve-issue): skip an issue an open pull request already closes - #10726
Conversation
…loses The earlier-work check (report-outcome --find-prior) already stops on a trusted open closing PR, but it runs before the model. A closing reference that lands while the model runs is missed: PR 10686 gained a closing reference to issue 10694 at 17:13, after the check read none at 17:11, and the lane opened PR 10698 at 17:19. report-outcome now reads the open closing PRs again just before it opens a PR and stops closed-by-open-pr (route retry) when one closes the issue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lve-issue-skip-open-pr
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 Incremental security review of The change only moves
The trust rule is unchanged, so no trust control is widened. I did not re-review the other four files in the PR. They are unchanged since 943b162 and were reviewed then. Spend: none. This change only adds an existing-style GraphQL read. critical-findings: 0 |
|
claude-review reviewed Incremental review of The trusted-path match on this file alone is not a hold. This change spends no billed resources. |
…ndPrior trustedCloser sat between findPrior's contract comment and the function, so the comment read as trustedCloser's. Move trustedCloser above it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lve-issue-skip-open-pr
No related issue: lane duplicate work, #10698 built for #10694 while #10686 already closed it
Summary
The issue lane opened a second PR for an issue that an open PR already closed. The earlier-work check (
report-outcome.mjs --find-prior) already queries the issue's open closing PRs and stops the lane on one a listed human or the lanes App opened, but it runs only before the model. In run 40732936415 it logged "no earlier run ... the model runs" at 17:11:21Z. #10686 gained its closing reference at 17:13:25Z, and the lane opened #10698 at 17:19:30Z. That second PR also ran the review lanes and pr-verify.Fix
report-outcome.mjsreads the issue's open closing PRs again just before it opens a PR (adonerun's or a reuse's). It skips this read when the lanes App already has a PR open from the branch, which happens when the report is rerun. One GraphQL call:closedByPullRequestsReferences(includeClosedPrs: false), which GitHub's GraphQL reference describes as "List of open pull requests referenced from this issue".--find-prior: only a PR the lanes App or a listed human opened counts, so an outsider's closing reference cannot stop the lane. The rule is now one shared function,trustedCloser. When such a PR exists, the script opens nothing, logs that PR's number, and stops on the new reasonclosed-by-open-pr. That reason routes toretryinstop-routes.json, the same route aspr-head-moved, also a race.agent-readystays on, and while that PR is open the next run stops in--find-priorbefore any model turn.main's catch and opens no PR, as the script's other required reads already do.Verification
node --testin.github/scripts/work-resolve-issue: 371 passed, 0 failed. Against the basereport-outcome.mjs, 2 of the new tests fail: a listed human's open closing PR still opened a PR, and an unreadable closing list still opened one.python3 plugins/source-control/skills/babysit-prs/scripts/tests/test_merge_holds_sync.py: 14 tests OK.scripts/check-changelog-fragments.sh --checkandscripts/check-comment-hygiene.shpass.open-prbranch.Related
pr-pipeline.schema.jsonis unchanged: it has no enum of stop names, and itsskip-reasonenum is for the read runner's skip, which this path does not use.🤖 Generated with Claude Code