Repository navigation
fix(pr-review-main): skip a re-review only on a verdict after the newest retarget - #17717
Conversation
…est retarget The check-trigger job's already-reviewed step called _main_bound with no cutoff, so a lane-source pull request retargeted without a push was judged on its pre-retarget verdict and skipped review, while the merge gate refused that verdict and held it as lane-source-changed. The step now reads the pull request's issue events once both lanes have a counted verdict, takes the newest base_ref_changed time through babysit_merge._retargeted_at, and passes it to _main_bound as `after`. An unreadable time, a full page of events or a failed read runs the review. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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-review reviewed Code review: no findingsThis PR changes the step "Find a head both lanes already reviewed" in Checked against the merge gate
Tests. The new cases (before, after and at the run's creation time; the newest of two retargets; no time; no zone; a full page; not a list; a failed events read) cover each branch the step adds. The call counts (9, then 10 with one retry) match the one added read. I did not run the tests. The author reports 54 of 54 passing; that is unverified. Docs and changelog. The README line and the Closing issue. The PR text says Loosened checks. The prompt gave no Spend. Runs that reach the verdict check make one more GitHub API read. Retargeted pull requests get extra review-lane runs, paid from prepaid credit. Neither is a billing change. Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #17717 (
|
Refs: #15410
Summary
pr-review-main.yml's check-trigger step "Find a head both lanes already reviewed" calledev._main_bound(lane, head, records, context)with no cutoff. Since #17703 the merge gate binds a lane-source pull request's main-run verdict only from a run created after the newestbase_ref_changedevent. So after a retarget with no push, this step reportedjudged=trueon the pre-retarget verdict and skipped the review, while the gate refused that same verdict: the pull request stayed held aslane-source-changed. This closes the gap #17703 listed under Known limits and Remaining.Fix
Design: the owner's Q116 A (decision row). Owner, verbatim: "go w/ recommendations and then /session-flow:handoff".
repos/{repo}/issues/{n}/events?per_page=100), takes the newest retarget withbabysit_merge._retargeted_at(the gate's own function, imported as is), parses it withbabysit_review_evidence._time, and passes it to_main_boundasafter.bind(): no retarget means no cutoff; a retarget with no readable time binds nothing, and the review runs.base_ref_changedsupported on issue events (issue event types: base_ref_changed), and it returns fewer items (9 against 21 on test(pr-merge): add stack run layer 3 line to case-c pr-pipeline-sandbox#400, with the samecreated_atfrom both). The job'spull-requests: readcovers it (permissions for Pull requests)..changes/pr-pipeline/fragment records the fix.Verification
node --test --test-concurrency=4 .github/scripts/pr-review-main/workflow.test.mjs: 54 of 54 pass. The judged-head test adds cases: a retarget before the run (judged), after it, at the run's creation time, the newest of two after it (not judged), a retarget with no time or no zone, a full page of events, events that are no list (not judged, a warning), and a failed events read (sent again; three failures leave no output and the review runs). Call counts move from 8 to 9 (one events read); the no-verdict and uncounted-verdict paths keep their counts (1 and 6).scripts/check-affected.shpasses.Related
Remaining
🤖 Generated with Claude Code