Skip to content

πŸ› hive never applies hold itself: gates use ready-for-review / decision-needed - #18542

Merged
hivecommons-hive[bot] merged 8 commits into
v5from
fix/18468-hold-label-overloaded
Nov 16, 2026
Merged

hivecommons-hive[bot] merged 8 commits into
v5from
fix/18468-hold-label-overloaded

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #18468

Why

hold means "do not merge / do not act" in most projects, but the hive also applied it whenever one of its own gates needed a person, so a hive-labeled hold PR did not say whether the hive was still working, waiting on review, or waiting on a decision. A hold a person adds keeps its meaning exactly: hands-off, the hive never implements, decomposes, relays or merges a held item, and never removes the label.

What changes

The hive no longer applies hold anywhere. Its gates use two self-explanatory labels instead, each blocking merges exactly like hold:

Label GitHub description (who acts next) Applied by
ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge. ACMM level gate at L3-L5 (and cross-repo outreach at every level)
decision-needed Hive is blocked on a human decision; a maintainer decides (see hive's comment). #5117 self-authorization, #9665 reporter trust (with needs-human), holdguard re-hold, owner-only delegated decision (with needs-owner)

The SHA-hold sweep now gives every reporter needs-sha (it already did for trusted reporters) instead of hold; an untrusted reporter's issue stays out of automatic work through the reporter-trust gate.

Write sites changed (previously literal hold):

Release paths now act only on the gate label, never on hold: level-hold release (ReleaseLevelHoldsOnce / PendingLevelHolds), #5117 disabled-policy release, self-imposed reporter-trust release.

Merge-gate semantics: the gate labels are exact-match members of the hold set (HasHoldLabelWith, so isHeld, enumeration, every automerge sweep, holdguard lift detection), automergeBlockLabelReason reports them as label:hold, stagelabels.HoldLabels routes them as gates, the dashboard bands count them as held, the delegate's hold rail reads decision-needed, and the agent label relay reserves both.

Comments: each gate already posts its notice; the notices now name the gate label. No new per-item comments except the one-time migration note below.

Migration

On boot, per active repo (bounded to 50 items per repo per boot, off the boot path): create both labels with their descriptions, then for each open item carrying literal hold, swap it for the gate label only when the newest hold event is a labeled by the Hive App and an App-authored gate notice is on the thread (level notice -> ready-for-review; reporter-trust / #5117 / holdguard / owner-only notice -> decision-needed). The gate label is added before hold is removed, and one <!-- hive:hold-relabel-18468 --> comment explains the swap. A human-applied or human-re-applied hold, or a hold the hive cannot attribute, is never touched.

Config

governor.labels.ready_for_review (default ready-for-review) and governor.labels.decision_needed (default decision-needed); blank or hold keeps the default. Allowlisted as yaml-only in the settings parity list; documented in hive.yaml.example.

Docs

src/docs/labels-and-control-signals/{reference,glossary-and-operations}.md, src/docs/hive-open-pr.md, hold-gated policy templates (source and embedded copies), changelog fragment.

Tests

  • pkg/github/hive_gate_labels_test.go: gate labels block like hold with exact matching; hold can never be configured as a gate label; agents cannot set them; descriptions name the next actor; a person's hold is never a pending level hold; migration relabels only App-provenance + notice holds and leaves human, unattributed and forged-notice holds untouched.
  • pkg/delegatedecision/hold_label_18468_test.go: owner-only adds decision-needed, never hold; the hold rail still refuses all action on hold; the delegate never lifts either.
  • cmd/hive/hive_gate_labels_18468_test.go, pkg/config/hive_gate_labels_18468_test.go, and updated watcher / level-hold / reporter-trust / self-authorization / SHA-hold fixtures (watcher test now fails if hold is ever applied).

πŸ€– Generated with Claude Code

…on-needed (#18468)

A hold placed by a person still means hands-off: the hive never
implements, decomposes, relays or merges a held item and never removes
the label. The hive's own gates no longer overload hold:

- ACMM level gate (and cross-repo outreach) -> ready-for-review
- #5117 self-authorization, #9665 reporter trust, holdguard re-hold,
  owner-only delegated decision -> decision-needed
- SHA-hold sweep -> needs-sha for every reporter

Both gate labels block merges exactly like hold (exact-match members of
the hold set), are created with descriptions saying who acts next, are
reserved from agents, and are renameable via governor.labels.ready_for_review
/ decision_needed. A boot migration swaps hold for the gate label only when
the newest hold event is the App's and an App-authored gate notice is on
the thread; every other hold is left alone.

Fixes #18468

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson

Copy link
Copy Markdown
Member Author

@nate-double-u FYI, this addresses #18468 (hold label overloaded): hive no longer applies hold itself; it uses ready-for-review (work done, waiting on a maintainer) or decision-needed (blocked on a human decision), and a hold you add still means hands-off.

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 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
#18505 ✨ Discover agents declared in a managed repo's .hive/agents/ behind owner approval CONFLICT src/cmd/hive/main.go
src/docs/scale-envelope.md (conflict)
src/pkg/dashboard/settings_parity_allowlist.txt
src/pkg/github/client.go
#18507 ✨ governor: release-feed watcher kicks agents when a tracked upstream dependency releases same files src/cmd/hive/main.go
src/pkg/config/config.go
src/pkg/dashboard/settings_parity_allowlist.txt
#18446 πŸ› fix: get stale Dependabot PRs moving without refused commands same files src/pkg/writeback/testdata/direct-writes-baseline.txt
#18388 πŸ› issue stages: remove needs-triage once, then yield it to the repo's own triage tooling same files src/docs/labels-and-control-signals/reference.md
#18536 ✨ feature: choose remote repository write identity same files src/cmd/hive/main.go
src/hive.yaml.example
src/pkg/config/config.go

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

⏱️ The 900s mutation budget ran out, so 3 package(s) were not fully mutated and the results below do not cover them:

  • pkg/github: cut short (partial, no report)
  • pkg/holdguard: skipped (not started)
  • pkg/stagelabels: skipped (not started)

1 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/main.go 6161 CONDITIONALS_NEGATION

Verdict: uncovered (#17349).

@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

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

Why:

  • the review swarm returned requires_human: it has a question for you, not a fix for the hive
  • the reviewer asked you: security requires human: Changes merge-gate label semantics (trust/merge policy surface); migration swaps hold labels on proof of App provenance, which I did not fully read. A maintainer should sign off.

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.

Evidence bundle `#1854222c2d04` sha256:0a5c8ded62955ec83da256ae94e2e6304e1e009996710bfa851283ce0c358902 β€” download from the dashboard or `hivectl review evidence #18542`.

Review findings from reviewer (folded here because this head already carries its hive review):

This changes merge-gating label policy, which is a trust surface, so I am routing rather than approving.

What I read in the diff:

  • src/cmd/hive/merge_eligibility.go (automergeBlockLabelReason): the new github.IsHiveGateLabel case makes ready-for-review and decision-needed block auto-merge, reporting label:hold. The new test checks that not-ready-for-review is not matched.
  • src/cmd/hive/main_helpers.go (enforceHoldGuard): the holdguard re-hold now adds decision-needed.
  • src/cmd/hive/main.go: a boot-time goroutine runs MigrateHiveAppliedHolds, which relabels existing holds across active repos.

I did not verify the migration's "newest hold event is a labeled by the App" check, which lives in pkg/github and is outside the files I read. The open question is whether a person's hold can ever be swapped. That is the part a maintainer should confirm before merge.

The change itself looks consistent with the stated intent and ships tests and docs.

@hivecommons-hive

Copy link
Copy Markdown
Contributor
7a0e13d

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

Hive flagged this PR (author @clubanderson, head 7a0e13d61ba6) 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 17 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • src/pkg/policies/defaults/architect-holdgated.md
    • src/pkg/policies/defaults/ci-maintainer-holdgated.md
    • src/pkg/policies/defaults/guide-holdgated.md
    • src/pkg/policies/defaults/outreach-full.md
    • src/pkg/policies/defaults/quality-holdgated.md
    • src/pkg/policies/defaults/scanner-holdgated.md
    • src/pkg/policies/defaults/sec-check-holdgated.md
    • src/pkg/policies/defaults/strategist-holdgated.md
    • src/pkg/policies/outreach_claims_test.go
    • src/policies/architect-holdgated.md
    • src/policies/ci-maintainer-holdgated.md
    • src/policies/guide-holdgated.md
    • src/policies/outreach-full.md
    • src/policies/quality-holdgated.md
    • src/policies/scanner-holdgated.md
    • src/policies/sec-check-holdgated.md
    • src/policies/strategist-holdgated.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.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@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 16, 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 removed the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@clubanderson clubanderson added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 7bb8e46 into v5 Nov 16, 2026
89 of 90 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/18468-hold-label-overloaded branch November 16, 2026 23:49
@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 22c2d04.

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

Decision needed: @clubanderson please confirm, on this exact head, that ready-for-review and decision-needed should block merging exactly like hold across the automerge sweeps, holdguard and the migration.

This changes which labels block merges (merge policy, a trust surface), so I am routing it rather than approving.

What I read and found consistent:

  • src/pkg/github/hive_gate_label_migration.go: the boot migration relabels a hold only when the latest label event is by the App and a gate notice exists; a person's hold is skipped, and the write goes through WritebackAllowed. A failure leaves the old hold in place, which still blocks.
  • src/cmd/hive/merge_eligibility.go:778: the new IsHiveGateLabel case reports label:hold. The existing Contains(lower, "hold") case runs first and does not match either new label, so there is no shadowing. The look-alike not-ready-for-review is covered by hive_gate_labels_18468_test.go.

Not verified: the other ~65 files (delegatedecision, the stagelabels and dashboard bands, the eight policy templates). The scope matches #18468, so this is a confirmation request, not a defect report.

β€” hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

hivecommons-hive Bot pushed a commit that referenced this pull request Nov 17, 2026
…8563)

* πŸ› needs-sha keeps hive off an issue until the reporter adds a SHA

After #18542 the SHA-hold sweep only applies needs-sha, which did not block agent work, so with reporter trust disabled those issues became workable. needs-sha (configured name or default) now sidelines the issue in enumeration and webhook classification until the sweep removes it.

Signed-off-by: Andy Anderson <andy@clubanderson.com>

* πŸ“ refresh scale-envelope citation after client.go shift

Signed-off-by: Andy Anderson <andy@clubanderson.com>
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. conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. 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.

"hold" label overloaded

1 participant