Repository navigation
fix(readiness): hold a fork PR into a non-default base for a maintainer - #25224
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 while its base is another branch. 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 hold is a blocker, and a blocker publishes failure before the pending branch can add the read-failure token, so a supersession read failure on such a PR is still listed but cannot loop the sweep. Every other PR shape is evaluated as before. Fixes #18530
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff changes only a CI workflow and tests, with no dashboard control, string or state. [UX-REVIEWED] 66d3d24 Description read[DESCRIPTION-READ] 4602ce24da027a6dc9a8e9120a3c0956346d8bf58d4d781a494d4de4062e6d52 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The hold reuses the existing What this change shipsInventory (5 items) — 4 justifiedIntent: let a fork PR into a release branch reach a final, named readiness verdict instead of staying pending forever. This is a FIX (#18530).
[FIRST-PRINCIPLES-REVIEWED] 66d3d24 Description read[DESCRIPTION-READ] 63822788c551f4f22abc8be926c249a322f68fa6bbdcfc8144bac26dc8d0de1f That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: a final, named Notes
[DESIGN-REVIEWED] 66d3d24 Description read[DESCRIPTION-READ] ddc3e5eb0e53064b8b6046e56fdefad8ddcd781c0dcb25059f9cad928dda4e24 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 |
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 — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- .github/workflows/pr-readiness.yml:2424 -- Failed base re-check preserves a stale green verdict
[BLOCK-MERGE] 66d3d24 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — HIGH, silently. A fork PR can skip the maintainer hold: the green
Real fix cost: one False positive or not applicable? A repository writer can comment: |
iamwhatever
left a comment
There was a problem hiding this comment.
Requesting changes for one missing follow-up issue; the code itself looks sound.
Reviewed head 0ebde6aecc73dea4c1679bd0853d85c73659e3b6.
The fix is right: on a fork PR into a non-default base, a Fast Gate-keyed lane that never ran is listed as skipped, and the maintainer hold goes into failed[] after the supersession gate, so the verdict is a terminal failure the sweep does not re-fire on age. Fork-into-main and same-repo shapes are untouched, and the new tests cover the hold, retained red lanes and dropped blocks, and the sweep.
Blocker: the second Known follow-up has no linked issue. A fork PR retargeted from a release branch to main gets no new Fast Gate run, because fast-gate.yml runs on the default pull_request types and a retarget is edited. Its Stage-2 lanes then sit at (not started) pending until the author pushes, which is close to the loop this PR fixes. The new code comment says the hold lifts on retarget, which is true, but the PR then waits on lanes that will not start. Please either handle it here or open one issue for it and link it in the description.
The first Known follow-up (transient read failure before the hold) self-heals on the next sweep and needs no issue.
AI findings judged non-blocking:
- Design Review (note): the hold cannot be cleared in-product, so a maintainer must bypass
PR Readiness; suggests saying so in the description. Wording only, and no worse than the old endless pending (hold).
All current-head checks are green and every AI lane passed or skipped.
— crew-pr-reviewer (r133)
The publish step re-checked only the head before writing the verdict. A base change keeps the SHA, so a run that evaluated a PR while its base was main could finish after the base changed and publish success over the maintainer hold a newer run had already written for a fork PR into another branch. The step now reads the PR's base after every other read in the step, right before the status POST, and publishes nothing when it differs from the base the verdict was scored for. The head is still checked at the top of the step. The run for the base change publishes instead.
|
[operator: bolichen97] Continuing this in #31446; thanks for the start. |
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. 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 verdict is scored for one base as well as one head, and a base change keeps the SHA. The publish step reads the base right before the status POST and publishes nothing when it moved; when that read fails, a success is published as a stamped pending instead of standing for a base it was not scored for. Every other PR shape is evaluated as before. Builds on #25224. Fixes #18530 Co-authored-by: Matthew Briones <50031759+mbriones98@users.noreply.github.com>
…er (#31446) 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. 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 verdict is scored for one base as well as one head, and a base change keeps the SHA. The publish step reads the base right before the status POST and publishes nothing when it moved; when that read fails, a success is published as a stamped pending instead of standing for a base it was not scored for. Every other PR shape is evaluated as before. Builds on #25224. Fixes #18530 Co-authored-by: Matthew Briones <50031759+mbriones98@users.noreply.github.com>
|
Thanks for this fix. Its whole change is now on main through #31446 (merged 2026-11-06, commit 24f8a91), which says it builds on this PR, and #18530 is closed. On main, So I'm closing this one as superseded. Please reopen if I missed a part that did not land. |
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 while its base is another branch. If GitHub retargets it tomain, the recompute on that event reads it as an ordinary fork PR. 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]pendingfailurefirst, so no[read-failed]tokenfailure, 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; and fork PRs intomainand same-repo release PRs being unchanged, including their[read-failed]pending when supersession cannot be evaluated. The sweep tests skip on Windows and without GNUdate, as the sweep suite does.A differential run of the evaluate step over 144 PR shapes (fork or same-repo, base, supersession result, dropped block, Fast Gate ran or not, lane results) matched
mainon every shape that is not held.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 (head 0ebde6a)
The readiness, sweep, supersession and fork-workflow suites pass (875 tests); actionlint, ruff, black and the comment-history gate are 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.
Known follow-ups
[read-failed]pending before the hold is applied. The sweep retries it on age and the next successful read publishes the hold, so this does not loop; left unchanged here.maingets no new Fast Gate run until its next push, so its lanes can stay unstarted. Tracked in ci(readiness): a fork PR whose base changes to main gets no Fast Gate run, so its fork lanes stay not started #26309.Related Issues
Fixes #18530
Replaces #24936
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: ...)