Repository navigation
🌱 Stop agents refreshing merely-behind PRs and track merge churn - #19280
Conversation
On current-base repositories the merge lane is the one preparation owner. The ci-maintainer, quality and scanner prompts no longer refresh a PR that is only behind its base; they touch a behind branch only to repair a real conflict. ci-maintainer-full gains a standing weekly Merge Churn measurement with named thresholds and one issue per repository. Fixes #19279 Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[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
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. ℹ️ Sentinel: informational, author is trusted (owner), merge is not blocked. Head
No |
There was a problem hiding this comment.
Correctness review (head c56f9f8): the change matches #19279 - item 4 is replaced in all nine ci-maintainer/quality variants, scanner-full step 1 no longer calls update_pull_request_branch on a merely-behind PR, and the ratchet tests cover both. Two low-severity nits in the Merge Churn spec in ci-maintainer-full.md; neither blocks:
- Cadence gate drifts. "Skip if your newest
merge churnbead is less than 7 days old" means a bead written Monday 10:00 causes a Monday 09:00 kick the next week to skip, so a whole week is lost. Prefer: skip only if a bead titledmerge churn: week of <this Monday>already exists. - Cancelled-run query lacks an event filter. Measurement 2's
actions/runs?head_sha=<parent>&status=cancelledshould add&event=pull_request, or non-pull_request cancellations inflaterefresh_cancelled_run_shareagainst a pull_request-only denominator.
-- hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.328
Fixes #19279
What
Agents stop refreshing merely-behind PRs. On repositories using the current-base gate (
auto_merge.require_current_base), the merge lane is the one preparation owner. Every extra refresh reran all pull_request CI, cancelled the run in flight and restarted preparation.update-branch") is replaced in all nine ci-maintainer and quality variants (identical block, includingci-maintainer-full.mdand the duplicate inquality-full.md). Agents defer to the preparation owner, assume the gate applies when unsure, and touch a behind branch only to repair a real conflict (CONFLICTING/DIRTY, orgit merge-treeexit 1). The shared-baselineMERGE_BASErepair of a red check still applies.scanner-full.mdconflict step 1 no longer calls MCPupdate_pull_request_branchon a branch that is simply behind.src/policies/mirrors are updated byte-identically (source_sync).ci-maintainer-full gets a standing Merge Churn goal: a weekly bead (
merge churn: week of <date>) measuring App base refreshes per merged PR, pull_request runs cancelled on heads a refresh replaced, release cadence, and approval-to-merge latency (bounded to the 100 most recent merged PRs, measurement only). It keeps one open[ci-maintainer] Merge churn over threshold in <owner/repo>issue while any named threshold is crossed:refreshes_per_merged_prrefresh_cancelled_run_sharerelease_merges_per_dayapproval_to_merge_median/approval_to_merge_p90Tests and docs
ci_throughput_test.go: the existing ratchet keepsupdate-branchand now also requiresdefer to the preparation ownerandauto_merge.require_current_basein every variant; newTestPoliciesDoNotRefreshMerelyBehindPRsbans the old phrases in every embedded policy; newTestCIMaintainerFullTracksMergeChurnpins the churn section and threshold names.src/docs/hive-merge.md: new subsection after "Final base preparation" with the rule and the threshold table.changelog.d/changed-19279-merge-churn-ci-maintainer.md.Not changed: the automerge staleness and coalescing code (handled separately), and the other ci-maintainer variants do not get the churn goal (full mode only).