Skip to content

✨ dependency-bot: opt-in hive adoption of red dependency-bot PRs that need a code change - #18529

Merged
kubestellar-prow[bot] merged 3 commits into
v6from
hive/adopt-18510
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 3 commits into
v6from
hive/adopt-18510

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersedes #18510 (adopted after CI went red and the contributor was unavailable; original commits by @Danathar preserved).

This branch is #18510's head 58936593cd92 as pushed by @Danathar (fork Danathar/hive), unchanged. Last lane reason on the original: conflicting.

Hive fix agent: rebase this branch on v6, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

Conflicts with v6: the contributor head could not be replayed onto the base, so this copy opened as it is and the hive's fixer is resolving the conflicts on this branch (rebase-resolve episode, two attempts). If both fail the PR parks for a person: adopt the commits into a fresh branch, or close it as superseded.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 16, 2026
@kubestellar-prow kubestellar-prow Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 16, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Nov 16, 2026
Danathar and others added 2 commits November 16, 2026 17:27
… need a code change

Add auto_merge.dependency_bot_adopt.enabled (default off). With it on, the
dependency-bot sweep, at the point it would hand a red trusted-bot
Renovate/Dependabot/mergeraptor PR to a person (red on the same head past
the 4h grace and the transient re-run hold), reads the review swarm's own
aggregate verdict for exactly that head from review-verdicts.json. When it
is changes_requested, it adds adoption/supersede (the dashboard Adopt
decision's label) once per bot head, gated as write-back kind
contributor_adopt, and posts no hand-off for that head. The existing
adoption path copies the PR to hive/adopt-<n> and the fix loop repairs it.

Held, human-merge-labelled or -titled PRs, heads touching
auto_merge.human_merge_paths (read-only check sharing the relay's pin-only
exception), heads without a changes_requested verdict, hives with stage
adoption off and write-back refusals keep the person hand-off. A failed
label write is recorded for the head and the hand-off follows next pass.
Requests persist in dependency-bot-conflicts-adopt.json.

The setting is wired through config, PUT /api/config/auto-merge
(dependency_bot_adopt_enabled), the Features → Auto-merge toggle and the
admin MCP auto_merge.update op, with docs and a changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
The sweep's write calls moved into sweepDependencyBotConflictsWith, so
the notification write-site inventory and its doc row name that function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 16, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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

hive/awaiting-ci: rebased onto v6 (conflict was the settings search index in config-state.js / index.html, resolved keeping both sides); CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

Head f112e5eb8.

❌ gremlins did not produce a report for 1 package(s), so no verdict can be derived from this run (see the job log):

  • pkg/github: gremlins exited 137

6 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/cmd/hive/dependency_bot_adopt.go 122 CONDITIONALS_NEGATION
src/cmd/hive/dependency_bot_adopt.go 123 CONDITIONALS_NEGATION
src/cmd/hive/dependency_bot_adopt.go 168 CONDITIONALS_NEGATION
src/cmd/hive/dependency_bot_adopt.go 174 CONDITIONALS_NEGATION
src/cmd/hive/dependency_bot_adopt.go 191 CONDITIONALS_NEGATION
src/cmd/hive/dependency_bot_adopt.go 244 CONDITIONALS_NEGATION

Verdict: error (#17349).

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Decision needed: @clubanderson should the hive be allowed to adopt (copy and repair) a red trusted-bot dependency PR on its own when the review swarm says changes_requested, even though it is off by default?

This adds opt-in automation (auto_merge.dependency_bot_adopt.enabled, default off) that takes over another bot's PR. That is merge/trust policy, so I am routing it.

Verified in src/cmd/hive/dependency_bot_adopt.go, skipReason fails closed on every check I read:

  • the author must be a trusted bot;
  • stage adoption must be on;
  • no hold, do-not-merge or human-merge rule may apply;
  • adoption/supersede must not already be set;
  • the swarm verdict on the exact head must be changes_requested;
  • the human-merge-path check must succeed, and an error counts as "touches".

requestDependencyBotAdoption records the request per head before the label write, so a restart will not repeat it.

Open question, not a defect: depBotHeadVerdictFromArtifact reads review-verdicts.json, so adoption depends on this reviewer lane's verdicts. Please confirm you are comfortable with agent verdicts gating that step.

— hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 16, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @f112e5e
  • the review found: the reviewer marked this change high-risk
  • reviewer question: @clubanderson should the hive be allowed to adopt (copy and repair) a red trusted-bot dependency PR on its own when the review swarm says changes_requested, even though it is off by default?
  • the automerge lane will not merge this unattended

Head: verdict requires_human @f112e5e, 76/76 checks green, DCO yes, soak 0s of 10m0s.

What to do: approve this head (f112e5e) to merge as-is, or leave a changes requested review (or reply /hive decision <what to change>) and the hive will push the fix.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@clubanderson clubanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Owner decision: yes, the hive may adopt a red trusted-bot dependency PR on its own when the swarm verdict on that exact head is changes_requested. It is off by default (auto_merge.dependency_bot_adopt.enabled), fails closed on hold / do-not-merge / human-merge paths / missing verdict / write-back refusal, is once per head and persisted, and reuses the existing adoption path. CI is green at f112e5e. It does not overlap #18446 (v5, stale/behind Dependabot rebasing in the automerge lane): different branch, different files, different failure mode, so both stay.

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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 merged commit ccf8114 into v6 Nov 17, 2026
99 of 103 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-18510 branch November 17, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants