Repository navigation
✨ auto-merge: 'merge only on current base' switch in Features + per-repo override - #15455
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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
stage 080-awaiting-merge-admission → 071-needs-author: optional-check-failing:relative links and anchors resolve |
975075a to
b767272
Compare
…epo override Expose the current-base merge gate (#13634) as an operator switch rather than the fleet-wide default #15442 shipped. Settings → Features → Auto-merge gains "Merge only on current base" (auto_merge.require_current_base_default, now OFF by default); each Repos-tab row gets an inherit / on / off override written to auto_merge.require_current_base / auto_merge.skip_current_base, and the repo card shows a current-base chip when the effective value is on (requireCurrentBase on /api/status repos). Resolution: explicit on beats explicit skip beats the default. Explicitly listed repos are strict; a repo gated only by the default merges a head the App cannot update (fork without maintainer edits, branch protection) as tested, with one WARN per PR, so fork-heavy repos are not parked wholesale. The default stays off: the merge train already update-branches overlapping siblings, and the gate soaks on hive's own hive first (auto_merge.require_current_base: [hivecommons/hive] is live there). Refs #15335, #15442 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
b767272 to
95b5885
Compare
|
hive/awaiting-ci: rebased onto v5 (api-reference citation drift only, author/sign-off preserved); CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
@clubanderson this PR is back in your court (
Once the new head lands, CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
stage 080-awaiting-merge-admission → 071-needs-author: hive-signoff-attribution |
There was a problem hiding this comment.
Read the diff against v5 plus the resolution path it changes: RequireCurrentBaseFor / CurrentBaseOverrideFor / SetCurrentBaseOverride (config.go:8518-8590), the PUT handlers in api_config_automerge.go:294 and api_governor.go:3141, the sweep consumer in automerge_current_base.go:112, and the Repos-tab JS that produces the tri-state payload. Looks correct to me.
What I verified:
- Resolution order is unchanged and now shared: explicit
require_current_base→skip_current_base→ default. The only semantic change isRequireCurrentBaseDefault == nilresolving to off (CurrentBaseDefaultEnabled,config.go:8529) where #15442 had it resolving to on. The body states this is the owner's decision after #15335; I am taking that as decided, not re-asking. SetCurrentBaseOverridedrops the repo from both lists before adding to one (config.go:8567-8588), so a repo can never be in both;nilleaves it in neither. The JS payload sendsnullfor every non-overridden repo (repoCurrentBasePayload), which reaches the server as a no-op drop — harmless, just noting the shape.handleGovernorReposaddsRepoCurrentBase != niltoholdOnlyso an override-only body passes the "at least one repo" guard, and the bare-name →org/nameexpansion matches how the auto_merge lists are keyed.- The strict/fallback split in
currentBaseGateis untouched —requireCurrentBaseStrictForstill keys off the explicit list, so a repo gated only by the (now opt-in) default keeps the one-WARN merge-as-tested path for non-updatable fork heads. - Deleting
changelog.d/changed-automerge-require-current-base-default.mdis safe: the commit that added it (3feba13, #15442) is onv5but in no tag, so no released changelog claimed default-on. static/index.htmlis regenerated in step withstatic-src.
One note, not a defect: the body says Refs #15335 because the gate keeps soaking on hivecommons/hive with the fleet default off. That reads as intentional (the issue stays open as the soak tracker), but if #15335 was only ever asking for the switch, Closes would stop it lingering in the queue.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
What
Adds the current-base merge gate (#13634) as an operator switch instead of a fleet-wide default:
auto_merge.require_current_base_defaultthrough the existing auto-merge save path. Default remains off.auto_merge.require_current_base, off →auto_merge.skip_current_base, inherit → removed from both.current-basechip when the effective value is on;/api/statusrepos carryrequireCurrentBase,/api/config/governorcarriescurrentBaseDefault+repoCurrentBase{effective,value?},/api/config/auto-mergeexposes all three keys.require_current_baseentry wins overskip_current_base, which wins over the default. Explicitly listed repos are strict (a behind head the App cannot update is parked); repos gated only by the default fall back to merging as tested with one WARN per PR (automerge current-base gate: … merging as tested), so fork-heavy repos are never parked wholesale.Why the default stays off
#15335: a stale-green merge (#15236) broke
v5for every open PR for ~20 minutes, and the gate (one compare per merge candidate; behind heads get GitHub update-branch and re-run CI) would have caught it. The owner's decision after review is not to flip it on fleet-wide yet:auto_merge.require_current_base: [hivecommons/hive]is already live there (applied and restarted in [quality] Gate config: opt hivecommons/hive into auto_merge.require_current_base — stale-green merge of #15236 broke v5 for 20 min #15335) — and any hive can opt in per repo or hive-wide from the dashboard.Opt-in / opt-out keys
auto_merge.require_current_base_defaultfalseauto_merge.require_current_baseauto_merge.skip_current_baseTests
pkg/config: effective-value table (default off / default on / explicit on / explicit skip / both lists → explicit wins; skip beats default), strict resolution, override round-trip.pkg/github/automerge:TestCurrentBaseGateUpdateUnavailableFallback(fork-not-editable / 403 → strict parks, default-gated merges as tested with one WARN per PR).pkg/dashboard: auto-merge PUT round-trip, governor repos override save (override-only body accepted, list moves, null clears), statusrequireCurrentBase, node-harness guard for the Features toggle label/help/data-key, Repos-tab row and card chip; settings parity +TestIndexHTMLIsGenerated(index regenerated viago generate).Docs: operator-reference rows for all three keys, dashboard-sections.md (Projects), dashboard-copy-inventory.md. Changelog
added-automerge-current-base-switch.md.Refs #15335, #15442