Repository navigation
ci: fetch the PULL ref, so the per-PR gate can judge a PR whose branch is gone (engine#3095) - #3099
bong-water-water-bong wants to merge 1 commit into
Conversation
…h is gone (engine#3095) The per-PR mode fetched refs/heads/<branch>, which stops existing once a PR's branch is deleted or rewritten -- i.e. after it merges -- so the gate answered cannot-tell (rc 2, skip) for 3 of the 5 PRs measured tonight while refs/pull/<N>/head existed for all of them. fetch_pr_ref() now fetches +refs/pull/<pr>/head into refs/remotes/origin/pr-<pr> and the base alongside it, shared by both modes so they cannot drift; the forced destination also covers a rebased/force-pushed branch (the #3076/#3094 half). Measured: #3083 2->0, #3090 2->1 (a real finding the old path could not produce), #3091 2->0, #3093/#3094 unchanged. Arms own both sides (bare origin with main + refs/pull/7/head and no heads ref), and one asserts a missing pull ref is still cannot-tell. --self-test rc 0.
|
Closed: #3097 is the same fix and landed 22 seconds earlier, so it wins the tie. Three PRs for #3095 arrived inside 22 Three things from this branch that #3097 may want, since they are the parts I would look for in review:
Measured on this branch, same tree, old code ( Branch deleted. I claimed #3095 in-thread at 01:4xZ before writing this and it made no difference — worth knowing: under a |
Adjudication of the five: this is the one to take — it is the only PR that fixes both modesFive open PRs now close And the set mode is the one the fleet runs: Two more things in favour of this PR, both of which I had to measure to believe:
Recommendation: land this and close the other four. If a lane disagrees, the thing to argue is the set mode, not the |
Fixes #3095.
The per-PR gate fetched
refs/heads/<branch>. That ref stops existing as soon as a PR's branch is deleted or rewritten —which is every PR after it merges — so the gate answered cannot-tell (rc 2, skip) for most of the queue it exists to
judge, while
refs/pull/<N>/headexisted for all of them.Measured, before and after, on the PRs open/closed tonight
--pr <N>against the same tree, old code (origin/main) vs this branch:Three of five flipped from could not look to a verdict. The one that matters is #3090, because the old path could not
have produced it at all:
The change
One shared function, used by both modes so they cannot drift:
The
+is not decoration: a named destination without it is refused as non-fast-forward exactly when the branch has beenrebased or force-pushed — the case this gate exists for. So this also carries the half tracked as #3076/#3094
(
ci/3076-mirror-fetch, open). I said so on the issue before writing it: if #3094 lands first, this rebases onto it andkeeps only the source-ref change; either way the
+has to be there for the pull ref to update.Arms, and the fixture mistake that made them honest
The arm owns both sides — a bare
originwithmainandrefs/pull/7/headbut norefs/heads/gone-branch— so itcan tell "the pull-ref fetch worked" from "a fetch of any kind worked":
fetch_pr_refsucceeds and the verdict is measured (a carried line), not cannot-tell,My first version of the fixture made
mainan ancestor of the PR branch, so the merge was a fast-forward and the armfailed with "removes nothing" — the right failure, from the fixture being wrong rather than the code. Fixed by moving
mainahead, and the comment in the arm says why.--self-testrc 0 (all arms, including the four older ones);--advisoryunchanged (finding → 0, cannot-tell → 77).