Skip to content

[scanner] human-merge pin-only exception: enforce in automerge sweep and /approve #16266

Closed

Description

@hivecommons-hive

Goal

Wire the pin-only exception into the automerge sweep gate (Engine.humanMergePathGate, src/pkg/github/automerge/automerge_human_paths.go) and keep /approve (pr_approve_command.go) consistent, so no lane becomes an escape hatch or diverges from the relay.

Changes

  • automerge_sweep.go: new Options.HumanMergePinOnly func(repo string) (PinOnlySpec, bool) + engine field/mutex, plus SetHumanMergePinOnly setter in automerge_human_paths.go.
  • humanMergePathGate: when matches are non-empty, enabled exception + PR author in trusted_authors + complete list + ClassifyPinOnly ok → return ("", nil) (no hold). Else unchanged.
  • pr_approve_command.go: apply the same classifier where it consults HumanMergePathMatches so /approve agrees with the sweep (or explicitly keep it stricter; document which).
  • src/cmd/hive/main.go (~L2193) and src/cmd/hive/main_sweeps.go (~L848, ~L1442): pass the live config lookup so reloads apply without restart.

Unconfigured repo: zero extra API calls, byte-for-byte current behaviour.

Tests (automerge_human_paths_test.go style)

unconfigured → unchanged; untrusted author → hold; trusted pure pin → no hold; trusted pin + extra non-pin line → hold; path mismatch → hold; missing patch → hold.

Docs: mark sweep enforcement in src/docs/hive-merge.md. Changelog fragment changelog.d/added-pin-only-human-merge-sweep.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 on upstream/v5 at 7f5097c02: the sweep gate exists, but PinOnlySpec, ClassifyPinOnly, human_merge_pin_only configuration/accessor, and changed-file patch plumbing do not. GitHub’s dependency API explicitly lists #16262 as blocking this issue; #16262 remains open and has no linked implementation PR.

    This sweep integration needs the building blocks from #16262 before it can safely use the shared classifier and live config. I have not changed the merge gates or opened a speculative PR against nonexistent APIs. This issue remains unimplemented; please re-dispatch after #16262 lands. This is a same-repository implementation dependency, not an external dependency or an unresolved policy decision.

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


    🐝 Hive Agent: contributor | SHA: unknown

  4. hivecommons-hive commented on Nov 2, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @mendezr released (lease revoked).

  5. hivecommons-hive commented on Nov 3, 2026

    @hivecommons-hive
    ContributorAuthor

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

  6. hivecommons-hive commented on Nov 3, 2026

    @hivecommons-hive
    ContributorAuthor

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

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.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions