Skip to content

✨ feat(config): stage bounded human-merge pin-only policy and classifier - #16297

Closed
mendezr wants to merge 2 commits into
hivecommons:v5from
mendezr:feat/trusted-pin-exception-16242
Closed

mendezr wants to merge 2 commits into
hivecommons:v5from
mendezr:feat/trusted-pin-exception-16242

Conversation

@mendezr

@mendezr mendezr commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Implement the missing shared foundation described in child [scanner] human-merge pin-only exception: config schema + pure pin-only diff classifier #16262: validated per-repository auto_merge.human_merge_pin_only, defensive case-insensitive lookup, and a pure intent.ClassifyPinOnly syntax classifier.
  • Carry files-API patches through the shared relay/sweep file lister. Reject missing/truncated patches, mismatched counts, mixed changes, new/renamed files, unapproved paths/kinds, source changes and unsafe replacements.
  • Document the actual schema, narrow grammar, controller config-file reload mechanism, and deployment limitations.

Closes #16262
Refs #16242 — partial: relay integration (#16265), sweep and /approve integration (#16266), native-queue consistency, authenticated trust/exact-head/upstream-review evidence, attributed hold-release wiring (#16269 / #16293), and deployed positive/negative evidence for projectbluefin/utah#1082 remain outstanding. This PR does not enable an exception, clear holds, authorize projectbluefin/utah#1068, or claim a deployable minimum version.

Safety / integration contract

ClassifyPinOnly proves syntax only, not merge authorization. Callers must independently establish authenticated trusted authorship, a complete exact-current-head diff, semantic context and review of referenced upstream changes. Actual required checks and producer bindings, freshness, current reviews, substantive objections, unrelated holds and soak remain mandatory. No admission gate is changed here; every existing human-merge-path protection remains in force.

The classifier checks the entire supplied PR rather than only its guarded subset. Supported reference forms are deliberately narrow; unknown input fails closed. Configuration paths are intersected with actual human-merge matches at classification time instead of attempting static glob-language containment.

Validation

  • Added table-driven config and classifier tests, including pure action/digest/version pins, mixed permission/pin and added-step changes, missing/truncated patches, incomplete matched files, source changes, ownership/signing text, disabled/invalid policy, and ambiguous repository keys.
  • Added HTTP-backed shared file-evidence tests (including incomplete list rejection), and extended sweep pagination coverage to assert patch propagation.
  • gofmt -l on changed Go files: clean.
  • git diff --check: clean.
  • Go tests not run locally, as required by AGENTS.md; CI supplies the test verdict. Real-admission negative/positive coverage belongs to the integration children, not to this syntax-only foundation.

Informational trailer identifiers use the issue's ordered-child plan and required-behavior section; no Spektacular clause identifiers were supplied.

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

Closes #16242


🐝 Hive Agent: contributor | SHA: 18f77a0f5

Implement the shared foundation from hivecommons#16262 for hivecommons#16242 without loosening any merge admission gate. Carry complete patch evidence, reject unsupported or mixed diffs, and make the remaining trust, review and exact-head obligations explicit.

Hive-Run: hivecommons#16242
Hive-Plan: ordered-children/16262-config-and-classifier
Hive-Spec: issue-16242#required-behavior
Co-authored-by: hanthor <5840441+hanthor@users.noreply.github.com>
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 nicholasjackson 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/XL Denotes a PR that changes 500-999 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:

  • build-and-test

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 session received this as a fix-pr task and launched a parallel fix session; your current work continues.

Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@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:

  • coverage

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.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@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
#16291 ✨ feature: persist single-admitter condition episodes same files src/pkg/config/config.go
src/pkg/config/validate.go
#16293 🐛 fix(github): attribute human-merge path holds and document pin-only rollout CONFLICT src/docs/hive-merge.md
#16288 🐛 fix(automerge): fence preparation settlement by live identity same files src/docs/hive-merge.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Superseded by hive: re-authored as #16300 with the same commits and sign-off because the author's clanker is offline. This PR is closed; if #16300 fails, hive reopens it.

@hivecommons-hive hivecommons-hive Bot added the hive/superseded Closed by Hive: a different merged PR already landed this change label Nov 2, 2026
@hivecommons-hive hivecommons-hive Bot closed this Nov 2, 2026
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. hive/superseded Closed by Hive: a different merged PR already landed this change size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

1 participant