Feat/add config registry controller#7668
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
@metamaskbot publish-previews |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
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.
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.
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.
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.
There was a problem hiding this comment.
This looks a lot better! The only thing I really noticed was the extra export in index.ts but everything else is minor.
(Also, I know there are some comments that Cursor has made. I haven't taken a look at these, although I'll comment on the one you pinged me on.)
| ...args: Parameters<ServicePolicy['onDegraded']> | ||
| ): ReturnType<ServicePolicy['onDegraded']> { | ||
| return this.#policy.onDegraded(...args); | ||
| } |
There was a problem hiding this comment.
I don't see this comment, but that's a fair question. These are standard methods on data service classes. They allow consumers to respond to when the API is degraded or unavailable.
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.
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.
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.
| options: FetchConfigOptions = {}, | ||
| ): Promise<FetchConfigResult> { | ||
| const headers: HeadersInit = { | ||
| 'Cache-Control': 'no-cache', |
There was a problem hiding this comment.
We should confirm that this works correctly on React Native. IIRC we had issues with this in the past
There was a problem hiding this comment.
Hi @Gudahtt, thanks for flagging this. I’ve verified in MetaMask Mobile that the config registry fetch with Cache-Control: no-cache works correctly and the registry data loads and refreshes as expected.
Below a screenshot showing the Additional networks section populated from the dynamic config registry list

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.
|
@metamaskbot publish-previews |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
Explanation
Core Package (@metamask/config-registry-controller)
What was delivered:
Business value:
References
Checklist
Note
Medium Risk
Mostly additive, but introduces new network-fetching + polling logic (feature-flag gated, keyring-event driven) and hooks it into the monorepo build/test config, so failures could surface at runtime or CI if misconfigured.
Overview
Adds a new workspace package,
@metamask/config-registry-controller, including aConfigRegistryControllerthat polls a remote config registry API (with ETag caching), is gated by theconfigRegistryApiEnabledremote feature flag, and starts/stops based on keyring lock/unlock and flag state changes.Also introduces the underlying
ConfigRegistryApiServicewith retry/circuit-break policy support, plus networkfiltersandselectors, and wires the new package into monorepo metadata/build tooling (roottsconfigrefs,yarn.lock,READMEpackage list/graph,CODEOWNERS,teams.json, and a smalllavamoatallowlist tweak).Written by Cursor Bugbot for commit 42e3e71. This will update automatically on new commits. Configure here.