Skip to content

fix(benchmarks): demote the three bimodal onboarding metrics out of the gate - #45444

Open
MajorLift wants to merge 1 commit into
mainfrom
jongsun/ci/demote-bimodal-onboarding-metrics
Open

fix(benchmarks): demote the three bimodal onboarding metrics out of the gate#45444
MajorLift wants to merge 1 commit into
mainfrom
jongsun/ci/demote-bimodal-onboarding-metrics

Conversation

@MajorLift

@MajorLift MajorLift commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Changelog

CHANGELOG entry: null

Description

Three gated metrics are downstream of the same ~37% per-iteration slow path (#45266). Against a bimodal null no threshold value is correct: a ceiling either sits in the gap between the two clusters and picks a side of a coin flip, or sits above the slow cluster and never fires. The metric is not noisy — it is not measuring one thing.

gated-metrics.ts already documents the exit:

Demote (gated → warn) when CV > 35% OR FP rate > 10% for 2+ consecutive weeks. Cadence: monthly review. Output: PR updating the array below.

Both triggers fire on onboardingNewWallet.total, over the 13 runs sampled in #45266:

value trigger fires
CV 41.8% (mean 7672ms, sd 3204ms) > 35% yes
FP rate 79% (11/14, no regression involved) > 10% yes

This is that procedure running, not an exception to it.

Which metrics, and which stays

gated metric bimodal? this PR
onboardingNewWallet.total yes — its slow step is terminal, so the split propagates demote
onboardingNewWallet.doneButtonToAssetList yes — this is the coin flip, 24/65 slow demote
onboardingImportWallet.doneButtonToHomeScreen yes — same coin, 30/80 slow demote
onboardingImportWallet.total no — a step follows its slow one and absorbs the spill keeps its gate

The scope is wider than onboardingNewWallet.total alone because the coin flip is a step, and it is gated directly in both flows. Within-run sd is 3279ms for onboardingNewWallet.total against 120ms for onboardingImportWallet.total; the import flow's total is a clean unimodal 8.2% CV and remains #45205's calibration target.

Thresholds in thresholds.ts are untouched, so all four keep reporting into the PR comment and Sentry. This suppresses enforcement, not measurement — #45266 needs the series to continue in order to confirm its fix.

Not proposed: relaxing the ceilings to swallow the slow cluster. A ceiling above 10478ms passes every observed run including a real regression up to ~5×, converting an uninformative red into an uninformative green. Removal is the honest state and is visible in a way a widened threshold is not.

Verification

Both arms were run:

with the change            PASS   35 passed, 35 total
gated-metrics.ts at base   FAIL   3 failed, 32 passed, 35 total

The three failures on base are exactly the three new cases:

● does not fail on the bimodal metric onboardingNewWallet.total (demoted, restore condition #45266)
● does not fail on the bimodal metric onboardingNewWallet.doneButtonToAssetList (…)
● does not fail on the bimodal metric onboardingImportWallet.doneButtonToHomeScreen (…)

A fourth test is the control — onboardingImportWallet.total still blocks on a fail breach — and it passes in both arms, so the change is scoped to the three rather than disabling the gate wholesale. The pre-existing test asserting a 🔴 for doneButtonToHomeScreen in the PR comment also still passes, which is the evidence that reporting survives.

Restore condition

Each removal carries an inline reference to #45266. If that fix lands and works, these three go back.

Related issues

Manual testing steps

  1. yarn jest development/metamaskbot-build-announce/compare-benchmarks.test.ts
  2. Confirm a run whose onboardingNewWallet.total lands in the slow cluster reports the breach in the PR comment without failing the quality gate.

Pre-merge author checklist


Note

Medium Risk
Weakens CI enforcement for onboarding performance, so real regressions in those paths may no longer block PRs until #45266 is fixed. Scope is limited to three metrics and follows the documented demotion procedure.

Overview
Demotes three bimodal onboarding metrics out of GATED_METRICS so threshold breaches warn instead of failing the PR quality gate. Thresholds are unchanged, so reporting to PR comments and Sentry continues.

Removed from hard enforcement (restore when #45266 lands):

  • onboardingNewWallet.total
  • onboardingNewWallet.doneButtonToAssetList
  • onboardingImportWallet.doneButtonToHomeScreen

onboardingImportWallet.total stays gated. Tests cover the three demotions plus that control.

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

@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamask-ci

metamask-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/extension-platform (2 files, +93 -3)
  • 📁 development/
    • 📁 metamaskbot-build-announce/
      • 📄 compare-benchmarks.test.ts +74 -0
  • 📁 test/
    • 📁 e2e/
      • 📁 benchmarks/
        • 📁 utils/
          • 📄 gated-metrics.ts +19 -3

🧪 @MetaMask/qa (1 files, +19 -3)
  • 📁 test/
    • 📁 e2e/
      • 📁 benchmarks/
        • 📁 utils/
          • 📄 gated-metrics.ts +19 -3

👨‍🔧 @HowardBraham (1 files, +74 -0)
  • 📁 development/
    • 📁 metamaskbot-build-announce/
      • 📄 compare-benchmarks.test.ts +74 -0

👨‍🔧 @itsyoboieltr (1 files, +74 -0)
  • 📁 development/
    • 📁 metamaskbot-build-announce/
      • 📄 compare-benchmarks.test.ts +74 -0

@metamask-ci metamask-ci Bot added team-extension-platform Extension Platform team INVALID-PR-TEMPLATE PR's body doesn't match template labels Aug 12, 2026
@MajorLift
MajorLift deployed to pr-comment August 12, 2026 09:21 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
Builds ready [2a5b089] [reused from 244ac8b]
⚡ Performance Benchmarks (Total: 🟢 12 pass · 🟡 6 warn · 🔴 4 fail)

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

Metricschrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🔴 doneButtonToHomeScreen(p95) [CI log]🔴 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🔴 longTaskMaxDuration(p95) [CI log]🔴 [CI log]

Regressions (🔴 4 failures)

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟢 [CI log]🟡 [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/inp: -24%
  • loadNewAccount/fcp: -12%
  • loadNewAccount/lcp: -12%
  • confirmTx/longTaskCount: -67%
  • confirmTx/longTaskTotalDuration: -68%
  • confirmTx/longTaskMaxDuration: -13%
  • confirmTx/tbt: -69%
  • confirmTx/inp: -32%
  • confirmTx/fcp: -28%
  • confirmTx/lcp: -12%
  • bridgeUserActions/bridge_load_page: -29%
  • bridgeUserActions/bridge_load_asset_picker: -40%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: -17%
  • bridgeUserActions/fcp: -31%
  • bridgeUserActions/lcp: -21%
  • loadNewAccount/load_new_account: +21%
  • loadNewAccount/total: +21%
  • loadNewAccount/inp: -24%
  • loadNewAccount/lcp: +1128%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/inp: -24%
  • confirmTx/lcp: +1194%
  • bridgeUserActions/bridge_load_page: +206%
  • bridgeUserActions/bridge_load_asset_picker: +87%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +23%
  • bridgeUserActions/inp: +100%
  • bridgeUserActions/lcp: +1126%

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

  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 bridgeUserActions/INP: p75 208ms
  • 🟡 bridgeUserActions/FCP: p75 1.8s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/numNetworkReqs: -14%
  • startupStandardHome/domInteractive: -29%
  • startupStandardHome/firstReactRender: -98%
  • startupStandardHome/numNetworkReqs: -13%
  • startupStandardHome/fcp: -24%
  • startupPowerUserHome/uiStartup: -35%
  • startupPowerUserHome/load: -25%
  • startupPowerUserHome/domContentLoaded: -25%
  • startupPowerUserHome/backgroundConnect: -25%
  • startupPowerUserHome/firstReactRender: -99%
  • startupPowerUserHome/initialActions: +11%
  • startupPowerUserHome/loadScripts: -26%
  • startupPowerUserHome/setupStore: -76%
  • startupPowerUserHome/numNetworkReqs: +12%
  • startupPowerUserHome/inp: -36%
  • startupPowerUserHome/fcp: -11%
  • startupPowerUserHome/lcp: -30%
User Journey Benchmarks · Samples: 5 · mock API 🔴 4

⚠️ Missing data: chrome/webpack/userJourneyTransactions

Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 doneButtonToHomeScreen
🔴 total
🔴 [CI log]
🔴 total
onboardingNewWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 total
🔴 [CI log]
🔴 total
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
importSrpHome
[Sentry log · main/release]
🟡 [CI log]
🟡 total
🟢 [CI log]
sendTransactions
[Sentry log · main/release]
🟡 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -13%
  • onboardingImportWallet/confirmSrpToPwForm: -19%
  • onboardingImportWallet/pwFormToMetricsScreen: -18%
  • onboardingImportWallet/metricsToWalletReadyScreen: -42%
  • onboardingImportWallet/doneButtonToHomeScreen: +41%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +75%
  • onboardingImportWallet/longTaskTotalDuration: -24%
  • onboardingImportWallet/longTaskMaxDuration: -13%
  • onboardingImportWallet/tbt: -27%
  • onboardingImportWallet/total: +48%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -19%
  • onboardingNewWallet/longTaskMaxDuration: +10%
  • onboardingNewWallet/tbt: +21%
  • solanaAssetDetails/assetClickToPriceChart: +286%
  • solanaAssetDetails/longTaskCount: -100%
  • solanaAssetDetails/longTaskTotalDuration: -100%
  • solanaAssetDetails/longTaskMaxDuration: -100%
  • solanaAssetDetails/tbt: -100%
  • solanaAssetDetails/total: +286%
  • solanaAssetDetails/inp: +35%
  • importSrpHome/loginToHomeScreen: +31%
  • importSrpHome/openAccountMenuAfterLogin: +12%
  • importSrpHome/homeAfterImportWithNewWallet: +33%
  • importSrpHome/longTaskCount: +27%
  • importSrpHome/longTaskTotalDuration: +22%
  • importSrpHome/longTaskMaxDuration: -15%
  • importSrpHome/tbt: +17%
  • importSrpHome/total: +32%
  • importSrpHome/inp: -17%
  • importSrpHome/fcp: +11%

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

  • 🟡 importSrpHome/INP: p75 256ms
  • 🟡 importSrpHome/FCP: p75 1.9s
  • 🟡 assetDetails/FCP: p75 2.0s
  • 🟡 assetDetails/LCP: p75 2.9s
  • 🟡 solanaAssetDetails/FCP: p75 2.1s
  • 🟡 solanaAssetDetails/LCP: p75 2.7s
  • 🟡 sendTransactions/FCP: p75 2.0s
  • 🟡 sendTransactions/LCP: p75 2.6s
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: -58%
  • dappPageLoad/firstPaint: -46%
  • dappPageLoad/firstContentfulPaint: -46%
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 0 Bytes (0%)
  • zip: 0 Bytes (0%)

Both demotion triggers in the file's own graduation procedure fire on
`onboardingNewWallet.total`: CV 41.8% against a >35% trigger, and an FP
rate of 11/14 = 79% against a >10% trigger. Its `doneButtonToAssetList`
step and the import flow's `doneButtonToHomeScreen` are the same ~37%
per-iteration slow path, so all three are coin flips rather than
measurements. Thresholds are left in place so the metrics keep reporting.
@MajorLift
MajorLift force-pushed the jongsun/ci/demote-bimodal-onboarding-metrics branch from 2a5b089 to aad9a3e Compare August 12, 2026 10:34
@MajorLift
MajorLift deployed to pr-comment August 12, 2026 10:34 — with GitHub Actions Active
@MajorLift
MajorLift deployed to pr-comment August 12, 2026 10:35 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
Builds ready [aad9a3e] [reused from cc5d691]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 5 warn · 🔴 4 fail)

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

Metricschrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🔴 srpButtonToSrpForm(p95) [CI log]🔴 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🔴 doneButtonToAssetList(p95) [CI log]🔴 [CI log]

Regressions (🔴 4 failures)

Interaction Benchmarks · Samples: 5
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: +17%
  • loadNewAccount/total: +17%
  • loadNewAccount/inp: +14%
  • confirmTx/longTaskTotalDuration: -18%
  • confirmTx/longTaskMaxDuration: +33%
  • confirmTx/tbt: -32%
  • bridgeUserActions/bridge_load_asset_picker: +80%
  • bridgeUserActions/longTaskCount: +11%
  • bridgeUserActions/longTaskTotalDuration: +11%
  • bridgeUserActions/tbt: +14%
  • bridgeUserActions/inp: +23%
  • loadNewAccount/load_new_account: +23%
  • loadNewAccount/total: +23%
  • loadNewAccount/inp: -17%
  • loadNewAccount/fcp: -45%
  • loadNewAccount/lcp: +1244%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/inp: -24%
  • confirmTx/fcp: -46%
  • confirmTx/lcp: +1298%
  • bridgeUserActions/bridge_load_page: +217%
  • bridgeUserActions/bridge_load_asset_picker: +170%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +25%
  • bridgeUserActions/inp: -23%
  • bridgeUserActions/lcp: +1197%

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

  • 🟡 bridgeUserActions/FCP: p75 1.8s
Startup Benchmarks · Samples: 100

⚠️ Missing data: firefox/webpack/startupPowerUserHome

Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -15%
  • startupStandardHome/domContentLoaded: -15%
  • startupStandardHome/domInteractive: -14%
  • startupStandardHome/backgroundConnect: -11%
  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -15%
  • startupStandardHome/setupStore: -24%
  • startupStandardHome/numNetworkReqs: -14%
  • startupStandardHome/longTaskCount: -33%
  • startupStandardHome/longTaskTotalDuration: -23%
  • startupStandardHome/longTaskMaxDuration: -17%
  • startupStandardHome/tbt: -21%
  • startupStandardHome/fcp: -15%
  • startupStandardHome/lcp: +284%
  • startupStandardHome/uiStartup: -17%
  • startupStandardHome/load: -11%
  • startupStandardHome/domContentLoaded: -10%
  • startupStandardHome/domInteractive: +32%
  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/initialActions: -50%
  • startupStandardHome/loadScripts: -11%
  • startupStandardHome/numNetworkReqs: -13%
  • startupStandardHome/fcp: +34%
User Journey Benchmarks · Samples: 5 · mock API 🔴 4

⚠️ Missing data: chrome/webpack/userJourneyAssets, chrome/webpack/userJourneyTransactions, firefox/webpack/userJourneyTransactions

Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 doneButtonToHomeScreen
🔴 total
🔴 [CI log]
🔴 total
onboardingNewWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 total
🔴 [CI log]
🔴 total
importSrpHome
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
assetDetails
[Sentry log · main/release]
🟡 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: +20%
  • onboardingImportWallet/confirmSrpToPwForm: +17%
  • onboardingImportWallet/metricsToWalletReadyScreen: -12%
  • onboardingImportWallet/doneButtonToHomeScreen: -13%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +127%
  • onboardingImportWallet/longTaskCount: +43%
  • onboardingImportWallet/longTaskTotalDuration: +22%
  • onboardingImportWallet/longTaskMaxDuration: +10%
  • onboardingImportWallet/tbt: +22%
  • onboardingImportWallet/total: +21%
  • onboardingNewWallet/doneButtonToAssetList: +15%
  • onboardingNewWallet/longTaskTotalDuration: +12%
  • onboardingNewWallet/tbt: +50%
  • onboardingNewWallet/total: +14%
  • importSrpHome/longTaskCount: +13%
  • importSrpHome/longTaskMaxDuration: -24%
  • importSrpHome/tbt: -15%
  • importSrpHome/inp: -35%
  • importSrpHome/fcp: +14%
  • importSrpHome/lcp: +42%
  • importSrpHome/cls: +899%

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

  • 🟡 importSrpHome/FCP: p75 1.9s
  • 🟡 assetDetails/INP: p75 216ms
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: -58%
  • dappPageLoad/firstPaint: -46%
  • dappPageLoad/firstContentfulPaint: -46%
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 0 Bytes (0%)
  • zip: 0 Bytes (0%)

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template risk:medium size-S team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant