Repository navigation
fix(release/auto-changelog): stop false left-out warnings, warn when the baseline restore drops entries, and stop quietly when a newer run supersedes this one - #309
Merged
Conversation
HowardBraham
force-pushed
the
changelog-open-predecessor-pr
branch
from
November 9, 2026 19:16
50de62c to
df8628a
Compare
HowardBraham
marked this pull request as ready for review
November 9, 2026 19:16
HowardBraham
marked this pull request as draft
November 9, 2026 19:29
…the baseline restore drops entries, and stop quietly when a newer run supersedes this one Count the earlier release changelog PR before warning about left-out PRs, warn when restoring from the baseline drops entries the release branch lists, refresh stale generated warnings on a kept PR body, end a run that the release branch moved past without failing when the push that moved it started its own run, and use the gpt-6.1-terra proofreader model.
HowardBraham
force-pushed
the
changelog-open-predecessor-pr
branch
from
November 9, 2026 20:10
29a15b8 to
e6fed94
Compare
HowardBraham
marked this pull request as ready for review
November 9, 2026 20:10
…efore deciding none exists
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ac2f118. Configure here.
5 tasks
sleepytanya
previously approved these changes
Nov 9, 2026
| }) | ||
| ) { | ||
| // The kept body may carry warnings this run no longer raises. | ||
| const refreshedBody = refreshGeneratedWarnings({ |
Contributor
There was a problem hiding this comment.
"already in sync" return at line 1969 exits before createOrUpdateChangelogPr runs, so this refresh is skipped whenever CHANGELOG.md does not change?
Left-out / dropped-entries warning that no longer holds stays on the pull request.
@HowardBraham
Contributor
Author
There was a problem hiding this comment.
Ahah you found a bug, fixed now and pushed
sleepytanya
approved these changes
Nov 9, 2026
weitingsun
pushed a commit
to Poovarasan-Sandhanam/metamask-mobile
that referenced
this pull request
Nov 10, 2026
…ow (MetaMask#39274) ## **Description** Creating a `release/X.Y.Z-ota` branch starts two workflows in the same second: `update-release-changelog.yml` (on push) and `auto-create-release-pr.yml`, whose `create-release-pr.yml` also called the changelog updater in its OTA path. Both updaters generate the same changelog PR, so one of them loses the race. When the OTA step lost, its job failed and "Create OTA release PR to stable" was skipped, so no release PR to stable existed (observed on a fork with a delayed push workflow). This removes the updater call from the OTA path. The push workflow already runs for the new branch, and again for the `OTA_VERSION` bump push, so the changelog PR is still published. Expect one thing to look different: the bump moves the branch while the creation push's run may still be generating. With a released github-tools that includes MetaMask/github-tools#309, that run ends green with a `notice` annotation and the bump push's run publishes the changelog. With older github-tools versions the creation push's run can end red ("Target release branch ... changed during changelog generation"). It is a different commit than the PR head, so the PR page is not affected, and nothing is blocked. Tested on a fork (`consensys-test/metamask-mobile-howard`) with this workflow: - A natural OTA creation: the auto run succeeded and created the OTA release PR without calling the updater, and the bump push's run published the changelog PR. - A creation push run delayed by 40 s: both push runs succeeded. - A manual dispatch when the OTA release PR already exists: the bump and PR steps were skipped as before. ## **Changelog** CHANGELOG entry: null ## **Related issues** Refs: MetaMask/github-tools#309 ## **Manual testing steps** ```gherkin Feature: OTA release branch creation Scenario: a new OTA release branch is pushed Given a release/X.Y.Z-ota branch does not exist yet When the branch is created Then Auto Create Release PR creates the OTA release PR to stable And the Update Release Changelog PR workflow publishes the changelog PR And the "Update release changelog (OTA hotfix)" step no longer appears in the run ``` ## **Screenshots/Recordings** N/A, CI workflow change. ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI-only change that removes a redundant step; OTA release PR creation and changelog generation remain covered by the existing push workflow. > > **Overview** > Fixes a race when **`release/X.Y.Z-ota`** is created: **`update-release-changelog.yml`** (on push) and **`create-release-pr.yml`** both invoked the changelog updater, so duplicate changelog PRs competed and a failed updater run could skip **Create OTA release PR to stable**. > > The OTA path in **`create-release-pr.yml`** no longer runs **Update release changelog (OTA hotfix)** or passes **`AI_ANALYZER_LITELLM_KEY`** from **`auto-create-release-pr.yml`**. Changelog updates stay on the push-triggered workflow (including after the **`OTA_VERSION`** bump push). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ad2e4c7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
Two problems showed up on real Mobile and Extension release changelog PRs (Extension #47669, Mobile #39043).
CHANGELOG.mdfrom the baseline. A stale baseline changelog (for examplerelease/8.19.0before its changelog PR merged) silently removed entries the release branch already listed under earlier versions (14 entries under[8.18.0]on Mobile).What changes:
noticeannotation and stops without publishing. If no such run is found, or the lookup fails, it fails as before. This is what happens when an OTA version bump lands during the creation push's run.gpt-5.6-terratogpt-6.1-terra.Tested on the
consensys-test/metamask-mobile-howardfork with stale and complete baselines, an open and a closed predecessor PR, OTA and native release branches, and a stale warning that cleared on rerun. The superseded-run stop was tested with two pushes to one release branch, the second made while the first run was generating: the first run ended green with the notice, and the second published the changelog. Unit tests: 171 pass.References
Note
Medium Risk
Changes core release changelog generation and publication behavior, including when runs fail vs. stop quietly; mistakes could affect release PR content or miss real regressions.
Overview
Fixes several release changelog automation issues in
update-release-changelog: false “left out” warnings, silent entry loss on baseline restore, stale PR warnings, and failures when the release branch moves mid-run.Left-out PR detection now treats the earlier release’s section from its open changelog PR as listed, via
getOpenBaselineChangelogSectionandpendingSectionsonfindPrsMissingFromChangelog.Baseline restore compares the restored
CHANGELOG.mdto the release branch and surfacesdropped entrieswarnings (findEntriesDroppedByRestore,getDroppedEntriesWarning), treating reworded entries as kept when any PR number still appears.Open changelog PR bodies get generated warnings refreshed or removed through
refreshGeneratedWarnings, including when title/body are otherwise unchanged.When the release branch moves during generation, the run exits with a notice instead of failing if
hasWorkflowRunForShafinds another run of the same workflow for the new tip; otherwise behavior is unchanged.Bumps the changelog proofreader model from
gpt-5.6-terratogpt-6.1-terra, with broad unit test coverage.Reviewed by Cursor Bugbot for commit 0fae804. Bugbot is set up for automated code reviews on this repo. Configure here.