Skip to content

πŸ› fix: leave dependency-bot branches to the bot on every base-sync path - #16862

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/renovate-branch-updates
Nov 6, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/renovate-branch-updates

Conversation

@hanthor

@hanthor hanthor commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

#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.

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 -l is clean. Tests were not run locally, per AGENTS.md; CI is the verdict.

#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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 6, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16607 ✨ feat(github): enforce pin-only exception in merge-request relay same files src/docs/hive-merge.md
src/docs/operator-reference/README.md
src/pkg/github/merge_request_watcher.go
#16858 πŸ› fix: workflow-path fence approval survives the hive's own base refresh same files src/docs/hive-merge.md
src/docs/operator-reference/README.md
#16718 πŸ› fix(automerge): align contributor merge eligibility with relay policy same files src/cmd/hive/merge_eligibility.go

@hivecommons-hive
hivecommons-hive Bot merged commit 567cf11 into v5 Nov 6, 2026
82 of 86 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/renovate-branch-updates branch November 6, 2026 02:16
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#168623be8143` sha256:3d2debe8d5fffbad542390c02f9d2ba190b6b7bcae9e93c568b39374c5877bbb β€” download from the dashboard or `hivectl review evidence #16862`.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @hanthor holds role owner and GitHub permission maintain on repo; CI green at 3be8143.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 while isHiveAgentAuthor (main_sweeps.go:159) keeps excluding the same three bots.
  • leaveBaseSyncToDependencyBot (automerge_sweep_trusted.go:823-838) is nil-safe and dedups via markTerminalHoldLogged (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 bool caller of updateBranchAndSkip/currentBaseGate now passes pr; classifyUpdateBranchError(err, c.isForkPR(pr)) at automerge_sweep_trusted.go:853 reproduces the old fork classification (isForkPR handles nil). go build ./cmd/hive/ ./pkg/github/... is clean at the head.
  • currentBaseGate (automerge_current_base.go:120-134): bot branch holds behind under strict/explicit require_current_base or GitHub behind, else falls through via warnCurrentBaseFallbackOnce β€” same shape as the existing currentBaseUpdateUnavailable fallback 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: destination is already fetched at :440, and the skip only bypasses UpdateBranch; 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant