Repository navigation
fix(readiness): hold a fork PR into a non-default base for a maintainer - #31446
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The hold fixes the cause. The base re-read on publish is a rider that applies to every PR, while the description says only fork PRs into another base are affected. Notes
What this change shipsInventory (7 items) — 5 justifiedIntent: let an outside contributor's PR into a release branch get a final, named readiness verdict instead of a pending that loops forever. This is a FIX (#18530, repro #18441).
[FIRST-PRINCIPLES-REVIEWED] 5b26410 Description read[DESCRIPTION-READ] c65e639b018f1a11a6ca6c5bda507f75834af6c57fa41544da6771aa69229a41 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: the change replaces a pending that could never resolve with a named, final hold, it removes no reader, and a revert walks it back cleanly. Notes
[DESIGN-REVIEWED] 5b26410 Description read[DESCRIPTION-READ] 53d69b6dd5d769410009a3d5e37b88387657b747568e8e971724cb3af7a077ef 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 — ✅ 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: |
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>
1a4363c to
5b26410
Compare
[operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved by Crew Captain for the on-call: checks green, PR Readiness passed, review lanes clean on this head.
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).Builds on #25224 by @mbriones98.
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.main(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).What changed (motivation → approach → change)
A fork PR into a release branch now gets a final, named
failureinstead of an endless pending. It stays 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. Such a PR gets
fork PR into a non-default base needs maintainer review. It never reachespassed, because none of the fork scan or review coverage runs on it while its base is another branch. The sweep re-fires afailureonly when a check, review or comment lands after the verdict, never on age, so the loop stops. Nothing in the product clears the hold; a maintainer reviews the PR and decides the merge.A base change keeps the SHA, so a verdict scored for the old base could land on the status after the base moved. 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
[read-failed]pending instead, so it cannot stand for a base it was not scored for.(not started)(only runs on PRs to main)main(red included)[read-failed]pendingfailurefirstfailure, named hold[read-failed]pendingFork PRs into
mainand same-repo PRs into any base get the same verdict as before.docs/ci/ci-and-reviews.mdnames the hold under Fork PRs.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.pyruns the evaluate step for a fork PR into a release branch: the hold is final, named and free of[read-failed]when no lane ran; the PR does not pass even with every lane green; a red lane posted before a base change still counts. Two controls pin that a fork PR intomainand a same-repo PR into a release branch are not held.test/test_pr_readiness_publish.pyadds a verdict scored for an older base publishing nothing, and an unreadable base turning a success into a stamped pending.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_publish.py::test_a_verdict_scored_for_an_older_base_publishes_nothing, test/test_pr_readiness_publish.py::test_an_unreadable_base_publishes_a_stamped_pending (head 1a4363c)
Determinism, on the seven new or changed test ids: 20 runs at
-n0, all green; 10 runs at-n 4 --dist loadgroup --max-worker-restart=2withtest/test_pr_readiness_evaluate.pyandtest/test_pr_readiness_sweep.pyas co-tenants, all green; one shuffled order (seed=17805), green.Manual verification
N/A — the evaluate and publish steps are 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: ...)