chore: bump RemoteFeatureFlagController#40480
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| getMetaMetricsId: () => | ||
| initMessenger.call('MetaMetricsController:getMetaMetricsId'), | ||
| clientVersion: getBaseSemVerVersion(), | ||
| prevClientVersion, |
There was a problem hiding this comment.
New change from 4.1.0. See preview extension PR
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| "globals": { | ||
| "TextEncoder": true | ||
| }, |
There was a problem hiding this comment.
TextEncoded is now being used in this package version (code)
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/extension-platform (2 files, +7 -3)
🕵️ @MetaMask/extension-privacy-reviewers (1 files, +18 -0)
📜 @MetaMask/policy-reviewers (8 files, +24 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🧪 @MetaMask/qa (4 files, +79 -6)
|
Builds ready [9973c22]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json
Show resolved
Hide resolved
Builds ready [d4613a2]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…ore/bump-remote-feature-flag-controller
Builds ready [69a9694]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-e2e-fixture |
| localOverrides: {}, | ||
| rawRemoteFeatureFlags: {}, |
There was a problem hiding this comment.
RemoteFeatureFlagController 4.0.0 has added these additional state properties.
There was a problem hiding this comment.
This was modified by @metamaskbot to update fixtures.
| "feature2": false, | ||
| "feature3": { "name": "groupC", "value": "valueC" } | ||
| } | ||
| "feature3": { "name": "groupA", "value": "valueA" } |
There was a problem hiding this comment.
Need some confirmation here.
RemoteFeatureFlagController 4.0.0 changes the threshold implementation/logic, hence the changes to the state snapshots.
| "feature1": true, | ||
| "feature2": false, | ||
| "feature3": { "name": "groupC", "value": "valueC" } | ||
| "feature3": { "name": "groupA", "value": "valueA" } |
There was a problem hiding this comment.
Need some confirmation here.
RemoteFeatureFlagController 4.0.0 changes the threshold implementation/logic, hence the changes to the state snapshots.
| "feature2": false, | ||
| "feature3": { "name": "groupC", "value": "valueC" } | ||
| } | ||
| "feature3": { "name": "groupA", "value": "valueA" } |
There was a problem hiding this comment.
Need some confirmation here.
RemoteFeatureFlagController 4.0.0 changes the threshold implementation/logic, hence the changes to the state snapshots.
| // E2E Fixtures setup has 4 identities (1 EVM, 1 Solana, 1 Bitcoin, 1 Tron) | ||
| const METAMASK_IDENTITIES = 4; |
There was a problem hiding this comment.
This baffled me.... Looking at the underlying logic and the fixtures, the test points to the number of identities, not accounts.
I'm not entirely sure why now this e2e test is failing though.
| name: 'groupC', | ||
| value: 'valueC', | ||
| name: 'groupA', | ||
| value: 'valueA', |
There was a problem hiding this comment.
Override test ineffective due to identical mock values
Low Severity
MOCK_REMOTE_FEATURE_FLAGS_RESPONSE.feature3 changed from groupC/valueC to groupA/valueA, which is now identical to MOCK_CUSTOMIZED_REMOTE_FEATURE_FLAGS.feature3. The E2E override test in remote-feature-flag.spec.ts validates {...MOCK_REMOTE_FEATURE_FLAGS_RESPONSE, ...MOCK_CUSTOMIZED_REMOTE_FEATURE_FLAGS}, which now produces the same result as the response alone. This makes the manifest-override test a no-op — it passes regardless of whether the override mechanism actually works. The customized mock needs a distinct value (e.g., groupB/valueB) to meaningfully test override behavior.
There was a problem hiding this comment.
Deleted this file as it has exports that are not used anywhere.
| name: 'groupA', | ||
| value: 'valueA', |
There was a problem hiding this comment.
Need some confirmation here.
RemoteFeatureFlagController 4.0.0 changes the threshold implementation/logic, hence the changes were needed to this response constant.
…ore/bump-remote-feature-flag-controller
Builds ready [7dc9f96]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| 'data.RemoteFeatureFlagController.thresholdCache', | ||
| 'data.RemoteFeatureFlagController.rawRemoteFeatureFlags', |
There was a problem hiding this comment.
Excluding:
thresholdCacheuses the randomly generated address per run.rawRemoteFeatureFlagsseems to be the actual raw feature flag results from our server, any changes in LD would invalidate this.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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.
| getMetaMetricsId: () => | ||
| initMessenger.call('MetaMetricsController:getMetaMetricsId'), | ||
| clientVersion: getBaseSemVerVersion(), | ||
| prevClientVersion, |
There was a problem hiding this comment.
Unit test missing assertion for new prevClientVersion parameter
Medium Severity
The init function now extracts prevClientVersion from persistedState?.AppMetadataController?.currentAppVersion and passes it to the RemoteFeatureFlagController constructor, but the test named "passes the proper arguments to the controller" was not updated to assert prevClientVersion. Since the mock's persistedState is {}, prevClientVersion is undefined, and toHaveBeenCalledWith silently ignores undefined properties — so the test passes without verifying the new parameter. A regression removing prevClientVersion would go undetected.
Triggered by project rule: MetaMask Extension - Cursor Rules
Builds ready [b4c42b3]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
add support for wildcard keys so we can still match statelogs as as much as possible.
|
Builds ready [cffeec7]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|





Description
Bump
@metamask/remote-feature-flag-controllerfrom^3.0.0to^4.1.0Changelog
CHANGELOG entry: chore: bump RemoteFeatureFlagController
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2804
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Upgrades the remote feature flag dependency and updates initialization/state shape, which can affect feature gating behavior and persisted state compatibility. Risk is moderated by mostly test/fixture/policy updates but touches runtime flag fetching and controller config.
Overview
Bumps
@metamask/remote-feature-flag-controllerfrom^3.0.0to^4.1.0, including ayarn.lockupdate and LavaMoat policy changes to allow theTextEncoderglobal.Updates
RemoteFeatureFlagControllerinitialization to pass throughprevClientVersionfrom persistedAppMetadataControllerstate, and refreshes unit/E2E tests + fixtures for the controller’s expanded state shape (e.g.localOverrides,rawRemoteFeatureFlags,thresholdCache) and updated mock flag payloads.Improves E2E state-log validation by adding wildcard key support (e.g.
metamask.thresholdCache.*) and adjusts a metrics E2E assertion to match the fixture identity count.Written by Cursor Bugbot for commit cffeec7. This will update automatically on new commits. Configure here.