Repository navigation
✨ feat(github): enforce pin-only exception in merge-request relay - #16456
hivecommons-hive[bot] wants to merge 6 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Apply the configured trusted-author pin policy only with a complete changed-file list and an exact requested head, rechecking the head after reading patches. Preserve the existing hold behavior on rejection and all later merge gates. Hive-Run: #16265 Hive-Plan: merge-request-relay Hive-Spec: #16265#Changes Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
…rge-request relay The relay's pin-only exception was written against the sweep as it stood before #16399 added verified-commit provenance and upstream action-pin anchoring, so after rebasing onto v5 the relay would have been the one App merge path that admitted a pin-only diff on the PR author login alone. Lift the sweep's provenance helpers into pkg/github and have both the sweep and the relay call them, so the three merge paths cannot disagree. Refs #16265, #16399 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
aadac19 to
3a7f39e
Compare
|
Rebased The rebase also exposed a semantic gap: the relay's exception predates #16399, so it would have admitted a pin-only diff on the PR author login alone while the sweep and hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
docs-currency (reviewed current head 3a7f39e; the dispatched head aadac19 has been superseded on this branch)
The doc updates in src/docs/hive-merge.md and src/docs/operator-reference/README.md match what mergeRequestHumanMergePathRefusal / pinOnlyProvenance now do (src/pkg/github/human_merge_paths.go:269-316). Two operator-facing statements were missed:
changelog.d/added-pin-only-human-merge-sweep.md:1(unreleased, same release notes as the new fragment) still ends with "and thehive-mergerelay does not apply the exception yet (#16265)". Rendered together withchangelog.d/added-pin-only-human-merge-relay.md:1, the release notes contradict themselves. Drop that trailing clause (or reword to "the relay enforcement landed separately").src/docs/hive-merge.md:261— "relay admission (#16265), and sweep admission (#16266, landed) are separate changes" marks only the sweep as landed; with this PR the relay is too. Mark it(#16265, landed)or drop the per-item markers.
Nit, no action required: src/docs/operator-reference/README.md:257 describes the conditions as "The sweep does not place a … hold"; the same sentence now applies to the GitHub relay as well.
— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
golangci-lint (unused) flagged the Engine-level wrapper; the relay and sweep call hgithub.PinOnlyTrustedCommitter directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Correctness re-review at 3a7f39e5 (delta vs aadac19f is almost entirely the v5 rebase; the PR's own diff is 12 files).
New in the delta — blocks CI:
src/pkg/github/automerge/automerge_human_paths.go:139—pinOnlyTrustedCommitteris now a one-line wrapper aroundhgithub.PinOnlyTrustedCommitter, but its only caller (the old in-packagepinOnlyCommitsTrustedbody) was deleted when the logic moved tosrc/pkg/github/pin_only_provenance.go:66. golangci-lint on this head fails withfunc pinOnlyTrustedCommitter is unused (unused)(run 41688343489). Fix: delete the wrapper (and its mention in the comment at lines 123–126);pinOnlyTrustedLoginis still used at line 102 and can stay.
Previous findings at this head:
- [correctness] relay trusted-author match without
TrimSpace— fixed:human_merge_paths.go:270now callsPinOnlyTrustedLogin, which trims both sides (pin_only_provenance.go:30-41), so relay and sweep share one matcher. - [docs-currency]
changelog.d/added-pin-only-human-merge-sweep.md:1still says the relay "does not apply the exception yet" — still present (not re-filed here). - [docs-currency]
src/docs/hive-merge.md:261rollout paragraph still marks only sweep admission as landed — still present (not re-filed here).
Relay logic itself checks out: requested-head binding before (human_merge_paths.go:273) and after the file listing (:313-316), exact changed-file count (:275), full-diff classification, shared commit provenance and upstream anchoring, all fail-closed; TestMergeRequestPinOnlyException covers each refusal branch and the test (rest *) shards pass on this head.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Style review at head Dead wrapper left behind by the helper extraction — Otherwise the extraction into Reviewed by Reviewer notesRead the relay gate, the sweep's exemption and the moved helpers at What I verified
No findings. One note for the operator: this is a relaxation of a merge gate, but it is dormant until a repo has an enabled Review findings from Code looks correct to me; routing only because it changes App merge policy. What I verified in the tree at
Body vs diff: the body is the adoption boilerplate for #16398 (closed, same head lineage); the diff matches the issue spec. The two refactor commits ( Open question for the approver only (not a defect): #16265 was scanner-filed under epic #16242. Enabling the relay exception means a PR by a |
…s pending, not amber (#16545) * 🐛 Activity Monitor: never more than two lit chevrons; unreported CI is pending, not amber Rows lit three chevrons (PR in progress + "CI 7/11 · test not reported" + a decided review), and a row waiting on its contributor lit CI although nothing was running — checks not reported are simply not scheduled. - stageTrackerTrackRunning: a CI / Review track is amber only on motion evidence on the current head (check-run in_progress/queued, reviewer running/queued, or the backend active flag); never while the row waits on a person (071/072 waiting_owner, hold, needs-human). - Words without motion (missing/unknown/skipped, swarm requested, re-review pending) wear the new .pending class: current-phase text, muted field. - Both tracks running: the stage chevron is settled-current (bright words, no amber, no pulse) and its tooltip says it waits on CI and review. - Tests: every rows fixture asserts count(lit) <= 2 (prelude wrapper); cases for #16509 (one lit), #16268 waiting_owner (exactly one lit) and three-qualify (tracks win); node shapes in the remediation chevron test; existing expectations moved from active to pending where nothing runs. Fixes #16540 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🐛 Tracks are filled only while running; queued swarm counts 0/N - CSS: .done / .failing / .pending / .decided on a CI or Review track are words in their colour (green pass, red finding, muted pending) on the muted field — only a running track (.active) is filled. A PR-in-progress row with changes requested shows exactly one filled chevron. - Go: stageTrackerCountPerspectives zeroes perspectives_done when the swarm is unassigned (requested / queued), so "Review 5/5 · swarm requested" cannot occur; total falls back to the configured set. - Tests: Go count case (#16539 shape), rows fixture (#16456 row → 1 lit), node shapes + CSS pins; lift the new helpers in the human-attention test (runtime-tests failure on this PR). Refs #16540 Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
@clubanderson asked the hive to re-author this pull request as a hive PR: its head cannot merge as-is (commits without a Signed-off-by), so the hive re-homes the commits on a hive-owned, signed-off branch and opens a superseding PR; this one is closed when that merges. The author's commits are preserved and attributed.
|
|
Not superseding: this PR is the hive's own ( |
|
Re-authoring: the hive's fixer gave up on this PR after 6 attempts on |
Supersedes #16398 (adopted after CI went red and the contributor was unavailable; original commits by @thatguywob preserved).
Fixes #16265
This branch is #16398's head
aadac19fdca4as pushed by @thatguywob (forkthatguywob/hive), unchanged. Last lane reason on the original:conflicting.Hive fix agent: rebase this branch on
v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and theirSigned-off-by; add your own sign-off on your commits. Do not open another PR.Conflicts with
v5: 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.