Skip to content

πŸ› Treat changelog-only base moves as current in the current-base gate - #19270

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/changelog-only-base-current
Nov 19, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/changelog-only-base-current

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #19269

What

currentBaseGate now checks, when a head is behind, whether the base moved only by changelog bookkeeping. It compares the PR's merge base with the base tip; if every changed file is the root CHANGELOG.md or under the root changelog.d/ (constants changelogOnlyFile and changelogOnlyFragmentDir) and the PR changes none of those same files, the head is reported current and logged with reason="behind only by changelog-only commits". It is not refreshed and does not enter base preparation.

Fail closed

Any of these keeps today's behavior (stale, refreshed): missing merge base, API error on the second compare, compare status other than ahead, zero commits, an empty file list, a file list at or above GitHub's 300-file cap on either side (compareFilesResponseCap), a renamed path whose previous name is off the allowlist, or a changelog path the PR also changes.

Why

On v5, 58 of 258 base moves in 48h (22%) were CHANGELOG-only release-gate merges, and each refresh costs about 16 workflow runs and 38 runner-minutes.

Tests

TestCurrentBaseGateChangelogOnlyBaseMove covers changelog-only (current), fragments-only (current), mixed (stale), nested docs/CHANGELOG.md (stale), API error (stale), truncated list (stale), empty list (stale), unexpected status (stale), overlap with the PR (stale), missing merge base (stale, no second compare) and zero behind (unchanged). TestIsChangelogOnlyPath pins the allowlist.

Docs: src/docs/hive-merge.md preparation section. Changelog fragment included.

A head behind its base only by commits touching the root CHANGELOG.md or
changelog.d/ is reported current instead of being sent to base
preparation. Fails closed on a missing merge base, API error, truncated
compare or any other path.

Fixes #19269

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@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 kellyaa 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 3 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.

File Line Mutation
src/pkg/github/automerge/automerge_current_base.go 71 CONDITIONALS_BOUNDARY
src/pkg/github/automerge/automerge_current_base.go 75 CONDITIONALS_BOUNDARY
src/pkg/github/automerge/automerge_current_base.go 84 CONDITIONALS_NEGATION

Verdict: lived (#17349).

@github-actions

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
#19275 πŸ› Coalesce base preparation refreshes and keep a ready owner in front same files src/docs/hive-merge.md
src/pkg/github/automerge/automerge_current_base.go
#19277 🌱 Skip heavy CI jobs on refresh-only pull request heads same files src/docs/hive-merge.md

@hivecommons-hive
hivecommons-hive Bot merged commit 633211b into v5 Nov 19, 2026
95 of 96 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/changelog-only-base-current branch November 19, 2026 17:02
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#19270368e8a7` sha256:9241bddd133011b404a7626644a1e37d237d163a66f01fd6093510130aa572e1 β€” download from the dashboard or `hivectl review evidence #19270`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› Changelog-only base moves make green heads stale and trigger refreshes

1 participant