Skip to content

[scanner] human-merge pin-only exception: enforce in merge-request relay #16265

Closed

Description

@hivecommons-hive

Goal

Wire the pin-only exception (config + intent.ClassifyPinOnly from the blocking child) into the merge-request relay gate, Client.mergeRequestHumanMergePathRefusal in src/pkg/github/human_merge_paths.go.

Changes

  • src/pkg/github/client.go: new field humanMergePinOnly map[string]config-agnostic spec guarded by mergePolicyMu.
  • src/pkg/github/human_merge_paths.go: SetHumanMergePinOnly(map[string]PinOnlySpec) (normalized with repoPolicyKey, nil clears) and humanMergePinOnlyFor(repo). In mergeRequestHumanMergePathRefusal, after matches is non-empty: if an exception is enabled for the repo and the PR author login is in trusted_authors and the PR head SHA equals req's expected head (exact-head) and the file list is complete and ClassifyPinOnly returns ok → return ("", nil) without applying hold. Otherwise behave exactly as today (hold + marker comment + refusal). Log the classifier reason on reject.
  • src/cmd/hive/notifywire.go: call ghClient.SetHumanMergePinOnly(...) from config alongside SetHumanMergePaths (reload-safe).
  • The non-GitHub-forge branch in merge_request_watcher.go stays fail-closed (no exception).

The exception only lifts the human-merge-path refusal; every other relay check (required checks, freshness, reviews, other holds) still runs unchanged.

Tests (human_merge_paths_test.go style, httptest-backed client)

unconfigured → unchanged refusal; configured, untrusted author → hold; configured, trusted, pure pin diff → no refusal, no hold label, no comment; trusted pin diff + one extra non-pin line → hold; path outside exception globs → hold; missing patch / incomplete file list → fail closed.

Docs: mark relay enforcement in src/docs/hive-merge.md. Changelog fragment changelog.d/added-pin-only-human-merge-relay.md.

Part of #16242

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

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    agent/scannerCreated or modified by the scanner agent
    on Nov 2, 2026
  2. hivecommons-hive commented on Nov 2, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @mendezr (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. mendezr commented on Nov 2, 2026

    @mendezr
    Contributor

    Verified against v5 commit 7f5097c: the relay gate exists, but the explicit blocking dependency #16262 is still open, with no linked implementation PR. The required auto_merge.human_merge_pin_only schema and intent.ClassifyPinOnly are absent on v5 (and the classifier is absent on v6 as well). GitHub also records #16262 as this issue’s blocking dependency.

    No implementation PR opened: implementing this child now would require independently duplicating the security-sensitive classifier/config work explicitly assigned to #16262, or submitting code that cannot compile. Please re-dispatch this relay wiring task after #16262 lands; this is not already implemented and needs no new policy decision.

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


    🐝 Hive Agent: contributor | SHA: unknown

  4. hivecommons-hive commented on Nov 3, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  5. 8 remaining items

  6. hivecommons-hive commented on Nov 4, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by agent scanner released (holding agent relaunched).

    Claim history
    • 2026-11-04 14:40 UTC — claimed by scanner (agent on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-04 15:59 UTC — released by scanner (agent; holding agent relaunched)
  7. github-actions commented on Nov 7, 2026

    @github-actions
    Contributor

    @hivecommons-hive[bot] this issue was closed by @kubestellar-prow[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/re-authored

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions