Skip to content

feat: accept a vault password for self-onboarding - #47201

Merged
seaona merged 1 commit into
mainfrom
self-onboarding-password
Oct 23, 2026
Merged

seaona merged 1 commit into
mainfrom
self-onboarding-password

Conversation

@seaona

@seaona seaona commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Description

The self-onboarding launcher can now take a vault password from the launch request, so callers can set a random one per run instead of the fixed e2e default. Without one, it falls back to DEFAULT_PASSWORD. The password is cleared after use.
Depends on the @metamask/client-mcp-core release that adds password (bump pending).

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. yarn start
  2. yarn mm cleanup --shutdown
  3. printf '%s\n%s\n' "<SRP>" "<password>" | yarn mm launch --state onboarding --self-onboarding
  4. Lock the wallet and unlock it with <password>.

Screenshots/Recordings

Screen.Recording.2026-10-23.at.08.56.25.mov

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
E2E/LLM launcher and test plumbing only; no production wallet or auth paths, with fallback to the existing default password.

Overview
Self-onboarding in the LLM workflow launcher can now take an optional vault password on the launch path (documented as a second stdin line for mm launch --self-onboarding). Callers can use a per-run password instead of the fixed e2e default; if omitted, behavior stays on DEFAULT_PASSWORD.

MetaMaskSessionManager.launch reads password from the session request, forwards it to MetaMaskExtensionLauncher, and clears it from the request alongside the SRP. The launcher uses that value for runSelfOnboarding and finishOnboarding, zeroes it in a finally block, and folds the post-import home navigation into the same guarded block. Types and unit tests cover forwarding and the unset-password case.

Depends on a @metamask/client-mcp-core release that adds password to the launch input.

Reviewed by Cursor Bugbot for commit 8350911. Bugbot is set up for automated code reviews on this repo. Configure here.

@metamask-ci metamask-ci Bot added the team-qa QA team label Oct 20, 2026
@seaona seaona changed the title pw feat: accept a vault password for self-onboarding Oct 20, 2026
@seaona seaona self-assigned this Oct 20, 2026
@seaona seaona added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Oct 20, 2026
@metamask-ci

metamask-ci Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor
Builds ready [8350911] [reused from 45ad871]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 4 warn · 🔴 3 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 39433481288 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +410%
  • ↑ loadNewAccount/total: +410%
  • ↓ loadNewAccount/inp: -39%
  • ↓ loadNewAccount/fcp: -34%
  • ↓ loadNewAccount/lcp: -29%
  • ↑ confirmTx/longTaskMaxDuration: +11%
  • ↓ confirmTx/inp: -47%
  • ↓ confirmTx/fcp: -35%
  • ↓ confirmTx/lcp: -22%
  • ↓ bridgeUserActions/bridge_load_page: -12%
  • ↓ bridgeUserActions/bridge_load_asset_picker: -26%
  • ↓ bridgeUserActions/bridge_search_token: -13%
  • ↑ bridgeUserActions/longTaskCount: +11%
  • ↓ bridgeUserActions/longTaskTotalDuration: -22%
  • ↓ bridgeUserActions/longTaskMaxDuration: -39%
  • ↓ bridgeUserActions/tbt: -93%
  • ↓ bridgeUserActions/total: -13%
  • ↓ bridgeUserActions/inp: -15%
  • ↓ bridgeUserActions/fcp: -37%
  • ↓ bridgeUserActions/lcp: -28%
  • ↑ loadNewAccount/load_new_account: +421%
  • ↑ loadNewAccount/total: +421%
  • ↑ loadNewAccount/inp: +14%
  • ↓ loadNewAccount/fcp: -34%
  • ↑ loadNewAccount/lcp: +1316%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↑ confirmTx/fcp: +24%
  • ↑ confirmTx/lcp: +1459%
  • ↑ bridgeUserActions/bridge_load_page: +348%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +167%
  • ↑ bridgeUserActions/bridge_search_token: +30%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +74%
  • ↑ bridgeUserActions/inp: +62%
  • ↑ bridgeUserActions/fcp: +29%
  • ↑ bridgeUserActions/lcp: +1358%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 confirmTx/FCP: p75 2.1s
  • 🟡 confirmTx/LCP: p75 2.6s
  • 🟡 bridgeUserActions/FCP: p75 2.2s
  • 🟡 bridgeUserActions/LCP: p75 2.6s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/domInteractive: +21%
  • ↓ startupStandardHome/firstReactRender: -99%
  • ↓ startupStandardHome/initialActions: -33%
  • ↑ startupStandardHome/setupStore: +150%
  • ↓ startupStandardHome/domInteractive: -31%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -50%
  • ↑ startupStandardHome/setupStore: +137%
  • ↓ startupStandardHome/fcp: -27%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total

📈 Results compared to the previous 5 runs on main

  • ↑ onboardingImportWallet/srpButtonToSrpForm: +44%
  • ↑ onboardingImportWallet/confirmSrpToPwForm: +40%
  • ↑ onboardingImportWallet/pwFormToMetricsScreen: +33%
  • ↑ onboardingImportWallet/metricsToWalletReadyScreen: +33%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -94%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -75%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -89%
  • ↑ onboardingNewWallet/srpButtonToPwForm: +37%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +24%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +25%
  • ↑ onboardingNewWallet/agreeButtonToOnboardingSuccess: +13%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -82%
  • ↓ onboardingNewWallet/longTaskCount: -69%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -78%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -49%
  • ↓ onboardingNewWallet/tbt: -98%
  • ↓ onboardingNewWallet/total: -77%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -55%
  • ↓ dappPageLoad/firstPaint: -37%
  • ↓ dappPageLoad/firstContentfulPaint: -37%
Bundle Size Diffs
Status Bundle Total Diff Change
✅ background 15.49 MiB 0 Bytes 0.00%
✅ ui 19.32 MiB 0 Bytes 0.00%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.44 MiB 0 Bytes 0.00%
✅ content scripts 3.24 MiB 0 Bytes 0.00%
✅ zip 23.99 MiB 0 Bytes 0.00%

@sonarqubecloud

Copy link
Copy Markdown

@seaona
seaona marked this pull request as ready for review October 21, 2026 12:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Guidance review (modern-web-guidance / chrome-extensions)

No changes in ui/, shared/, or app/ in this PR — nothing to flag against those checklists.

Actionable item

The README documents an optional second stdin line for the vault password, but mm launch --self-onboarding in @metamask/client-mcp-core@0.11.0 (pinned in this repo) still reads all of stdin as a single 12/24-word phrase (readSelfOnboardingPhrase). A second line (or any extra tokens) makes the word count check fail, and the CLI never sets password on the launch request.

The launcher/provider wiring for password looks fine for programmatic launch; the gap is the documented CLI/stdin path.

Suggested fix (pick one):

  1. Extend client-mcp-core to parse line 1 = phrase, optional line 2 = password (and bump the dependency here), or
  2. Adjust the README to say password is only supported via the launch API until the CLI is updated.
Open in Web View Automation 

Sent by Cursor Automation: Modern web guidance

The phrase is read from stdin. A local setup writes a generated phrase; a
pooled setup writes the leased one. The wallet must start on onboarding: the
prod context always does, and the e2e context needs `--state onboarding`.
pooled setup writes the leased one. An optional second line sets the vault

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@metamask/client-mcp-core@0.11.0 treats all of stdin as the SRP (12/24 whitespace-separated words). It does not read a second line for password, so this doc will mislead anyone using mm launch --self-onboarding < file. Either ship CLI/stdin support in client-mcp-core + bump the dep, or narrow this text to the API-only path for now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we'll bump the version to 0.12.0 once it's released, then we'll merge this PR afterwards

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

here it is : #47311

@seaona seaona mentioned this pull request Oct 23, 2026
7 tasks
@seaona
seaona added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 12bf445 Oct 23, 2026
235 of 241 checks passed
@seaona
seaona deleted the self-onboarding-password branch October 23, 2026 08:38
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 23, 2026
@metamaskbot metamaskbot added the release-13.56.0 Issue or pull request that will be included in release 13.56.0 label Nov 2, 2026
@gauthierpetetin

Copy link
Copy Markdown
Contributor

No release label on PR. Adding release label release-13.56.0 on PR, as PR was added to branch 13.56.0 when release was cut.

This branch was previously deployed

1 inactive deployment
pr-comment — 83509113 Deployed Oct 21, 2026 by seaona via identify-codeowners #86661
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-13.56.0 Issue or pull request that will be included in release 13.56.0 size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants