Repository navigation
fix(readiness): hold a fork PR into a non-default base for a maintainer - #24936
mbriones98 wants to merge 2 commits into
Conversation
Fast Gate only runs on PRs to the default branch, and every Stage-2 fork lane fires on Fast Gate completing, so a fork PR into a release branch gets no run of any of them. The evaluate step scored those lanes (not started) and read the supersession gate's empty answer as a read failure, so the verdict stayed at a [read-failed] pending the sweep re-fired a recompute for on every tick. Such a PR now gets a terminal failure, 'fork PR into a non-default base needs maintainer review', with no [read-failed] token, so the sweep no longer re-fires it on age. It never reaches passed: none of the fork scan or review coverage runs on it and nothing retargets it to the default branch later. A fork lane whose trigger never ran for the head is listed as skipped; a verdict a lane already posted while the base was the default branch is still read, a red one included. The supersession gate's answer is set aside only when it examined zero lanes and reported no other error; a real read failure or timeout still surfaces. Fixes #18530
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only touches [UX-REVIEWED] d813341 Description read[DESCRIPTION-READ] d76b6d6441b6fef787a443537cf2702af161cf8afa3ab203cb866fc5ff508e91 That sha256 names everything this verdict read: the PR description, plus the 43 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the hold is a final, named Notes
[DESIGN-REVIEWED] d813341 Description read[DESCRIPTION-READ] ec31a69f3d29cb0866d7f4878e4380a6a033ee1d33d5da11cea35f2c9f7e1ef1 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The hold fixes the cause of #18530's loop, at the same layer as the existing Notes
What this change shipsInventory (3 items) — 2 justifiedIntent: let an outside contributor's fork PR into a release branch reach a final, named readiness verdict instead of staying pending forever. FIX.
[FIRST-PRINCIPLES-REVIEWED] d813341 Description read[DESCRIPTION-READ] 6eb685bcf3588cab100103f91888f604f685d56ef93033370827081b9a9c5b1c That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
The fork-into-non-default-base hold is a blocker, and the blocker branch publishes `failure` before the pending branch reads read_failure, so the supersession step's no_lanes output never changed a verdict or the sweep's outcome. Remove it, its env var, and its tests. A fork PR into a release branch still ends in the terminal maintainer-hold status with no [read-failed] token; every other PR shape is evaluated as on main. State the workflow and test comments in present tense, and say that a PR GitHub retargets to the default branch is re-read as an ordinary fork PR. Guard the sweep test class on GNU date, as the sweep suite does.
|
Replaced by #25224, which carries this change as one commit off current main. |
Pull request was closed
Problem / Motivation
Goal: A fork PR into a release branch gets a final readiness verdict that names why it is held, instead of a pending verdict the sweep re-checks forever.
A fork PR whose base is a release branch kept
PR Readinessatpendingfor the life of its head, and the self-heal sweep re-dispatched a recompute every tick. #18441 got 17 identical publications in six and a half hours:[read-failed] 8 readiness check(s) still pending; waiting on Internal Content Scan (not started) (+7 more).Why it matters
An outside contributor backporting a fix to a release branch had no way to reach a final verdict, and each affected PR cost two wasted readiness runs per half hour. The only workaround so far was re-opening the PR from a same-repo branch, which needs push access.
Not a goal
fast-gate.yml). That is a separate decision; this PR changes no fork permission or token scope.What changed (motivation → approach → change)
This fixes the loop but keeps these PRs held for a maintainer.
Symptom → cause.
fast-gate.ymlonly runs on PRs tomain, and all seven Stage-2 fork lanes fire on Fast Gate completing, so on a fork PR into another base none of them ever runs.pr-readiness.ymlstill scored them(not started). The supersession gate then found no lane comment at all, and readiness stamped that as a read failure. The sweep re-fires any[read-failed]pending on age, and the recompute re-derived the same pending.Change. A fork PR into a non-default base now gets a final
failure:fork PR into a non-default base needs maintainer review. It never reachespassed: none of the fork scan or review coverage runs on it, and nothing retargets it tomainlater the way a stacked PR is. The sweep re-fires afailureonly when a check, review or comment lands after the verdict, never on age, so the loop stops.(not started)(only runs on PRs to main)main(red included)[read-failed]pending[read-failed]pendingfailure, named holdFork PRs into
mainand same-repo PRs into any base are unchanged.Backwards compatibility
Compatible: only fork PRs into a non-default base change, and they could never reach a verdict before.
Removes nothing: no lane, key or check is removed; lanes that cannot run on this base are listed as skipped, and the PR is held rather than passed.
Tests
test/test_pr_readiness_fork_base.pycovers the hold being final, named and free of[read-failed]; the PR not passing even with every lane green; a red lane and a lost reviewer block from before a base change still counting; a real supersession read failure still showing; the sweep not re-firing the hold, while it did re-fire the old pending; fork PRs intomainand same-repo release PRs being unchanged; and the "no lane examined" text matching the gate's own wording.Proof: PROVEN test/test_pr_readiness_fork_base.py::TestAForkPullRequestIntoANonDefaultBaseIsHeld::test_the_hold_is_terminal_named_and_not_a_read_failure, test/test_pr_readiness_fork_base.py::TestAForkPullRequestIntoANonDefaultBaseIsHeld::test_it_does_not_pass_even_with_every_lane_green, test/test_pr_readiness_fork_base.py::TestAForkPullRequestIntoANonDefaultBaseIsHeld::test_a_red_lane_posted_before_the_base_changed_is_kept, test/test_pr_readiness_fork_base.py::TestAForkPullRequestIntoANonDefaultBaseIsHeld::test_a_dropped_block_is_kept, test/test_pr_readiness_fork_base.py::TestAForkPullRequestIntoANonDefaultBaseIsHeld::test_a_real_supersession_read_failure_still_surfaces[read-failed] (head 88f964f)
The readiness, sweep, supersession and fork-workflow suites pass, and actionlint is clean.
Manual verification
N/A — the evaluate step is executed end to end by the test harness with stubbed GitHub reads; nothing was dispatched on a live PR.
Related Issues
Fixes #18530
Sibling sweep
Swept: git grep -n "fast-gate.yml" -- .github/workflows/
Siblings: none -- the fork lane specs are read in one place, the evaluate step of pr-readiness.yml, changed here
Pattern harvest
Rule candidate: review-prompt
Pattern: an "unknown" answer from a gate stamped as a read failure on a population that structurally can never exist, so an age-based retry loops forever
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)