Skip to content

fix(ci): compare the changelog gate against the base the pull request was merged with - #1340

Open
gcs8 wants to merge 2 commits into
mainfrom
fix/changelog-gate-merge-base
Open

gcs8 wants to merge 2 commits into
mainfrom
fix/changelog-gate-merge-base

Conversation

@gcs8

@gcs8 gcs8 commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Refs #1339

What

The Changelog entry job now compares the pull request against the base it was actually merged with.

  • scripts/check_changelog_entry.py gains --merged-head <commit>. With it, --head must be the merge commit of that head into the base branch: exactly two parents, the pull request head second. The first parent is used as the base. Any other commit is refused with exit code 2, so the job never guesses a base. --base still works for local use; exactly one of the two is required.
  • The workflow passes the pull request head commit instead of the base commit recorded in the event payload.
  • CONTRIBUTING.md says what "the base" means in CI.

Why

The recorded base commit stays where the pull request opened. After another pull request merged a fragment, the job counted that fragment against every open pull request and failed them. It could also miss a change to a fragment that reached the base branch after the pull request opened.

Tests

Four new tests build a small repository with the same shape (another pull request merges first, then the merge commit of this one):

  • the base taken from the merge commit passes, and the base recorded at opening is shown to refuse the same commit;
  • a pull request that takes the base branch and then drops the other fragment is refused;
  • a commit that is not this pull request's merge is refused (not a merge, wrong second parent, swapped parents, abbreviated id, option-like text, a ref name, empty);
  • the command line takes one base source, not both and not none.

One existing workflow contract test pinned the old input; its assertion on that input is replaced by assertions on the new one. No test was removed.

Checked against real merge commits of open pull requests: the one that fails today passes with the new input and still fails with the old one; two that pass today pass with both.

Not changed

The checks themselves, labels, advisory mode, release-cut handling and the release coverage script are untouched. Two other steps read the same recorded base commit; they are named in the issue and left alone here.

… was merged with

The Changelog entry job compared the checked-out merge commit with the base
commit recorded in the event payload. That commit stays where the pull request
opened, so after another pull request merged, its fragment was counted against
every open pull request, and a change to a fragment that reached the base
branch later could go unseen.

The script now takes the base from the first parent of the merge commit, after
confirming the second parent is the pull request head, and refuses any other
commit. The workflow passes the head commit instead of the recorded base.

Refs #1339
@github-actions github-actions Bot added the bug Something isn't working label Nov 17, 2026
@gcs8
gcs8 marked this pull request as ready for review November 17, 2026 05:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T05:31:47.514444Z e83ee40 Manual request
🔒 Security Review ✅ Completed 2026-11-17T05:34:20.172432Z e83ee40 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gcs8

gcs8 commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: e83ee40b8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: e83ee40b8e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

This branch has not been deployed

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant