Skip to content

✨ Adoption: maintainer_policy adopt|ask|never (default adopt); 072 row says why and offers Adopt - #15016

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
feat/adoption-maintainer-policy
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
feat/adoption-maintainer-policy

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Fixes #15015

Evidence

#14524 (@hanthor, XXL, CONFLICTING, two failing ratchets, reviewer changes_requested, stage/072-returned-to-contributor, nudged twice, 26h; hanthor's hive not connected). Every cycle:

stage labels: adoption due but the author maintains the repository; not adopting repo=hive pr=14524 author=hanthor deferred=false

Row read "Returned to contributor — @hanthor must act (2 nudges sent)"; nothing explained the hold or offered a way out.

Owner decision (2026-10-28 12:28 ET)

We should adopt PRs regardless of who they are from. If they are clankers then we reserve the right to adopt if they disconnect.

→ clanker PRs are adoptable on disconnect regardless of the owner's repo role.

What changes

Config governor.labels.stage.adoption.maintainer_policy: adopt | ask | never, default adopt.

Engine — maintainerHoldsAdoption / maintainerReleasesAdoption route all five authorMaintainsRepo call sites (adopt, supersede, settle, settle-in-place, stalled escape). Log line kept, now with policy=.

Tracker payload — every nudged 072 PR row (and the nested PR of an issue row) carries
adoption: {author, due, blocked_by, since, nudges, author_online, author_registered, author_last_seen, author_maintainer, policy, action, text} — presence via the same hub lookup the contributor-offline adoption uses. Caption + amber pill/tooltip:

  • waiting on @hanthor (maintainer, offline 26h) — adopt? (ask)
  • waiting on @zoe (offline 40m, 2 nudges) (adopt, clock running)
  • … — not adopted: maintainer_policy is never

Decision API — POST …/items/N/decision {"decision":"adopt"}: PR only, write access, adoption enabled (409 otherwise); posts an attributed <!-- hive:adoption-requested by=<user> --> note, ensures+adds adoption/supersede, audits repo_item_decision_adopt, returns status: adoption-queued.

SPA (additive) — row action decide:adopt ("Adopt (hive takes over)") in the same decide:<verb> id vocabulary the context menu / popover use, offered only when adoption.action === 'decide:adopt', in-app confirm, selection-bar aware. New helpers are typeof-guarded at their call sites so the other agents' name-extracted JS tests keep passing. Wired to the needs-human popover (#14995): ask-held rows carry decision_needed (question "@hanthor maintains this repository and has been offline for 26h; adopt the PR?", blocker_reason: adoption:author-is-maintainer) with decide:adopt leading options, so the lit 072 chevron and the adopt? pill open the popover.

Settings → Labels — three-way selector with one-line explanations + help-mark + search-index entry.

Docs — labels-and-control-signals.md (adoption rules), operator-reference.md (config reference), dashboard-sections.md (adoption pill + action), GOVERNANCE.md and contributor-relay.md (one-sentence rationale). Changelog changelog.d/added-adoption-maintainer-policy.md.

Tests

  • config: default/normalisation; stagelabels: NoteAdoptionBlocked/Clear/AdoptionBlocked incl. stale head, adopted, persistence.
  • automerge: adopt adopts a maintainer without a permission read, keeps human rule, keeps live adoption; ask holds + records + owner request lifts + adoption kept; never holds even on request and records why. Existing maintainer tests pinned to never (they test that rule).
  • dashboard: payload/text/caption (incl. the reason clause kept), offline-for rendering, decision adopt (400 issue / 403 reader / 409 disabled / label+comment+audit), governor GET/PUT validation, SPA helpers under node (chip, tooltip, row action gating, label).

Acceptance check

After this rolls to hive's hive, #14524 is adopted by hive's hive on the first cycle (reason=contributor-offline, in place if maintainer edits are allowed, else a hive/adopt-14524 superseder). Do not adopt it manually — the rollout is the test.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 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 danathar 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 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 Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 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
#15003 ✨ feature: show Activity Monitor operator decision trails same files src/pkg/dashboard/static/index.html
#14992 ✨ Activity monitor: decision badge shows what you chose and what hive did next same files src/docs/api-reference.md
src/docs/dashboard-sections.md
src/pkg/dashboard/api_repo_item_decision.go
src/pkg/dashboard/server.go
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/docs/api-reference.md
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/docs/api-reference.md
src/pkg/dashboard/server.go
src/pkg/dashboard/static/index.html
#15020 🐛 fix(stage): a contributor PR with no linked issue is not waiting on the hive same files src/pkg/github/automerge/automerge_stage_labels.go

@hivecommons-hive

Copy link
Copy Markdown
Contributor
dab43ca

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head dab43ca21f68) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • GOVERNANCE.md

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@clubanderson
clubanderson force-pushed the feat/adoption-maintainer-policy branch from dab43ca to 68f8510 Compare October 28, 2026 17:28
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • relative links and anchors resolve

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor
68f8510

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 68f8510fb731) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • GOVERNANCE.md

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

…w says why and offers Adopt

#14524 (hanthor, XXL, stage/072, nudged twice, 26h, hive
offline) was never adopted: every sweep logged "author maintains the
repository; not adopting" and nothing in the UI said so. Owner decision
(2026-10-28): clanker PRs are adoptable on disconnect regardless of the
owner's repo role.

- config: governor.labels.stage.adoption.maintainer_policy adopt|ask|never,
  default adopt. adopt never reads the role; ask holds a maintainer's PR
  for an owner and records author-is-maintainer on the stage record;
  never is the previous rule (hold + release). Human-authored PRs stay
  unadopted under all three (the 072 machinery is clanker-only).
- engine: maintainerHoldsAdoption / maintainerReleasesAdoption route the
  five authorMaintainsRepo call sites through the policy; the owner's
  adoption/supersede request lifts the ask hold.
- tracker: every nudged 072 PR row carries adoption{author, due,
  blocked_by, since, nudges, author_online, author_registered,
  author_last_seen, author_maintainer, policy, action, text} from the
  stage record and the same hub presence the adoption uses; caption and
  an amber pill read "waiting on @hanthor (maintainer, offline 26h) —
  adopt?" instead of a bare "must act".
- decision API: decision "adopt" (PR only, write, adoption enabled) posts
  an attributed note, sets adoption/supersede, audits
  repo_item_decision_adopt; SPA row action decide:adopt in the same
  decide:* vocabulary with an in-app confirm.
- Settings → Labels three-way selector with one-line explanations.
- tests (config, store, engine policy branches, tracker payload/text/
  caption, decision API, governor API, SPA helpers), docs, changelog.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/adoption-maintainer-policy branch from 68f8510 to 6cff0fa Compare October 28, 2026 17:43
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit aa9b530 into v5 Oct 28, 2026
80 of 82 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/adoption-maintainer-policy branch October 28, 2026 17:56
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#150166cff0fa` sha256:68eaa2c81668c145209fb60ca7c00f442f618d73ffc0b894d05964245956bd4c — download from the dashboard or `hivectl review evidence #15016`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 6cff0fa.

@hivecommons-hive hivecommons-hive Bot removed the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 28, 2026
@github-actions

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

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

Labels

author/human A person pushed this PR themselves dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adoption never takes a repository maintainer's clanker PR and the UI never says why (#14524 stuck 26h at 072)

1 participant