Skip to content

🐛 fix(github): attribute human-merge path holds and document pin-only rollout - #16293

Merged
clubanderson merged 3 commits into
hivecommons:v5from
mendezr:fix/pin-human-merge-16269
Nov 2, 2026
Merged

clubanderson merged 3 commits into
hivecommons:v5from
mendezr:fix/pin-human-merge-16269

Conversation

@mendezr

@mendezr mendezr commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Attribute newly applied human-merge-path holds to a verified exact head, retaining the legacy marker and refusing to claim pre-existing holds.
  • Add ReleaseHumanMergePathHold, a shared, fail-closed API requiring a later qualified head, configured App identity, an unedited attributed App notice, and complete label-event history. Human/re-added/ambiguous holds remain untouched.
  • Document the planned configuration, file-watcher reload path, deployment prerequisites, and preserved checks/reviews/freshness/soak. Add the requested changelog fragment.

Refs #16269 — partial: automatic release still needs wiring after qualification in the relay and sweep once #16262, #16265 and #16266 provide their APIs; a concrete minimum released version and live Utah deployment evidence also remain outstanding. This PR deliberately does not duplicate their classifier or enable an exception on a branch that lacks its schema. Parent: #16242.

Integration contract

Call github.ReleaseHumanMergePathHold(ctx, ghClient, owner, repo, number, appLogin, expectedHead, qualified) only after enabled pin-only admission qualifies that exact head. Re-read labels afterwards and preserve the existing exact-head merge guard and every other gate. Legacy/edited notices, multiple hold transitions, or unavailable history fail closed. The new API has no production release callers in this partial PR.

Validation

  • Added HTTP-backed tests for a qualifying App-only hold, human hold, human re-addition, non-qualification, timeline failure, legacy/edited notices, changed head, and new-vs-pre-existing hold attribution.
  • gofmt -l on changed Go files: clean.
  • git diff --check: clean.
  • Go tests not run locally, per AGENTS.md; CI is the test verdict.

— hive: backend=pi model=openai-codex/gpt-6.1-sol

Closes #16269


🐝 Hive Agent: contributor | SHA: 78d7d84fa

Provide a conservative shared release API and document pin-only rollout prerequisites. Admission integration remains pending the classifier/config and relay/sweep siblings.

Hive-Run: hivecommons#16269
Hive-Plan: human-merge pin-only hold attribution and operator rollout
Hive-Spec: hivecommons#16269#changes
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 2, 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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 2, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@mendezr this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • test (rest 3/4)

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay could not take this as a fix-pr task (Hub is not the active polling slot); the hive will retry it from your relay fix queue.

Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 2, 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
#16300 ✨ feat(config): stage bounded human-merge pin-only policy and classifier CONFLICT src/docs/hive-merge.md

@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 should decide whether this pin-only groundwork (a new ReleaseHumanMergePathHold API with no production caller yet, plus head attribution on new hold comments) should land now, ahead of its consumers #16262/#16265/#16266 under #16242.

Conclusion: The code is fail-closed and I found no defect; the question is sequencing, which is a maintainer's call, not mine.

What I verified from the tree:

  • src/pkg/github/human_merge_path_release.go:38 — ReleaseHumanMergePathHold has no caller outside its own test (grep across src/); the only runtime effect of this PR is human_merge_paths.go:103-118,130-133, which appends <!-- hive-human-merge-path-head: <sha> --> to a new hold comment when the live head matches and the hold label was not already present. Both call sites (automerge_human_paths.go:74, human_merge_paths.go:218) now pass pr.GetHead().GetSHA(); the variadic head ...string keeps the exported signature source-compatible.
  • Every ambiguous path in the release function returns (false, nil): wrong/short head, non-App or non-Bot comment author, a second marker comment, an edited comment (UpdatedAt != CreatedAt), a marker equal to the current head, any labeled/unlabeled transition other than exactly one App-applied labeled within 60 s before the notice, and a head change between the two PullRequests.Get calls. That matches the contract in the doc comment.
  • human_merge_path_release.go:150 gates the label removal as writeback.KindHoldGateNotice, which writeback/kinds.go:126 marks OwnOnly: true and gate.go:442 enforces as "only ever writes on hive-authored items". So, as written, the release can only ever fire on an App-authored PR. If the pin-only exception is meant to cover human-authored pin bumps too, this is the line that will block it; if it is meant for Hive pin PRs only, this is correct and worth stating in src/docs/hive-merge.md. Not a defect, but the consumers should know before they wire it.

Body and diff agree: the body and src/docs/hive-merge.md:157-178 both say this change alone does not enable the exception.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

Head: verdict requires_human @82b9781, 59/59 checks green, DCO yes, soak 10m0s elapsed.

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. An ordinary contributor cannot release their own PR.

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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

Head: verdict requires_human @82b9781, 59/59 checks green, DCO yes, soak 10m0s elapsed.

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

Copy link
Copy Markdown
Member

Decision (owner): land now; consumers #16262/#16265/#16266 follow under #16242.

@clubanderson
clubanderson merged commit 96246e6 into hivecommons:v5 Nov 2, 2026
66 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] human-merge pin-only exception: attributed hold clearing + operator docs

2 participants