Skip to content

Conversation

@asalsys
Copy link
Contributor

@asalsys asalsys commented Dec 15, 2025

Explanation

This PR upgrades @metamask/remote-feature-flag-controller from v3.0.0 to v4.0.0 across the monorepo and bumps the monorepo version to 725.0.0.

Current State

The @metamask/remote-feature-flag-controller package is currently at version 3.0.0, which supports version-gated feature flags but lacks the ability for clients to locally override feature flag values for testing, debugging, or development purposes.

Solution

Version 4.0.0 introduces new override functionality that allows clients to set local overrides for feature flags. These overrides take precedence over remote feature flags, enabling:

  • Local testing of feature flags without modifying remote configuration
  • Debugging specific flag combinations
  • Development workflows that require flag manipulation

Changes in v4.0.0

New APIs:

  • setFlagOverride(flagName, value) - Set a local override for a specific feature flag
  • removeFlagOverride(flagName) - Clear the local override for a specific feature flag
  • clearAllFlagOverrides() - Clear all local feature flag overrides

New State Properties:

  • localOverrides - Local overrides for feature flags that take precedence over remote flags
  • rawRemoteFeatureFlags - Raw flag value for all feature flags (separate from the merged view)

New Exports:

  • RemoteFeatureFlagControllerSetFlagOverrideAction
  • RemoteFeatureFlagControllerRemoveFlagOverrideAction
  • RemoteFeatureFlagControllerClearAllFlagOverridesAction

Breaking Changes

While this release is primarily additive, it's marked as a major version bump (v4.0.0) because:

  1. New state properties (localOverrides, rawRemoteFeatureFlags) are added to the controller state, which affects state serialization/deserialization
  2. Consumers need to ensure their state migration handles these new properties
  3. Type definitions have been updated to include the new action types

Package Updates

The following packages have been updated to use @metamask/remote-feature-flag-controller@^4.0.0:

  • @metamask/bridge-controller
  • @metamask/transaction-controller
  • @metamask/transaction-pay-controller

All changelogs have been updated to document this breaking dependency upgrade.

References

  • Related to #7271 - Add override functionality to remote feature flags
  • Related to #7499 - Upgrade remote-feature-flag-controller to v4.0.0

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Upgrades @metamask/remote-feature-flag-controller to v4.0.0 with override APIs and updates all dependents; bumps monorepo to 725.0.0.

  • Dependencies:
    • Upgrade @metamask/remote-feature-flag-controller to ^4.0.0 in packages/bridge-controller, packages/transaction-controller, and packages/transaction-pay-controller.
    • Update packages/remote-feature-flag-controller to version 4.0.0 with new override APIs and state props; refresh changelog compare links.
  • Release:
    • Bump monorepo version to 725.0.0.
  • Changelogs:
    • Note the dependency bump in affected package changelogs.
  • Build/Infra:
    • Update yarn.lock to reflect dependency changes.

Written by Cursor Bugbot for commit f0d850e. This will update automatically on new commits. Configure here.

@asalsys asalsys requested review from a team as code owners December 15, 2025 17:16
@asalsys asalsys self-assigned this Dec 15, 2025

- Bump `@metamask/assets-controllers` from `^93.1.0` to `^94.1.0` ([#7444](https://github.com/MetaMask/core/pull/7444), [#7488](https://github.com/MetaMask/core/pull/7488))
- Bump `@metamask/transaction-controller` from `^62.5.0` to `^62.7.0` ([#7430](https://github.com/MetaMask/core/pull/7430), [#7494](https://github.com/MetaMask/core/pull/7494))
- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
Copy link
Contributor

@mcmire mcmire Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a note underneath this bullet point explaining how this upgrade causes breaking changes in bridge-controller?

- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
  - This change is breaking because ...

Or if this is not breaking, can you remove **BREAKING:** from this entry?

Copy link
Contributor Author

@asalsys asalsys Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update for each: - This change is breaking because the controller state structure has changed: two new persisted state properties (localOverrides and rawRemoteFeatureFlags) have been added. Consumers need to ensure their state migration handles these new properties, and TypeScript types have been updated accordingly.

updated


### Changed

- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar as above, can you add a note explaining why this is breaking or remove the **BREAKING:** prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


- Bump `@metamask/assets-controllers` from `^93.1.0` to `^94.1.0` ([#7444](https://github.com/MetaMask/core/pull/7444), [#7488](https://github.com/MetaMask/core/pull/7488))
- Bump `@metamask/transaction-controller` from `^62.6.0` to `^62.7.0` ([#7494](https://github.com/MetaMask/core/pull/7494))
- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar as above, can you add a note explaining why this is breaking or remove the **BREAKING:** prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing because it doesn't break the package

@asalsys asalsys requested a review from mcmire December 15, 2025 18:36
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some more comments below.

However, one thing I failed to realize when reviewing #7271 was that there were breaking changes made. We have some instructions for introducing breaking changes and one of the steps we ask is that you publish a preview build for the package you changed and create draft PRs on both extension and mobile where you upgrade them to the preview build. This will help you confirm the breaking changes that you've made, and it will inform you on whether there are more packages you need to include in this release.

I realized that you created a PR on the mobile side which tests these breaking changes, so that is good. However, when breaking changes we want to have draft PRs for both clients so that we can make sure there are no breaking changes we've discounted, and so that upgrading the package in both clients is fast and easy.

Since you've already merged #7271, maybe you should close this PR for now until you have a draft PR on extension?

- Bump `@metamask/assets-controllers` from `^93.1.0` to `^94.1.0` ([#7444](https://github.com/MetaMask/core/pull/7444), [#7488](https://github.com/MetaMask/core/pull/7488))
- Bump `@metamask/transaction-controller` from `^62.5.0` to `^62.7.0` ([#7430](https://github.com/MetaMask/core/pull/7430), [#7494](https://github.com/MetaMask/core/pull/7494))
- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
- This change is breaking because the controller state structure has changed: two new persisted state properties (`localOverrides` and `rawRemoteFeatureFlags`) have been added. Consumers need to ensure their state migration handles these new properties, and TypeScript types have been updated accordingly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those instructions makes sense for remote-feature-flag-controller, but how does it affect bridge-controller and the way it ought to be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have it as breaking because I had to update the package to pass the typing issues for tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing because it doesn't break the package

### Changed

- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
- This change is breaking because the controller state structure has changed: two new persisted state properties (`localOverrides` and `rawRemoteFeatureFlags`) have been added. Consumers need to ensure their state migration handles these new properties, and TypeScript types have been updated accordingly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this affect the way that transaction-controller ought to be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have it as breaking because I had to update the package to pass the typing issues for tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing because it doesn't break the package

- Bump `@metamask/assets-controllers` from `^93.1.0` to `^94.1.0` ([#7444](https://github.com/MetaMask/core/pull/7444), [#7488](https://github.com/MetaMask/core/pull/7488))
- Bump `@metamask/transaction-controller` from `^62.6.0` to `^62.7.0` ([#7494](https://github.com/MetaMask/core/pull/7494))
- **BREAKING:** Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
- This change is breaking because the controller state structure has changed: two new persisted state properties (`localOverrides` and `rawRemoteFeatureFlags`) have been added. Consumers need to ensure their state migration handles these new properties, and TypeScript types have been updated accordingly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this affect how transaction-pay-controller ought to be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have it as breaking because I had to update the package to pass the typing issues for tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing because it doesn't break the package

MarioAslau
MarioAslau previously approved these changes Dec 15, 2025
Copy link
Contributor

@MarioAslau MarioAslau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - currently some pending questions on the PR

@asalsys asalsys requested a review from mcmire December 15, 2025 19:17
@mcmire

This comment was marked as outdated.

@asalsys
Copy link
Contributor Author

asalsys commented Dec 16, 2025

@mcmire

extension preview build
MetaMask/metamask-extension#38879
mobile preview build
MetaMask/metamask-mobile#23487

@asalsys asalsys enabled auto-merge December 16, 2025 00:36
@asalsys asalsys disabled auto-merge December 16, 2025 00:41
@asalsys asalsys enabled auto-merge December 16, 2025 00:41
@asalsys asalsys closed this Dec 16, 2025
auto-merge was automatically disabled December 16, 2025 00:41

Pull request was closed

@bfullam bfullam deleted the release/725.0.0 branch December 16, 2025 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants