Repository navigation
π adoption: resolve conflicts for offline clankers instead of returning the PR - #15491
Merged
Merged
Conversation
β¦ng the PR A returned-to-contributor PR whose clanker is offline was adopted once, but the supersede's replay of the base onto hive/adopt-<n> is a plain GitHub merge: on a conflict it deleted the branch, posted 'Supersede failed' and handed the PR back to a contributor who cannot act. The next attempt's branch push was answered by the mutation journal as already applied, so the replay merged into nothing, the attempt was recorded as opened-nothing and the PR parked at 085 adoption-stalled:supersede-failed in a state the 072-only adoption block never re-enters (#15307). With a RebaseResolver wired the copy now opens anyway and the fixer's rebase-resolve episode takes it (requested_by: adoption, two attempts); exhausted β 085 rebase-failed-twice (copy) / adoption-stalled:rebase-failed-twice (original) with Adopt into fresh branch / Close as superseded. An attempt that opened nothing is re-admitted after adoption.offline_grace (30m) while the clanker stays offline, and each attempt's push is a fresh journal claim. Tracker: 'Adopting Β· fixer resolving conflicts'. Fixes #15490 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Contributor
|
[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 |
Generated by changelog-fragment-guard from the PR title (#5675). Edit the wording freely, or replace this file with the no-changelog label if the change is not user-visible. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
This was referenced Oct 29, 2026
This was referenced Oct 29, 2026
Closed
Contributor
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15490
Why
PR #15307 (thatguywob's clanker, fork,
role/trusted) sat 13h as "Returned to @thatguywob's clanker" with the clanker offline. It was adopted at 07:12Z, but the supersede's replay ofv5ontohive/adopt-15307is a plain GitHub merge: on a conflict it deleted the branch, posted "Supersede failed" and handed the PR back to a contributor that cannot act. The next sweep re-adopted, but the branch push was answered by the mutation journal as "already applied" (identical claim inputs), so the replay merged into nothing, the attempt was recorded as opened-nothing and the PR parked at store 085adoption-stalled:supersede-failed:conflicting(GitHub label stillstage/072) β a state the 072-only adoption block never re-enters. Adoption never used the fixer's rebase-resolve episode (only the merge-train / hive-authored / push-reachable routes do), and the App token cannot push the fork head (that is #15133 itself).What changes
supersedeAdoptedPR: with aRebaseResolverwired, a replay conflict keepshive/adopt-<n>, opens the copy with a conflict note and requests the fixer's rebase-resolve episoderequested_by: adoptionunder the existing two-attempt guard (RebaseRequest.RequestedBy,Options.RebaseEpisode,AdoptionRebaseRequester). Store recordsAdoptCopyConflicting; cleared when the copy reads mergeable; close-first closes the original through the existing supersede path. Without a resolver the old behaviour is preserved.stage/085 rebase-failed-twice, originaladoption-stalled:rebase-failed-twice; popover question "rebase failed twice" with Adopt into fresh branch / Close as superseded. Stage engine:PRPassFacts.RebaseFailedTwice, FixingβNeedsDecision edge, derive parity.stage-stalledescape. An attempt that opened nothing is re-admitted aftergovernor.labels.stage.adoption.offline_grace(default 30m) while the clanker is offline / unregistered / has no presence (adoptionRetryDue). Push and replay journal claims carry anattemptstamp so a retry recreates the branch an earlier attempt deleted.adopted_by_state: resolving-conflictsβ single caption "Adopting Β· fixer resolving conflicts" (π tracker: readable progress label when a chevron action is runningΒ #15416 rule); 085 captions for both reasons; Settings help/search foroffline_grace;static/index.htmlregenerated.AdoptionStalledCommentis reason-aware (names the two options forrebase-failed-twice).fixed-offline-clanker-adopt-rebase.md.Tests (no sleeps)
pkg/github/automerge/automerge_adoption_offline_rebase_test.go:requested_by: adoption; opened-nothing + offline past grace β re-admitted; within grace β wait.AdoptCopyConflicting; without resolver β old give-up.adoption-stalled:rebase-failed-twice, copy 085rebase-failed-twice.hive/adopt-<n>(attempt-stamped claim).pkg/dashboard:TestStageTrackerAdoptionCopyResolvingConflicts. Full suites green: automerge, stagelabels, stageengine/..., config, dashboard, writeback (incl.TestDirectWriteRatchet), cmd/hive.Timeline #15307 (UTC, 2026-10-29)
hive:contributor-auto-promoted author=thatguywob merged=5v5<!-- hive:contributor-nudge head=a46bcaeβ¦ n=1 mode=queued -->β stage/072<!-- hive:stage-regressed -->080 β 072: conflictinga46bcae(App cannot push the fork)<!-- hive:adoption-supersede-conflict head=a46bcaeβ¦ -->"Supersede failed β¦ Mergingv5into the copy branchhive/adopt-15307(ata46bcae867d2) stopped on a git conflict β¦ Files changed on both sides:src/pkg/dashboard/api_repo_item_decision_test.goβ¦ Reason:supersede-conflict"adopted_head=a46bcaeβ¦ adopted_by=null adopt_mode=supersede(second attempt, nothing opened)<!-- hive:adoption-stalled head=a46bcaeβ¦ reason=adoption-stalled:supersede-failed:conflicting -->"has not moved for 1m and the hive has nothing it can push β¦ Blocker: the hive tried to re-home this PR ontohive/adopt-15307(``) and could not open the superseding PR. Moving tostage/085-needs-decision"presence.state=offlinesince)needs-rebase<!-- hive:stage-stalled -->"stage 080-awaiting-merge-admission: no activity for 30m0s: merge-train:queued-behind#15424β¦"stage 72 "Returned to @thatguywob's clanker" presence {offline, clanker, last_seen 07:39:59Z}; store:stage 085 adoption-stalled:supersede-failed:conflicting adopted_by=nullPod log (
kubectl logs deploy/hive -c hive), repeating every ~45 s, no adoption line after 07:15Z: