Repository navigation
π fix(automerge): close the adopted PR when its superseder merges from any stage - #14474
Conversation
β¦any stage The superseder poll only ran while the original sat at 074, so an original that moved to 085 (needs-human) or 072 (contributor pushed a new head) was never closed when the hive copy merged. Poll the superseder from any stage, close the original with a linking note, mark it superseded in the stage store when the close is refused, and evict superseded records from the stage tracker. Closes/Fixes/Refs lines are all carried to the adopted PR. Fixes #14471 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 4de6552. |
Fixes #14471
Problem
settleAdoption(which polls the superseding hive PR and closes the original once it merges) only ran while the original sat at stage 074adopted-by-hive. Both live cases moved off 074 before the superseder merged:needs-humanthree minutes after adoption and parked at 085; π fix: backfill spoke startup probes during self-upgradeΒ #14459 merged, π fix: backfill spoke startup probes during self-upgradeΒ #14395 stayed open.AdoptionLive(head)was false, the PR returned to 072, and π fix(agent): report CI polls without inferring PR ownershipΒ #14461 (which carried the new head anyway) merged with π fix(agent): report CI polls without inferring PR ownershipΒ #14403 still open.Both had to be closed by a human.
Fix
settleSupersederpolls the superseder from any non-terminal stage while a record still hasAdoptedByset, on the existingadoptCheckIntervalcadence.hive:adopted-mergednote and close the original. If the heads diverged, post onehive:adopted-merged-divergednote per head and leave it open for the contributor.superseded_by/superseded_openso the stage tracker drops the row; no retry loop.MarkSuperseded(idempotent),MarkSupersederMergedNoted,Superseded,SupersederPollDue;ClearAdoptionresets them.adoptClosesPatternnow also carriesRefs #Nlines to the adopted PR.Tests
go test -coverprofile: stagelabels 93.0%, github/automerge 90.0%.