Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
5c26349
fix(rewards): match carousel design from perps (#28940)
Montoya Apr 16, 2026
2dedd4d
ci: use builds.yml as single source of truth for OTA push env config …
weitingsun Apr 16, 2026
18b15e2
chore(rewards): Ondo campaign UI audit (#28947)
sophieqgu Apr 16, 2026
de87a97
fix(predict): add home_section entrypoint to Predict Feed Viewed even…
vinnyhoward Apr 16, 2026
dfe66dc
chore(release): Bump main version to 7.75.0 (#28949)
chloeYue Apr 16, 2026
27617bd
feat(predict): Implement Predict Bet Slip PRED-707 cp-7.74.0 (#28779)
MarioAslau Apr 16, 2026
af96485
chore: fix time range change race condition cp-7.74.0 (#28939)
sahar-fehri Apr 16, 2026
7103a2c
fix(perps): restore MYX webpackIgnore sync guard (#28871)
abretonc7s Apr 16, 2026
0ea6a39
chore: bump @metamask/gator-permissions-controller from ^3.0.0 to ^4.…
jeffsmale90 Apr 16, 2026
a69be23
chore: bump chart margin on token details cp-7.74.0 (#28958)
sahar-fehri Apr 17, 2026
9a50ca2
chore(perps): remove unused estimated fee rate constant (#28957)
geositta Apr 17, 2026
a624ad5
test: add browser navigation E2E tests with local fixtures (MMQA-1721…
chrisleewilcox Apr 17, 2026
cf10d95
fix(perps): use native stack navigator to fix navigation jitter on na…
tommasini Apr 17, 2026
d267cfa
feat: hold time label and wiring (#28873)
Bigshmow Apr 17, 2026
f4a7ed2
feat(perps): add no_orders translation string (#28964)
michalconsensys Apr 17, 2026
cc6197a
fix(e2e): improve Detox local debug build support (#28965)
abretonc7s Apr 17, 2026
47ee978
fix: fix block explorer redirection cp-7.74.0 (#28966)
sahar-fehri Apr 17, 2026
cabe1a2
chore: remove tokensChainsCache from assets selectors, transactions u…
juanmigdr Apr 17, 2026
dae26e3
fix: perps leverage glitch (#28960)
tommasini Apr 17, 2026
efbdbdc
feat: adds auth to social api (#28919)
joaosantos15 Apr 17, 2026
5937989
fix(perps): historical-candle cancellation handling (#28953)
abretonc7s Apr 17, 2026
e0a6b8c
feat(predict): display outcomes in the outcomes tab with buy flow and…
caieu Apr 17, 2026
208c27b
feat: migrate `ListItem` to DSRN usage (#28878)
kirillzyusko Apr 17, 2026
61a0b3c
feat: wire follow/unfollow to SocialController using AuthenticationCo…
Bigshmow Apr 17, 2026
2e4dab1
chore: update support.metamask urls to track utm source (#27331)
saraantole Apr 17, 2026
1f92780
chore(agentic): improve mobile recipe validation and perps testabilit…
abretonc7s Apr 17, 2026
fd69c19
fix: fix navigation to token details from custom network cp-7.74.0 (#…
sahar-fehri Apr 17, 2026
9d35858
fix: NFT ownership status not refreshing across all enabled networks …
juanmigdr Apr 17, 2026
c2248a8
fix: reset price on timeRange change cp-7.74.0 (#28982)
sahar-fehri Apr 17, 2026
0c8c5c3
refactor: handle universal links from Braze notif deeplinks [GE-188] …
baptiste-marchand Apr 17, 2026
e3af844
fix: format updated fixture with Prettier in E2E workflow (#28981)
cmd-ob Apr 17, 2026
3252b13
chore: optimize PNG images with lossy compression (-47.7 MB) (#28915)
andrepimenta Apr 17, 2026
0e57cdc
chore: bump @metamask/smart-transactions-controller to ^24.0.0 (#28943)
rarquevaux Apr 17, 2026
c9eda6a
fix: notifications text overlap [GE-192] (#28990)
baptiste-marchand Apr 17, 2026
775a207
fix(MUSD-651): polish Cash & mUSD UI per latest designs cp-7.74.0 (#2…
Kureev Apr 17, 2026
9e265d3
chore: bump @metamask/transaction-pay-controller from ^19.1.1 to ^19.…
matthewwalsh0 Apr 17, 2026
d4b964f
fix: add asset_symbol to Ramps Button Clicked event for token buy act…
vinnyhoward Apr 17, 2026
0a2187d
feat: thread remote_session_id into standard pipeline events (#28742)
adonesky1 Apr 17, 2026
15dc994
feat: add segment events for ab trending sectinos (#28085)
PatrykLucka Apr 17, 2026
c8314d9
feat: add new hardware connection screen (#28019)
montelaidev Apr 17, 2026
84dc598
test: integrate AI test plan into RC build comments (#28951)
sleepytanya Apr 17, 2026
88bb30c
feat: implement wallet-side analytics for SDKConnectV2 / MWP (#27864)
ffmcgee725 Apr 17, 2026
e32b221
feat(perps): add mobile agentic capability recipes (#29005)
abretonc7s Apr 18, 2026
cb53817
chore(perps): harden agentic preflight logging (#29006)
abretonc7s Apr 18, 2026
9e6b2e1
feat: add SmokeBrowser E2E test tag for browser specs (MMQA-1724) (#2…
chrisleewilcox Apr 18, 2026
52154e1
feat(agentic): add mobile decimal reference recipe (#28992)
abretonc7s Apr 18, 2026
217e2c4
fix(charts): handle fast timeframe reloads in advanced chart cp-7.74.…
geositta Apr 18, 2026
5830243
feat(agentic): migrate benchmark specs to agentic recipes (#29007)
abretonc7s Apr 20, 2026
72b66ad
fix: Resolve the effective transaction type from `nestedTransactions`…
OGPoyraz Apr 20, 2026
4427372
fix: stable button widtah and disable wrap (#29021)
xavier-brochard Apr 20, 2026
4345902
fix: update chart container layout cp-7.74.0 (#29023)
sahar-fehri Apr 20, 2026
5b727f2
fix(analytics): track social login iOS interstitial events [TO-667] (…
tylerc-consensys Apr 20, 2026
f77c17a
feat: warning prompt - cp-7.73.0 (#28517)
ieow Apr 20, 2026
1527d38
fix: correct minimum TRX locked period time (#29038)
ulissesferreira Apr 20, 2026
57ff071
feat: add quickbuy half sheet (#28863)
joaosantos15 Apr 20, 2026
5048eae
fix(ramp): show PayPal in payment selector for UB2 (TRAM-3462) cp-7.7…
saustrie-consensys Apr 20, 2026
b7aaeb0
feat: skeleton migration (ramp scope) (#27208)
kirillzyusko Apr 20, 2026
965ec9e
chore: change the runners pool (#29055)
Qbandev Apr 20, 2026
c504f9f
fix(settings): correct settings IPFS section copy (TMCU-671) (#29045)
PatrykLucka Apr 20, 2026
a669687
fix(rewards): resolve Ondo position swap account picker missing balan…
VGR-GIT Apr 20, 2026
4265a15
feat(ramp): persist Transak native policy agreement for UB2 [TRAM-334…
wachunei Apr 20, 2026
14019fa
refactor(social): drop addressOrUid from follow/unfollow/updateFollow…
xavier-brochard Apr 20, 2026
eb54580
chore: bump assets controller v6 0 0 (#28898)
salimtb Apr 20, 2026
3b63e26
fix(bridge): hide price impact row without quote data (#28931)
bfullam Apr 20, 2026
e17efc9
feat: normalize assetId for Ramps API & aut provider switch gate fix …
meltingice1337 Apr 20, 2026
786f4d6
fix: properly sanitize json payload in wallet_watchAsset handler (#29…
ffmcgee725 Apr 20, 2026
5c4fccb
fix(MUSD-672): resolve Money Hub UX and UI inconsistencies cp-7.74.0 …
Kureev Apr 20, 2026
c63b352
fix(predict): show predict claim button and carousel when claimable p…
caieu Apr 20, 2026
64f79bb
fix(TRAM-3445): quotes should not be fetched when there's already a p…
Akaryatrh Apr 20, 2026
aa4f3d9
feat: MUSD-434 add real money account balance and apy to the money ho…
Matt561 Apr 20, 2026
9adef4f
fix: Explicitly support locales for Android cp-7.73.0 (#29077)
Cal-L Apr 20, 2026
3a675b8
fix(rewards): scope Ondo campaign participant status by subscriptionI…
VGR-GIT Apr 21, 2026
3185eee
fix: resolve iOS header overlap in SimpleWebview (#29020)
grvgoel81 Apr 21, 2026
97f9510
chore: remove quarantined browser-tests.failing.ts and dead code (MMQ…
chrisleewilcox Apr 21, 2026
1525518
fix: add chain id guard (#29094)
joaosantos15 Apr 21, 2026
e86e552
refactor: serialize metamask connect connection restore and reconnect…
ffmcgee725 Apr 21, 2026
3bd9a3b
chore: add zero to decimal inputs (#29103)
joaosantos15 Apr 21, 2026
0db6a7a
fix(social-leaderboard): prevent rank dot from wrapping in top trader…
xavier-brochard Apr 21, 2026
e365a65
feat(tooling): add TOOL_USAGE_COLLECTION_DB_PATH env var to override …
NicolasMassart Apr 21, 2026
6e4e095
docs: add canonical definition of ready for review and align guidance…
NicolasMassart Apr 21, 2026
3e2ea62
fix: improve conditional object spreading in usePerpsActions and useP…
PatrykLucka Apr 21, 2026
eebdb6d
chore: top traders global notification preferences view (#28984)
zone-live Apr 21, 2026
c2ea3d0
fix: unify sticky footer buttons across Token Details, Market Insight…
juanmigdr Apr 21, 2026
a595dc6
fix(wallet): improve SRP QR code styling for both light and dark them…
smgv Apr 21, 2026
96a9bb6
test: add initial config for system tests (#29113)
pnarayanaswamy Apr 21, 2026
d824f4c
feat: show suspcious and malicious labels on swaps asset picker (#29070)
infiniteflower Apr 21, 2026
5fed60c
ci: enforce merge commit for stable-sync → release/* PRs (#29025)
chloeYue Apr 21, 2026
c47ffad
feat: add automated tool-usage collection via Yarn plugin and agent h…
NicolasMassart Apr 21, 2026
60a0da0
chore(homepage): scaffold Hub Page Discovery Tabs A/B test (#29069)
vinnyhoward Apr 21, 2026
cc0dafa
chore: Refactor Predict tabs for consistency (#29010)
amandaye0h Apr 21, 2026
469a6ad
feat: add security badge on trending list (#29112)
sahar-fehri Apr 21, 2026
760f44c
chore: add trust security events for token details page (#28800)
sahar-fehri Apr 21, 2026
f560f16
chore(ci): fix bundle size report (#29135)
joaoloureirop Apr 21, 2026
85dc04e
feat(card): enable cashback for US users (#29138)
Brunonascdev Apr 21, 2026
9ad84cb
feat: Extend notification account toggles to all wallet keyrings (#27…
oilnam Apr 21, 2026
6f71a76
fix(perps): add transparency to volume bars (#29132)
aganglada Apr 21, 2026
3e535e6
fix(perps): complete spot-balance parity cp-7.72.2 (#29110)
abretonc7s Apr 21, 2026
afcee4d
feat(MUSD-601): Money Home milestone state after first deposit (#29115)
Kureev Apr 21, 2026
25adb40
feat(hw): add QR signing context and state management hook (#29083)
montelaidev Apr 21, 2026
63ef30c
feat: remove Braze Segment events filtering (#29134)
baptiste-marchand Apr 21, 2026
d9f38f2
feat(predict): add Polymarket CLOB v2 support cp-7.73.1 (#29076)
matallui Apr 21, 2026
dfd0ae6
feat(analytics): emit request_source on Connect Request events (#29101)
wenfix Apr 21, 2026
e1a97df
test: add earn test (#28829)
pnarayanaswamy Apr 22, 2026
3655a92
fix(perps): preserve integer trailing zeros when szDecimals=0 (#29016)
abretonc7s Apr 22, 2026
4503b87
test: reduces amount of tests in multichain specs (#29116)
christopherferreira9 Apr 22, 2026
4f97a52
feat: add PR risk analysis config and hard rules (#29096)
cmd-ob Apr 22, 2026
207162c
fix: support stocks in token import flow cp-7.74.0 (#29159)
juanmigdr Apr 22, 2026
58921c2
feat: update tempo native logo (#29105)
maxime-oe Apr 22, 2026
986ee5f
chore: remove the bitrise poc workflows (#29118)
Qbandev Apr 22, 2026
87df48b
fix: display Banners confetti on empty state (#29163)
baptiste-marchand Apr 22, 2026
a51621a
feat: integrate money account withdraw page with money account balanc…
jpuri Apr 22, 2026
665a358
feat: make object/array feature flags editable in dev override menu (…
OGPoyraz Apr 22, 2026
d0d7530
fix(card): unauthenticated balance always showing 0 (#29146)
Brunonascdev Apr 22, 2026
edf69ec
feat(rewards): ondo campaign winner page (#29158)
VGR-GIT Apr 22, 2026
a35008b
chore: upgrade design system libraries to v34 (#29149)
georgewrmarshall Apr 22, 2026
9355fcc
docs: add WebSocket mocking guide for E2E test authors (MMQA-1369) (#…
chrisleewilcox Apr 22, 2026
e632cc6
refactor(tests): reorganize CI tests scripts and update QA CODEOWNERS…
jvbriones Apr 22, 2026
7669b20
chore: bump `@metamask/tron-wallet-snap` and `@metamask/assets-contro…
gabrieledm Apr 22, 2026
5a50624
feat: enhance token availability checks and loading states (#29178)
meltingice1337 Apr 22, 2026
bb3efe0
chore: Add agentic files separate from cherry pick to main (#29203)
gambinish Apr 22, 2026
73b2a2f
fix(Rewards): RWDS-1212 fix musd logo not displayed (#29194)
Montoya Apr 22, 2026
0b88c75
fix: compliance modal appear once on asset page cp-7.74.0 (#29201)
aganglada Apr 22, 2026
918ea88
chore: refactor quickbuy to use fetchQuotes v2 (#29165)
joaosantos15 Apr 22, 2026
8c8ad68
fix: MUSD-671 money hub missing analytics cp-7.74.0 (#29147)
Matt561 Apr 22, 2026
96fc866
feat(ramp): headless buy playground and Phase 3 session API (#29144)
wachunei Apr 22, 2026
911e097
test: remove toMatchSnapshot and removed snapshot files in swaps test…
cortisiko Apr 22, 2026
dbdf5b0
chore(ci): bump xmldom & ignore uuid advisory to address ci audit fai…
joaoloureirop Apr 22, 2026
d75a344
test: remove toMatchSnapshot and removed snapshot files in predict & …
cortisiko Apr 23, 2026
8542e14
feat(hw): shared files for QR context and hardware wallet context mer…
montelaidev Apr 23, 2026
756b701
fix(perps): HL Unified-mode live balance — spotState ws + tradeable-b…
abretonc7s Apr 23, 2026
11ff780
feat: show error sheet on auth server and seedless login errors (#29227)
grvgoel81 Apr 23, 2026
f08b8b0
chore: skeleton loading to quick buy (#29108)
joaosantos15 Apr 23, 2026
93d3675
fix(perps): rate-limit optimizations to match extension improvements …
abretonc7s Apr 23, 2026
a20763e
chore: integrate authenticated user storage package (#29114)
zone-live Apr 23, 2026
0aed6ad
chore(deps): update transaction pay controller to v19.2.2 (#29179)
pedronfigueiredo Apr 23, 2026
0841803
fix: stop hardcoding transaction pay strategy (#29200)
pedronfigueiredo Apr 23, 2026
5b67ec2
fix(perps): address bugbot findings on core sync (#29243)
abretonc7s Apr 23, 2026
c463847
chore: update homepage codeowners (#29166)
AndyMBridges Apr 23, 2026
fda21e0
feat: Tsa 411 wire position view data (#29018)
Bigshmow Apr 23, 2026
844c160
fix: tempo disable confirm button until gas autoselect (#29188)
maxime-oe Apr 23, 2026
1cdc8b9
fix: musd money hub 7.74.0 release blockers cp-7.74.0 (#29225)
Matt561 Apr 23, 2026
9790dfe
Merge origin/main into stable-main-7.73.0
metamaskbot Apr 23, 2026
241d78a
chore: update the social-api provider for token images (#29238)
zone-live Apr 23, 2026
284ce8b
test: marks appwright files as deprecated and updates docs (#29109)
christopherferreira9 Apr 23, 2026
e0d048f
test: migrate MM-Connect tests to the new framework (#28970)
christopherferreira9 Apr 23, 2026
0448344
test: refactors the remaining metrics validation specs (#29036)
christopherferreira9 Apr 23, 2026
c9768a4
Merge branch 'main' into stable-main-7.73.0
chloeYue Apr 23, 2026
dea0e26
feat(card): bring Cashback option up and remove chevron-right on Chan…
Brunonascdev Apr 23, 2026
7612009
fix: fallback classic tx for smart-contract deployment (#29078)
maxime-oe Apr 23, 2026
f0fd2e2
feat(card): enable password manager for iOS (#29215)
Brunonascdev Apr 23, 2026
d96b27e
chore: add metamaskbotv2 bot as known bots (#29265)
chloeYue Apr 23, 2026
2537ce8
feat(multichain): integrate malicious token detection in transaction …
PatrykLucka Apr 23, 2026
dd3d2a1
feat: Support ENS v2 (#29258)
FrederikBolding Apr 23, 2026
ce83b2a
test: remove toMatchSnapshot and removed snapshot files in seedless o…
cortisiko Apr 23, 2026
072a42c
chore: update eth-json-rpc-middleware package (#29261)
jpuri Apr 23, 2026
476d502
feat: replace loading animation with Rive animation (#29003)
vinnyhoward Apr 23, 2026
71d032c
Merge branch 'main' into stable-main-7.73.0
chloeYue Apr 23, 2026
c728322
test(homepage): add E2E smoke tests for homepage sections network fil…
vinnyhoward Apr 23, 2026
49cf9d6
feat: migration reset native balance to 0 on tempo chains (#28869)
maxime-oe Apr 23, 2026
165edcb
fix: exclude ended sports events from Predict featured carousel (#29000)
ghgoodreau Apr 23, 2026
0c82f90
chore: New Crowdin Translations by GitHub Action cp-7.74.0 (#28916)
metamaskbotv2[bot] Apr 23, 2026
789b614
chore: add cursor[bot] to knownBots in check-template-and-add-labels …
AndyMBridges Apr 23, 2026
2c04dcc
refactor(networks): enhance NetworkDetailsView with improved RPC and …
PatrykLucka Apr 23, 2026
baa239b
fix(analytics): propagate key_value_pair in active ab tests (#29183)
bfullam Apr 23, 2026
495767d
ci: disable AI analyzer PR comments (#29180)
jvbriones Apr 23, 2026
7f5ea83
fix: collapse Predict carousel markets to moneyline outcome when pres…
ghgoodreau Apr 23, 2026
ea34452
chore: [DSYS-616] replace single Checkbox instance and update @deprec…
cursor[bot] Apr 23, 2026
2e3795d
chore(release): sync stable to main for version 7.73.0 (#29245)
metamaskbotv2[bot] Apr 23, 2026
755f6c9
chore: hide swaps asset security tag for now (#29278)
infiniteflower Apr 23, 2026
34a82a1
test: installs foundry with yarn instead of global install (#29191)
christopherferreira9 Apr 23, 2026
d5fcd00
feat(rewards): add Ondo campaign participant outcome support (#29267)
VGR-GIT Apr 23, 2026
be1f36b
chore(runway): cherry-pick fix: Rewards text refinement (#29319)
runway-github[bot] Apr 24, 2026
06d8e06
chore(runway): cherry-pick test: upload Test Plan JSON file to artifa…
runway-github[bot] Apr 24, 2026
cf4d902
chore(runway): cherry-pick fix: Fix dismissing perps modify sheet (#2…
runway-github[bot] Apr 28, 2026
fcc3844
chore(runway): cherry-pick fix: fixed lending empty state rendering f…
runway-github[bot] Apr 29, 2026
9503f91
[skip ci] Bump version number to 4733
metamaskbot Apr 29, 2026
e95e039
chore(release): stable sync after 7.73.2, 7.74.0 and 7.74.1 (#29459)
joaoloureirop Apr 30, 2026
b1b48f0
[skip ci] Bump version number to 4742
metamaskbot Apr 30, 2026
9840957
chore(runway): cherry-pick fix(bridge): normalize Polygon native toke…
runway-github[bot] Apr 30, 2026
455e7d1
[skip ci] Bump version number to 4743
metamaskbot Apr 30, 2026
fd21a21
Merge branch 'stable' into release/7.75.0
joaoloureirop Apr 30, 2026
5ae50a8
[skip ci] Bump version number to 4744
metamaskbot Apr 30, 2026
5185f5c
chore(runway): cherry-pick ci: add separate Runway OTA and native bui…
runway-github[bot] Apr 30, 2026
c690201
[skip ci] Bump version number to 4745
metamaskbot Apr 30, 2026
62d0751
yarn dedupe
joaoloureirop Apr 30, 2026
f736394
[skip ci] Bump version number to 4746
metamaskbot Apr 30, 2026
7bf3f76
chore(runway): cherry-pick fix(confirmations): prevent Perps withdraw…
runway-github[bot] Apr 30, 2026
ff4495e
[skip ci] Bump version number to 4747
metamaskbot Apr 30, 2026
10e1c2f
fix stable sync
joaoloureirop Apr 30, 2026
35b6fd2
[skip ci] Bump version number to 4749
metamaskbot Apr 30, 2026
32bd1c0
chore(runway): cherry-pick chore: New Crowdin Translations by GitHub …
runway-github[bot] Apr 30, 2026
9336824
[skip ci] Bump version number to 4750
metamaskbot Apr 30, 2026
7a6c4cb
chore(runway): cherry-pick ci: switch OTA hotfix release branch to `-…
runway-github[bot] Apr 30, 2026
3e4de83
[skip ci] Bump version number to 4752
metamaskbot Apr 30, 2026
6950c04
[skip ci] Bump version number to 4753
metamaskbot Apr 30, 2026
f5a6501
chore(runway): cherry-pick chore: restore fail open filter logic on m…
runway-github[bot] Apr 30, 2026
ff23045
[skip ci] Bump version number to 4754
metamaskbot Apr 30, 2026
5034f15
chore(runway): cherry-pick fix(predict): update Polymarket adapter co…
runway-github[bot] Apr 30, 2026
87c81ac
[skip ci] Bump version number to 4755
metamaskbot Apr 30, 2026
ad2b1e0
[skip ci] Bump version number to 4756
metamaskbot Apr 30, 2026
f486516
Merge branch 'stable' into release/7.75.0
chloeYue May 4, 2026
5b5f28e
[skip ci] Bump version number to 4782
metamaskbot May 4, 2026
2b9c050
(chore)release: release-changelog/7.75.0 (#29310)
chloeYue May 4, 2026
997c5e7
[skip ci] Bump version number to 4784
metamaskbot May 4, 2026
885dabf
revert ota version change
chloeYue May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Checks changed files for A/B testing implementation compliance.

Rules:
- Fail: New ab_tests payload additions in checked code diffs
- Fail: Malformed literal active_ab_tests objects missing key/value
- Fail: Malformed literal active_ab_tests objects missing key/value/key_value_pair
- Fail: Inline useABTest variants object missing control
- Warn: Flag key naming mismatch for Abtest keys
- Warn: Risky A/B integration changes without test-file updates
Expand Down Expand Up @@ -246,15 +246,32 @@ for file in "${CHANGED_FILES[@]}"; do
for ((i=0; i<line_count; i++)); do
line="${added_lines[$i]}"

# Rule: validate literal active_ab_tests payloads include both key and value.
# Rule: validate literal active_ab_tests payloads include key, value, and key_value_pair.
if [[ "$line" =~ active_ab_tests[[:space:]]*: ]]; then
if [[ "$line" =~ active_ab_tests[[:space:]]*:[[:space:]]*(\[|\{) ]]; then
window="$line"
for ((j=i+1; j<line_count && j<=i+8; j++)); do
window+=$'\n'"${added_lines[$j]}"
done
if ! grep -Eq 'key[[:space:]]*:' <<< "$window" || ! grep -Eq 'value[[:space:]]*:' <<< "$window"; then
FAILURES+=("$file: malformed literal active_ab_tests object (expected key and value).")
payload="$(sed -E 's/.*active_ab_tests[[:space:]]*:[[:space:]]*//; q' <<< "$line")"
closing_char="]"
if [[ "${BASH_REMATCH[1]}" == "{" ]]; then
closing_char="}"
fi

if [[ "$payload" == *"$closing_char"* ]]; then
payload="$(printf '%s' "$payload" | cut -d "$closing_char" -f 1)$closing_char"
else
for ((j=i+1; j<line_count && j<=i+8; j++)); do
next_line="${added_lines[$j]}"
if [[ "$next_line" == *"$closing_char"* ]]; then
payload+=$'\n'"$(printf '%s' "$next_line" | cut -d "$closing_char" -f 1)$closing_char"
break
fi
payload+=$'\n'"${next_line}"
done
fi

if grep -Eq 'key[[:space:]]*:|value[[:space:]]*:|key_value_pair[[:space:]]*:' <<< "$payload"; then
if ! grep -Eq 'key[[:space:]]*:' <<< "$payload" || ! grep -Eq 'value[[:space:]]*:' <<< "$payload" || ! grep -Eq 'key_value_pair[[:space:]]*:' <<< "$payload"; then
FAILURES+=("$file: malformed literal active_ab_tests object (expected key, value, and key_value_pair).")
fi
fi
fi
fi
Expand Down Expand Up @@ -300,6 +317,9 @@ for file in "${CHANGED_FILES[@]}"; do
while IFS= read -r quoted; do
[[ -z "$quoted" ]] && continue
key="${quoted:1:${#quoted}-2}"
if [[ "$key" =~ [[:space:]{}=] ]]; then
continue
fi
if [[ -n "$use_abtest_literal_key" && "$key" == "$use_abtest_literal_key" ]]; then
continue
fi
Expand Down
14 changes: 8 additions & 6 deletions .agents/skills/e2e-test/references/mocking.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,17 @@ Add a mock for every such request to ensure test determinism.

## Features using WebSockets or complex transport

Some features depend on **WebSockets** or other non-HTTP transport (e.g. Perps/HyperLiquid, real-time data). The HTTP mock server cannot intercept these. The repo uses two patterns:
Some features depend on **WebSockets** or other non-HTTP transport (e.g. Perps/HyperLiquid, real-time data). The HTTP mock server cannot intercept these. The repo uses three patterns:

1. **Controller-level mocking** — A mixin under `tests/controller-mocking/mock-config/` replaces provider SDK touchpoints so E2E runs with stable, test-controlled data. Example: `perps-controller-mixin.ts` for HyperLiquid. See **`tests/docs/CONTROLLER_MOCKING.md`** for when and how to use it.
2. **Command queue / test server** — Tests that need to drive the app (e.g. inject state or commands) can use **`CommandQueueServer`** (`tests/framework/fixtures/CommandQueueServer.ts`). Enable it in the fixture with `useCommandQueueServer: true`. Used by Perps specs (e.g. `tests/smoke/perps/perps-add-funds.spec.ts`, `tests/regression/perps/perps-limit-long-fill.spec.ts`). The app consumes the queue in E2E context.
1. **WebSocket mocking** — A `LocalWebSocketServer` (`tests/websocket/server.ts`) intercepts production WebSocket connections via URL rewriting in the E2E shim. Protocol-specific mocks handle subscribe/unsubscribe and push notifications. See **`tests/docs/WEBSOCKET_MOCKING.md`** for full usage guide and how to add new services. Example: `tests/websocket/account-activity-mocks.ts` for AccountActivity.
2. **Controller-level mocking** — A mixin under `tests/controller-mocking/mock-config/` replaces provider SDK touchpoints so E2E runs with stable, test-controlled data. Example: `perps-controller-mixin.ts` for HyperLiquid. See **`tests/docs/CONTROLLER_MOCKING.md`** for when and how to use it.
3. **Command queue / test server** — Tests that need to drive the app (e.g. inject state or commands) can use **`CommandQueueServer`** (`tests/framework/fixtures/CommandQueueServer.ts`). Enable it in the fixture with `useCommandQueueServer: true`. Used by Perps specs (e.g. `tests/smoke/perps/perps-add-funds.spec.ts`, `tests/regression/perps/perps-limit-long-fill.spec.ts`). The app consumes the queue in E2E context.

**When adding support for a new feature that uses WebSockets or similar:**

- Follow the **same pattern** as existing features (controller mixin and/or CommandQueueServer).
- Implement under `tests/controller-mocking/mock-config/` or extend the command-queue protocol as needed.
- For WebSocket services: add a service config in `tests/websocket/constants.ts` and a protocol mock. See `tests/docs/WEBSOCKET_MOCKING.md`.
- For SDK-level mocking: implement under `tests/controller-mocking/mock-config/`.
- For test-driven commands: extend the command-queue protocol as needed.
- Add or update **tests/specs** that cover the mock infrastructure and the E2E flow.

Prefer HTTP mocking whenever the feature’s API is plain HTTP; use controller mocking or the command server only when necessary.
Prefer HTTP mocking whenever the feature’s API is plain HTTP; use WebSocket mocking for WS connections; use controller mocking or the command server only when necessary.
Loading
Loading