Repository navigation
π fix: leave dependency-bot branches to the bot on every base-sync path - #16862
Conversation
#16847 stopped the hold guard from merging the base into held Renovate branches, but once the hold lifts the automerge lanes still did it. Renovate stops rebasing a branch for good once another identity has committed to it, so a single hive merge commit strands the PR behind its base. Evidence: projectbluefin/utah#1097 (renovate/*). Hive base merges moved its head bb9de1e -> 77cf7b9 -> b4de759 -> 3987386, then Renovate said on 11-05 21:13 that it "will not automatically rebase ... does not recognize the last commit author". Both projectbluefin repos require up-to-date branches, so Renovate rebases behind branches itself when nobody else commits to them. The predicate moves to pkg/github (DependencyBotBranch: a renovate/* head ref, or a renovate/dependabot/mergeraptor bot author) so the hold guard, isHiveAgentAuthor and the paths below share it. A dependency-bot branch now gets no hive commit from: - the lanes' update-branch (behind / required-checks-expected): holds as "behind"; - the current-base gate: holds as "behind" on a repo listed in require_current_base or when GitHub reports it behind; a repo gated only by the default merges it as tested, like a head the App may not write; - merge-forward of a trusted human's dirty PR; - the merge train's sibling update-branch and rebase requests, and the rebase request for a dirty front; - the fixer router's trusted-author rebase work; - adopted-PR stale-red recovery (skipped:dependency-bot-branch); - hive-merge --update-branch (the merge attempt still runs). Each skip is logged (automerge: once per head and step). Nothing in the codebase ticks Renovate's rebase checkbox, so no new writer is added; the bot rebases on its own under the strict rule. The dashboard's operator rebase actions and hive-owned paths (prfollowup, supersession resolve) are unchanged: they only update the hive's own PRs. Signed-off-by: James Reilly <jreilly1821@gmail.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
|
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Read this at 3be8143 against the tree, not just the diff. Looks correct to me; nothing blocking.
What I verified:
DependencyBotBranch(src/pkg/github/dependency_bot.go:30) is the same predicate the hold guard used before (renovate/prefix OR bot author), so #16847's behaviour is preserved whileisHiveAgentAuthor(main_sweeps.go:159) keeps excluding the same three bots.leaveBaseSyncToDependencyBot(automerge_sweep_trusted.go:823-838) is nil-safe and dedups viamarkTerminalHoldLogged(automerge_held_runs.go:678), which returns true only on first sight of(head, "dependency-bot:"+step)β so the once-per-head-and-step logging claim holds.- Every former
fork boolcaller ofupdateBranchAndSkip/currentBaseGatenow passespr;classifyUpdateBranchError(err, c.isForkPR(pr))atautomerge_sweep_trusted.go:853reproduces the old fork classification (isForkPRhandles nil).go build ./cmd/hive/ ./pkg/github/...is clean at the head. currentBaseGate(automerge_current_base.go:120-134): bot branch holdsbehindunder strict/explicitrequire_current_baseor GitHubbehind, else falls through viawarnCurrentBaseFallbackOnceβ same shape as the existingcurrentBaseUpdateUnavailablefallback at:147-154, so the "like a head the App may not write" comparison in the body is accurate.merge_request_watcher.go:480-487:destinationis already fetched at:440, and the skip only bypassesUpdateBranch; the merge attempt still runs, matching the new test.- Adoption recovery (
automerge_adoption_recovery.go:221-228) marks the attempt like the other terminal skips at:240,:245, so it won't re-evaluate the same head/base each tick.
One non-blocking note (info): updateBranchAndSkip returns the literal "behind" for a bot branch even when the caller's reason was "required-checks-expected" (automerge_sweep_trusted.go:845-847). The hold is right either way; only the recorded reason string is slightly off for that path. Fine to leave.
I could not run the Go tests here (agent pods block go test), so CI is the verdict on the new table cases.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
#16847 stopped the hold guard from merging the base into held Renovate
branches, but once the hold lifts the automerge lanes still did it. Renovate
stops rebasing a branch for good once another identity has committed to it,
so a single hive merge commit strands the PR behind its base.
Evidence: projectbluefin/utah#1097 (renovate/*). Hive base merges moved its
head bb9de1e -> 77cf7b9 -> b4de759 -> 3987386, then Renovate said on 11-05
21:13 that it "will not automatically rebase ... does not recognize the last
commit author". Both projectbluefin repos require up-to-date branches, so
Renovate rebases behind branches itself when nobody else commits to them.
The predicate moves to pkg/github (DependencyBotBranch: a renovate/* head
ref, or a renovate/dependabot/mergeraptor bot author) so the hold guard,
isHiveAgentAuthor and the paths below share it. A dependency-bot branch now
gets no hive commit from:
"behind";
require_current_base or when GitHub reports it behind; a repo gated only
by the default merges it as tested, like a head the App may not write;
rebase request for a dirty front;
Each skip is logged (automerge: once per head and step). Nothing in the
codebase ticks Renovate's rebase checkbox, so no new writer is added; the
bot rebases on its own under the strict rule. The dashboard's operator
rebase actions and hive-owned paths (prfollowup, supersession resolve) are
unchanged: they only update the hive's own PRs.
Follow-up to #16847, which covered only the hold guard. Found while auditing why hive stalls on projectbluefin/utah (#1097: Renovate stopped rebasing after hive base-merges).
Verification:
gofmt -lis clean. Tests were not run locally, per AGENTS.md; CI is the verdict.