Repository navigation
✨ feat(settings): expose merge-train controls in Auto-merge - #16680
Conversation
Expose nested merge-train controls with owner-only partial API updates and persistence-aware explicit-zero stall warnings. Hive-Run: hivecommons#16677 Hive-Plan: merge-train-settings Hive-Spec: hivecommons#16677#proposed Signed-off-by: thatguywob <thatguywob@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
|
hive/awaiting-ci: CI pending — sweep will merge when green. — hive: agent=scanner backend=codex model=gpt-6.1-sol effort=high 🐝 Hive Agent: |
|
@thatguywob this PR is back in your court ( Failing checks:
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 |
Resync the 201 route citations shifted by the new merge-train PATCH registrations using the repository citation fixer. Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
Document the registered auto-merge and governor PATCH routes in OpenAPI and the API reference, including merge-train validation and effective responses. Fixes the CI route parity failure. Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
There was a problem hiding this comment.
Read the tree at this head, including the consumers — looks correct to me. The three claims in the body that could have been wrong are not:
- Explicit zero disables warnings.
pkg/dashboard/stage_tracker_merge_train_postpass.go:271already guardsopts.StallWarn > 0, so a 0 fromMergeTrainStallWarn()(pkg/config/config.go:5289, now honouringmergeTrainStallWarnSet) turns the stall flag off rather than marking every head stalled. - Zero survives YAML persistence.
MarshalYAMLappendsmerge_train_stall_warn_s: 0under thegovernormapping (config.go:7184-7189); that mapping always exists becauseGovernoris taggedyaml:"governor"withoutomitempty(config.go:83), and the loader only setsmergeTrainStallWarnSetwhen the key is present and non-null, so the round trip is stable. - Rollback on failed save.
api_config_automerge.go:280snapshotscfg.AutoMergebefore the merge-train writes at:281-288and restores it at:389-390;MergeTrain.Enabledis replaced with a fresh pointer, not mutated through the old one, so the snapshot is intact. The newhandleGovernorMergeTrainPatch(api_governor_merge_train.go:28-35) does the same forcfg.Governorand is behindrequireOwnerRole.
Nothing here needs a human to re-derive; the remaining checks were still running when I read it.
— hive: agent=reviewer 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 Read the Go and JS changes against the What I verified:
Not read line-by-line: the regenerated Note for the maintainer: the PR is opened from |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Ready for a human merge: verdict approved @1d3610d, 65/65 checks green, DCO yes, soak 10m0s elapsed. Blocked only by The hive never approves on your behalf: |
|
/lgtm Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
@hivecommons-hive[bot]: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/approve Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
There was a problem hiding this comment.
Approved by @clubanderson for Hive auto-merge on green CI.
Approved from the Hive dashboard by @clubanderson as the owner decision on a Ready-for-human-merge pull request; the hive's merge sweep merges it on green CI.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hivecommons-hive[bot] 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 |
|
@hivecommons-hive[bot]: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hive queued this PR but could not set the |
Operators currently have to edit YAML to tune the conflict-aware merge train. Add a Merge train block under Settings → Auto-merge, immediately above Native GitHub merge queue, with the enabled switch, rebase attempts per front, and stall-warning seconds. Each control includes its YAML hint and help text; the operator reference and copy inventory document the same controls.
Add owner-only partial PATCH support for the nested auto-merge settings and governor stall warning, retain the existing auto-merge PUT writer, and echo effective values with bot-author metadata. Reject invalid values before mutation, roll back failed saves, and audit changes as config_auto_merge/config_governor. Explicit zero stall-warning seconds now disables warnings and survives YAML persistence; omitted settings retain the 3600-second default. Zero rebase attempts retains the existing default of two.
Validation: added API round-trip, validation, ownership, save-failure rollback, audit, YAML persistence, and static settings/YAML-hint coverage. Tests, builds, linters, and guards were not run locally per AGENTS.md; CI is the validation authority. Go files were formatted with gofmt, and the generated dashboard HTML was updated from its manifest sources.
Closes #16677
— hive: agent=scanner backend=codex model=gpt-6.1-sol effort=high
🐝 Hive Agent:
contributor| SHA:175fe6b25