You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends ConfigRegistryApiService with a fetchEventsConfig method that hits the /v1/config/events-config endpoint (with ETag caching, same pattern as fetchConfig)
Adds configs.eventsConfig and eventsConfigEtag fields to ConfigRegistryController state, populated in parallel with network configs on each polling cycle
Wires up the previously-stubbed AnalyticsController#fetchEventsConfig to read eventsConfig from ConfigRegistryController:getState on init, updating in-memory event-purpose classification when a newer version is available
Test plan
yarn workspace @metamask/config-registry-controller run test — 101 tests pass
yarn workspace @metamask/analytics-controller run test — 260 tests pass
Medium Risk
Changes how analytics events are classified for consent, with breaking messenger requirements for Wallet and AnalyticsController hosts.
Overview
Adds a remote events-config path through the config registry and connects AnalyticsController to it for event purpose classification (product vs marketing).
Config registry:ConfigRegistryApiService gains fetchEventsConfig for /v1/config/events-config (ETag/304 caching like networks). ConfigRegistryController stores configs.eventsConfig and eventsConfigEtag, fetching events config in parallel with network configs on each poll.
Analytics: The former #fetchEventsConfig stub now reads ConfigRegistryController:getState on init, validates and persists config when the version changes, and refreshes on ConfigRegistryController:stateChanged (subscription keyed on eventsConfig.version). Wallet initialization delegates the new API action.
Breaking: Integrators must wire ConfigRegistryApiService:fetchEventsConfig for ConfigRegistryController, and delegate ConfigRegistryController:getState plus stateChanged to AnalyticsController.
Reviewed by Cursor Bugbot for commit 55da180. Bugbot is set up for automated code reviews on this repo. Configure here.
- Extend ConfigRegistryApiService with a fetchEventsConfig method hitting /v1/config/events-config
- Store the result in ConfigRegistryController state (configs.eventsConfig + eventsConfigEtag)
- Wire up AnalyticsController#fetchEventsConfig to read from ConfigRegistryController:getState on init
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove readonly from #eventPurposes and #eventsConfigVersion private
fields so #fetchEventsConfig can update them after construction
- Fix changelog PR links from #10401 to #10448 in both packages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add explicit return type to buildConfigRegistryState in AnalyticsController.test.ts (ESLint)
- Remove dead ?? null branch in ConfigRegistryController#fetchEventsConfig (coverage)
- Add tests for modified:true without etag and non-Error thrown in #fetchEventsConfig (coverage 100%)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add ConfigRegistryApiService:fetchEventsConfig delegation in wallet
instance so the feature is not silently dead in wallet hosts
- Update stale Phase 1 comment on eventsConfig state field
- Fix #fetchEventsConfig doc comment to say 'version differs' not 'newer'
- Add @metamask/config-registry-controller dependency to changelog
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Make eventsConfig optional in ConfigRegistryControllerState to avoid
a breaking change for consumers that construct state without this field
- Register ConfigRegistryApiService:fetchEventsConfig mock in wallet
config-registry-controller test registerDependencies
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Preserves non-breaking addition — existing consumers that construct
state without this field continue to type-check.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The added tests only assert that the remote config is persisted, not that this map is used for classification. A regression here could leave the controller treating a fetched marketing-only event as product-only while all new tests still pass; add an init/integration assertion that tracks an event with remote purposes and verifies the resulting consent/purpose behavior.
Document wallet events-config integration in the changelog
This changes the default wallet initialization to require and invoke a new config-registry action, which adds a consumer-visible events-config request/state behavior, but packages/wallet/CHANGELOG.md has no Unreleased entry for it. Please document this wallet integration change alongside the package changelog entries.
…alyticsController
Use subscribe selector to filter state changes by eventsConfig version,
and rely on messenger types to guarantee ConfigRegistryController is
registered rather than swallowing errors silently.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Release of (after this [PR](MetaMask#10448)
got merged):
- `@metamask/analytics-controller` (major): 3.2.0 → 4.0.0
- `@metamask/config-registry-controller` (major): 4.0.0 → 5.0.0
- `@metamask/wallet` (patch): 16.0.0 → 16.0.1
And release of their dependents:
- `@metamask/assets-controller` (patch): 18.0.0 → 18.0.1
- `@metamask/network-controller` (patch): 37.0.0 → 37.0.1
- `@metamask/network-enablement-controller` (patch): 7.0.1 → 7.0.2
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> The release propagates major analytics and config-registry changes
with breaking messenger wiring across network-controller and wallet;
integrators must update delegations even though this PR only changes
versions and changelogs.
>
> **Overview**
> This is a **monorepo release** (`1312.0.0` → `1313.0.0`) that cuts new
package versions and threads updated dependency ranges through the
workspace and `yarn.lock`—no application source changes in this diff.
>
> **Headline releases:** `@metamask/analytics-controller` **4.0.0** and
`@metamask/config-registry-controller` **5.0.0** (majors whose
changelogs carry **breaking messenger** requirements: analytics must
allow `ConfigRegistryController:getState` / `stateChanged`; config
registry must allow `ConfigRegistryApiService:fetchEventsConfig` and
caches `/v1/config/events-config` in state).
`@metamask/network-controller` **37.0.1** depends on those majors, so
upgrading network ripples the same constraints to most controllers.
>
> **Patch releases:** `@metamask/wallet` **16.0.1**,
`@metamask/assets-controller` **18.0.1**, and
`@metamask/network-enablement-controller` **7.0.2** mainly record
dependency alignment on `network-controller` **37.0.1** and/or
`config-registry-controller` **5.0.0**. Dozens of packages bump
`@metamask/network-controller` to `^37.0.1`; consumers of
`@metamask/wallet-cli` also pick up `@metamask/wallet` **16.0.1** and
analytics/config-registry majors.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
6033cc1. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
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
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.
Summary
ConfigRegistryApiServicewith afetchEventsConfigmethod that hits the/v1/config/events-configendpoint (with ETag caching, same pattern asfetchConfig)configs.eventsConfigandeventsConfigEtagfields toConfigRegistryControllerstate, populated in parallel with network configs on each polling cycleAnalyticsController#fetchEventsConfigto readeventsConfigfromConfigRegistryController:getStateoninit, updating in-memory event-purpose classification when a newer version is availableTest plan
yarn workspace @metamask/config-registry-controller run test— 101 tests passyarn workspace @metamask/analytics-controller run test— 260 tests passyarn changelog:validate— passes🤖 Generated with Claude Code
Note
Medium Risk
Changes how analytics events are classified for consent, with breaking messenger requirements for Wallet and AnalyticsController hosts.
Overview
Adds a remote events-config path through the config registry and connects AnalyticsController to it for event purpose classification (product vs marketing).
Config registry:
ConfigRegistryApiServicegainsfetchEventsConfigfor/v1/config/events-config(ETag/304caching like networks).ConfigRegistryControllerstoresconfigs.eventsConfigandeventsConfigEtag, fetching events config in parallel with network configs on each poll.Analytics: The former
#fetchEventsConfigstub now readsConfigRegistryController:getStateoninit, validates and persists config when the version changes, and refreshes onConfigRegistryController:stateChanged(subscription keyed oneventsConfig.version). Wallet initialization delegates the new API action.Breaking: Integrators must wire
ConfigRegistryApiService:fetchEventsConfigforConfigRegistryController, and delegateConfigRegistryController:getStateplusstateChangedtoAnalyticsController.Reviewed by Cursor Bugbot for commit 55da180. Bugbot is set up for automated code reviews on this repo. Configure here.