Skip to content

🐛 Reporter-trust hold: never hold hive-authored PRs, judge only linked issues, show and release hive-set holds - #15080

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/reporter-trust-hold-hive-authored
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/reporter-trust-hold-hive-authored

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15075

What broke

#15020 (hive-authored, author/hive + role/trusted, 65/65 green, approved) was held by the hive itself two seconds after opening via the #9665 reporter-trust hold, with metadata "Issue":15017,"Reporter":"Karibhou","Association":"CONTRIBUTOR". 15017 is a sibling PR, not an issue. The row then sat 49+ minutes at stage/085-needs-decision as "hold +1 · Needs human decision" with no way to tell who held it or why.

Root cause. 15020's body reads Refs #15009 (closed by #15017, …); the gate fed the body to the bare-mention parser (ParseReferencedIssues), which yielded #15017, and Issues.Get returned that PR as an issue object whose user (Karibhou, CONTRIBUTOR) was then treated as the issue reporter. The gate never checked IsPullRequest() and never asked whether the PR's author was the hive itself.

Changes

  1. Gate linkage (pkg/github/pr_reporter_trust.go): rationale = closing-keyword links (ParseClaimedIssues) + the request's declared issues; bare mentions are no longer consulted; a link resolving to a PR is skipped; a hive-filed issue ([selfreport], App/AI author) resolves as trusted.
  2. Never hold hive-authored PRs: EvaluateReporterTrust takes the PR author; App bot / project.ai_author / [bot] / non-human authors skip the gate. Kept for contributor PRs and shared-PAT accounts.
  3. Operator visibility: new stagelabels.HoldProvenance (by, source, reason, since, issue/reporter/association) recorded on the stage store by the stage-label pass from the hive:reporter-trust-metadata notice + newest hold label event; tracker payload hold {…, pill} on items and nested linked_prs; pill reads Held by hive · reporter trust (issue 🐛 fix(fleetreport): treat the hive-held stage dwell warning as benign #15017 by @Karibhou, contributor) / Held by @login; decision popover asks Release the hold, or keep it? with Release hold leading (blocker_reason: hold:hive); the 085 comment names who set the hold and why.
  4. Recovery (pkg/github/automerge/reporter_trust_release.go): on the stage-label pass, a hive-authored PR carrying a hive-set reporter-trust hold has hold (and needs-human when the gate owned it) removed, a <!-- hive:reporter-trust-release --> comment posted, and stage labels: releasing self-imposed reporter-trust hold logged. Operator-set holds (human label actor) are left alone.
  5. Tests in every touched package (github, automerge, stagelabels, prstage, dashboard Go + node fixture); coverage: github 88.8 (floor 88), automerge 89.9 (88), dashboard 87.8 (84), stagelabels 91.7, stageengine/prstage ≥ 93.
  6. Docs: labels-and-control-signals.md (hold / reporter-trust row, 085 row), dashboard-sections.md (hold pill + popover); changelog.d/fixed-reporter-trust-hold-hive-authored.md.

Notes

  • Policy: change 2 makes the merge-side reporter-trust gate inert for every hive-opened PR; it stays active for non-hive authors.
  • Cost: the provenance read is two GET calls (comments, label events) per held PR per stage-label pass.

Acceptance

After roll, the next stage-label pass releases 15020's hold + needs-human with the release comment and log line, and the automerge lane merges it.

…issues, show and release hive-set holds

The #9665 reporter-trust merge hold judged #15020, a
hive-authored PR, via a bare '#15017' mention that resolved to a sibling
PR, attributed that PR's author as an untrusted issue reporter and held
the PR two seconds after it opened; the tracker then showed only
'hold +1 · Needs human decision'.

- Gate rationale is closing-keyword and declared issue links only; a
  link that resolves to a PR is skipped; hive self-reports are trusted;
  the gate is skipped for hive-authored PRs (kept for contributor and
  shared-PAT PRs).
- Stage-label pass records hold provenance (by/source/reason/since) from
  the reporter-trust notice and the newest hold label event; tracker pill
  reads 'Held by hive · reporter trust (issue #N by @x, contributor)' or
  'Held by @login'; the decision popover asks release/keep with Release
  leading; the 085 comment names who set the hold and why.
- The same pass releases a hive-set reporter-trust hold on a
  hive-authored PR and logs 'stage labels: releasing self-imposed
  reporter-trust hold'; operator holds are left alone.

Fixes #15075

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@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 kellyaa 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. 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

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
#15063 🐛 Let hive decide: say when a decision never took effect, in plain words, and never block the PR with hive's own decision same files src/docs/dashboard-sections.md
src/docs/labels-and-control-signals.md
src/pkg/dashboard/stage_tracker_decision.go
src/pkg/dashboard/static/index.html
#15072 🐛 Adoption: re-adopt when the hive's superseding copy is closed unmerged same files src/docs/dashboard-sections.md
src/docs/labels-and-control-signals.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_decision.go
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_stage_labels.go
src/pkg/stagelabels/store.go
#15076 🐛 fix: clarify Activity Monitor actors and shared PR rows CONFLICT src/pkg/dashboard/static/index.html
#15074 🐛 Activity Monitor: server-derived stage actor icons, one row per PR, Merged-today counter above the gate CONFLICT src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15070 ✨ Activity Monitor: presence indicator (clanker online / offline / none) on the waiting-on pill same files src/docs/dashboard-sections.md
src/docs/labels-and-control-signals.md
src/pkg/dashboard/stage_tracker.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
#15057 🐛 fix: recover orphaned supersede adoptions same files src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_stage_labels.go
src/pkg/github/automerge/automerge_stage_labels_test.go
src/pkg/stagelabels/store.go
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html
#15067 🐛 fix: enable bulk delegation for multi-PR parent selections same files src/pkg/dashboard/static/index.html
#15054 ✨ feature: show clanker presence on waiting-on pills CONFLICT src/pkg/dashboard/static/index.html

@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 author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit caf9449 into v5 Oct 28, 2026
84 of 89 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/reporter-trust-hold-hive-authored branch October 28, 2026 19:55
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#150805153ac1` sha256:3bbf255d384a2a2819bfab7487cb57a69d153920321c6db9d8d772db70baa6d6 — download from the dashboard or `hivectl review evidence #15080`.

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

@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

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
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 conflicts-with-open-pr Open PR has a merge conflict with another open PR 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.

Reporter-trust gate held hive-authored PR 15020 via sibling PR 15017; hold unattributed on tracker

1 participant