Skip to content

Commit 8b14ec9

Browse files
committed
Merge branch 'main' into predict/clob-v2-cleanup-core
* main: (21 commits) feat(predict): Add A/B Test Analytics Instrumentation: Bet Slip + Pay with Any Token (#29464) feat: Accounts Metrics (#29015) feat: Enable mUSD conversion flow for hardware wallet accounts (#29418) chore: QA and bug fixes from dry run apr 29 (#29519) test: remove toMatchSnapshot and removed snapshot files in unassigned code owners pt 3/3 (#29441) fix(card): initialize spending limit from saved allowance (#29517) perf(accessibility): fix iOS accessibility in Ramp components (#29126) test: e2e labels rename and shards update (#29431) test: fix missing mock (#29549) feat(rewards): add targeted Sentry capture for rewards auth errors (#29545) feat: track token_security_type_destination in metrics (#29381) fix(bridge): hide sponsored label on cross-chain bridge with insufficient balance (#29490) ci: fix scheduled e2e runs (#29539) chore: Bump `snaps-controllers` (#29486) chore: add buy/sell trade markers to trader position chart (#29478) fix(rewards): leaderboard split view (#29500) perf(accessibility): fix iOS accessibility in shared components for p… (#29119) ci: switch OTA hotfix release branch to `-ota` suffix convention (#29353) ci: fix `get-requirements.yml` checks for `pull_request` events (#29528) feat: added developer options button to clear dismissed mUSD conversion asset details CTAs (#29510) ...
2 parents 01fa870 + 73c7365 commit 8b14ec9

298 files changed

Lines changed: 5529 additions & 30571 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/e2e-test/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Do not read the full reference files until the decision tree or workflow sends y
6666
5. **Never use `TestHelpers.delay()`** — use `Assertions.*` which has auto-retry
6767
6. **Use `FixtureBuilder` for state** — do not set state through UI interactions
6868
7. **Selectors live in `*.testIds.ts`** (co-located) or `tests/selectors/` (legacy)
69-
8. **Tag correctly** — Use the tag that matches your feature and test type. Options include `SmokeE2E`, `SmokeTrade`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, `RegressionTrade`, `RegressionWallet`, etc. Check **`tests/tags.js`** for the full list and descriptions, and **existing specs in the same feature folder** to see which tag they use.
69+
8. **Tag correctly** — Use the tag that matches your feature and test type. Options include `SmokeE2E`, `SmokeSwap`, `SmokeStake`, `SmokeMoney`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, `RegressionTrade`, `RegressionWallet`, etc. Check **`tests/tags.js`** for the full list and descriptions, and **existing specs in the same feature folder** to see which tag they use.
7070
9. **Descriptive test names** — no 'should' prefix (e.g., `'opens market details'`)
7171
10. **Fix lint/tsc before running** — never run with known errors
7272

.agents/skills/e2e-test/references/writing-tests.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Spec File Location
44

5-
| Test Type | Directory | Tag |
6-
| ---------- | ------------------------------------------- | -------------------------------------------------------------------------------------- |
7-
| Smoke | `tests/smoke/<feature>/<name>.spec.ts` | `SmokeE2E`, `SmokeTrade`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, etc. |
8-
| Regression | `tests/regression/<feature>/<name>.spec.ts` | `RegressionTrade`, `RegressionWallet`, etc. |
5+
| Test Type | Directory | Tag |
6+
| ---------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
7+
| Smoke | `tests/smoke/<feature>/<name>.spec.ts` | `SmokeE2E`, `SmokeSwap`, `SmokeStake`, `SmokeMoney`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, etc. |
8+
| Regression | `tests/regression/<feature>/<name>.spec.ts` | `RegressionTrade`, `RegressionWallet`, etc. |
99

10-
Import tags from `tests/tags.ts`. Check **`tests/tags.js`** for the full list and descriptions. Use the same tag as **existing specs in that feature folder** (e.g. `tests/smoke/predict/` uses `SmokeTrade`).
10+
Import tags from `tests/tags.ts`. Check **`tests/tags.js`** for the full list and descriptions. Use the same tag as **existing specs in that feature folder** (e.g. `tests/smoke/swap/` uses `SmokeSwap`, `tests/smoke/stake/` uses `SmokeStake`, `tests/smoke/card/` and `tests/smoke/ramps/` use `SmokeMoney`).
1111

1212
## Minimal Smoke Spec
1313

.github/guidelines/E2E_DECISION_TREE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ flowchart TD
1111
GR -->|PR label: pr-not-ready-for-e2e| L2[No E2E]
1212
L2 -->|ignorable-only changes| NoBlock[No merge block]
1313
L2 -->|non-ignorable changes| Skip2[Merge blocked]
14-
GR -->|PR ignorable-only changes| Ignorable[No E2E - merge not blocked]
14+
GR -->|PR ignorable-only changes| Ignorable[No E2E]
1515
GR -->|PR has Android-only changes| Android[Android Build + Tests needed]
1616
GR -->|PR has iOS-only changes| iOS[iOS Build + Test needed]
1717
GR -->|PR other files changed| Both[Both Build + Tests needed]

.github/scripts/bump-ota-version-constants.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# Updates OTA_VERSION in app/constants/ota.ts.
33
#
44
# With a semver second argument (OTA hotfix release workflow): sets OTA_VERSION to v<semver>
5-
# exactly as provided (e.g. 7.73.01 -> v7.73.01, 7.73.21 -> v7.73.21). No normalization is applied.
6-
# Two-digit patch AB means OTA hotfix: base patch A, iteration B.
5+
# exactly as provided (e.g. 7.75.2 -> v7.75.2). No normalization is applied.
6+
# The OTA hotfix branch is release/X.Y.Z-ota; the bare X.Y.Z is passed here. Runway always
7+
# increments the patch past any existing native tag on the same X.Y line, so v<X.Y.Z> is
8+
# unique (no collision with a native release tag).
79
#
810
# Without semver (local / legacy): increments in place — vX.XX.X -> v0, vN -> v(N+1), vA.B.C -> vA.B.(C+1)
911
set -euo pipefail
@@ -30,8 +32,9 @@ fi
3032

3133
new=""
3234
if [[ -n "$SEMVER" ]]; then
33-
if ! [[ "$SEMVER" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
34-
echo "Error: semver must be numeric X.Y.Z, got: ${SEMVER}" >&2
35+
# Strict SemVer core: no leading zeros on numeric identifiers.
36+
if ! [[ "$SEMVER" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
37+
echo "Error: semver must be strict SemVer X.Y.Z (no leading zeros), got: ${SEMVER}" >&2
3538
exit 1
3639
fi
3740
new="v${SEMVER}"

.github/scripts/e2e-report-fixture-validation.mjs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ function buildComment(results) {
3939
}
4040

4141
if (!results) {
42-
if (VALIDATION_RESULT === 'success') {
43-
return `✅ ${COMMENT_MARKER} — Passed**\n[View details](${RUN_URL})`;
44-
}
4542
return null;
4643
}
4744

@@ -66,11 +63,7 @@ function buildComment(results) {
6663
].join('\n');
6764
}
6865

69-
if (valueMismatches > 0) {
70-
return `✅ ${COMMENT_MARKER} — Schema is up to date**\n${valueMismatches} value mismatches detected (expected — fixture represents an existing user).\n[View details](${RUN_URL})`;
71-
}
72-
73-
return `✅ ${COMMENT_MARKER} — No differences found**\nFixture is up to date. [View details](${RUN_URL})`;
66+
return null;
7467
}
7568

7669
function emitAnnotation(results) {
@@ -148,11 +141,16 @@ async function main() {
148141

149142
// Post PR comment if this is a PR
150143
if (PR_NUMBER) {
144+
// Always clean up any prior fixture-validation comments so passing runs
145+
// remove stale "structural changes" comments from previous failures.
146+
await deletePreviousComments();
147+
151148
const comment = buildComment(results);
152149
if (comment) {
153-
await deletePreviousComments();
154150
await postComment(comment);
155151
console.log(`Posted fixture validation comment on PR #${PR_NUMBER}`);
152+
} else {
153+
console.log(`No actionable fixture validation findings for PR #${PR_NUMBER} — skipping comment.`);
156154
}
157155
}
158156
}

.github/scripts/extract-semver.sh

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,42 @@
22

33
set -euo pipefail
44

5+
# Extracts semver from a release branch name and flags whether it's an OTA hotfix.
6+
#
7+
# Supported branch shapes:
8+
# release/X.Y.Z → semver=X.Y.Z, is_ota=false
9+
# release/X.Y.Z-ota → semver=X.Y.Z, is_ota=true
10+
#
11+
# The `-ota` suffix is the signal for an OTA hotfix. Runway always increments the
12+
# patch past any native tag on the same X.Y line, so the stripped semver is still
13+
# unique (e.g. native v7.75.1 → OTA branch release/7.75.2-ota; git tag v7.75.2 is
14+
# fresh). OTA_VERSION in app/constants/ota.ts is set to the stripped semver
15+
# (v7.75.2), and the production OTA tag uses the same v-prefixed string.
16+
517
ref_name="${GITHUB_REF#refs/heads/}"
618

7-
# Extract semver only for release/X.Y.Z
8-
if [[ "$ref_name" == release/* ]]; then
9-
semver="${ref_name#release/}"
10-
else
11-
echo "Error: Branch name must be release/X.Y.Z where X, Y, Z are numbers. Got: $ref_name" >&2
19+
if [[ "$ref_name" != release/* ]]; then
20+
echo "Error: Branch name must be release/X.Y.Z or release/X.Y.Z-ota. Got: $ref_name" >&2
1221
exit 1
1322
fi
1423

15-
# Validate semver format X.Y.Z where X, Y, Z are numbers
16-
if ! [[ "$semver" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
17-
echo "Error: Invalid semver in branch name: $ref_name (extracted: $semver; must be numeric X.Y.Z)" >&2
24+
tail="${ref_name#release/}"
25+
26+
is_ota="false"
27+
if [[ "$tail" == *-ota ]]; then
28+
is_ota="true"
29+
semver="${tail%-ota}"
30+
else
31+
semver="$tail"
32+
fi
33+
34+
# Strict SemVer core: no leading zeros on numeric identifiers (0 alone is fine).
35+
if ! [[ "$semver" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
36+
echo "Error: Invalid semver in branch name: $ref_name (extracted: $semver; must be strict SemVer X.Y.Z with no leading zeros)" >&2
1837
exit 1
1938
fi
2039

2140
echo " semver-version: ${semver}"
41+
echo " is-ota: ${is_ota}"
2242
echo "semver=${semver}" >> "$GITHUB_OUTPUT"
43+
echo "is_ota=${is_ota}" >> "$GITHUB_OUTPUT"
Lines changed: 22 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
#!/usr/bin/env bash
22
# Invokes MetaMask github-tools update-release-changelog.sh with OTA version handling.
33
#
4-
# OTA hotfix detection: a two-digit patch in the branch version (e.g. release/7.77.01).
5-
# auto-changelog rejects these as invalid SemVer (leading zeros are forbidden).
6-
#
7-
# This wrapper converts the Runway OTA version to a valid SemVer prerelease
8-
# for the changelog tool:
9-
# Runway 7.77.01 → SemVer 7.77.0-ota.1
10-
# Runway 7.77.21 → SemVer 7.77.2-ota.1
11-
#
12-
# The SemVer prerelease format stays in CHANGELOG.md permanently. auto-changelog
13-
# validates ALL version headers on every run, so non-SemVer versions like 7.77.01
14-
# would break all future changelog generation (not just OTA runs).
15-
#
16-
# The Runway version (7.77.01) is used only in branch names, OTA_VERSION, and PR titles.
17-
#
18-
# Mapping (two-digit patch AB): X.Y.AB → X.Y.A-ota.B
19-
# Single-digit patches pass through unchanged.
4+
# Branch conventions:
5+
# release/X.Y.Z → native release/hotfix; passes through unchanged (tool derives
6+
# the version from package.json on the branch).
7+
# release/X.Y.Z-ota → OTA hotfix; the -ota suffix exists only on the branch name.
8+
# The changelog header and the production git tag both use the
9+
# bare X.Y.Z. package.json on the OTA branch still carries the
10+
# previous native version (OTA doesn't bump native), so we must
11+
# pass X.Y.Z explicitly to auto-changelog. Runway always advances
12+
# X.Y.Z past any existing native patch on the same X.Y line, so
13+
# the bare header never collides with a prior native entry.
2014
set -euo pipefail
2115

22-
RELEASE_BRANCH="${1:?release branch (e.g. release/7.73.01)}"
16+
RELEASE_BRANCH="${1:?release branch (e.g. release/7.75.0 or release/7.75.2-ota)}"
2317
PLATFORM="${2:?platform (mobile|extension)}"
2418
REPO_URL="${3:?repository https URL}"
2519
PREV_REF="${4:-null}"
@@ -30,47 +24,24 @@ if [[ ! -f "$SCRIPT" ]]; then
3024
exit 1
3125
fi
3226

33-
# Extract version from branch name
34-
if [[ "$RELEASE_BRANCH" =~ ^release/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
27+
# Extract version and detect OTA suffix from branch name
28+
if [[ "$RELEASE_BRANCH" =~ ^release/([0-9]+\.[0-9]+\.[0-9]+)(-ota)?$ ]]; then
3529
RUNWAY_VERSION="${BASH_REMATCH[1]}"
30+
OTA_SUFFIX="${BASH_REMATCH[2]}"
3631
else
37-
echo "Error: branch does not match release/X.Y.Z: ${RELEASE_BRANCH}" >&2
32+
echo "Error: branch does not match release/X.Y.Z or release/X.Y.Z-ota: ${RELEASE_BRANCH}" >&2
3833
exit 1
3934
fi
4035

41-
PATCH="${RUNWAY_VERSION##*.}"
36+
if [[ -n "$OTA_SUFFIX" ]]; then
37+
# OTA hotfix: pass the bare X.Y.Z as the explicit SemVer version because package.json
38+
# on the OTA branch is still pinned to the prior native version.
39+
echo "OTA hotfix detected: branch ${RELEASE_BRANCH} → changelog header ${RUNWAY_VERSION}, tag v${RUNWAY_VERSION}"
4240

43-
if [[ ${#PATCH} -eq 2 ]]; then
44-
# OTA hotfix: two-digit patch AB → X.Y.A-ota.B
45-
BASE_PATCH="${PATCH:0:1}"
46-
OTA_NUM="${PATCH:1:1}"
47-
SEMVER_VERSION="${RUNWAY_VERSION%.*}.${BASE_PATCH}-ota.${OTA_NUM}"
48-
49-
echo "OTA hotfix detected: Runway ${RUNWAY_VERSION} → SemVer ${SEMVER_VERSION}"
50-
51-
# Pass real branch (arg 1) for git ops, valid SemVer (arg 6) for auto-changelog.
41+
# Pass real branch (arg 1) for git ops, bare SemVer (arg 6) for auto-changelog.
5242
# Changelog branch (arg 5) left empty so the tool auto-derives it from the SemVer version.
53-
"$SCRIPT" "$RELEASE_BRANCH" "$PLATFORM" "$REPO_URL" "$PREV_REF" "" "$SEMVER_VERSION"
54-
55-
# Fix comparison URLs on the changelog branch.
56-
# auto-changelog generates tag refs like "v7.76.0-ota.1" but the actual git tag
57-
# is "v7.76.01" (Runway format). Only URL tag refs carry the "v" prefix, so this
58-
# sed does not touch version headers (which are bare "7.76.0-ota.1" without "v").
59-
CL_BRANCH="release-changelog/${SEMVER_VERSION}"
60-
git fetch origin "$CL_BRANCH" 2>/dev/null || true
61-
if git rev-parse "origin/${CL_BRANCH}" >/dev/null 2>&1; then
62-
git checkout "$CL_BRANCH"
63-
if grep -q "v${SEMVER_VERSION}" CHANGELOG.md 2>/dev/null; then
64-
sed -i "s|v${SEMVER_VERSION}|v${RUNWAY_VERSION}|g" CHANGELOG.md
65-
if ! git diff --quiet CHANGELOG.md; then
66-
git add CHANGELOG.md
67-
git commit -m "fix: use Runway tag v${RUNWAY_VERSION} in changelog comparison URLs"
68-
git push origin "$CL_BRANCH"
69-
echo "Fixed changelog comparison URLs: v${SEMVER_VERSION} → v${RUNWAY_VERSION}"
70-
fi
71-
fi
72-
fi
43+
exec "$SCRIPT" "$RELEASE_BRANCH" "$PLATFORM" "$REPO_URL" "$PREV_REF" "" "$RUNWAY_VERSION"
7344
else
74-
# Regular release or single-digit hotfix: pass through unchanged
45+
# Native release or hotfix: pass through; the tool derives the version from package.json.
7546
exec "$SCRIPT" "$RELEASE_BRANCH" "$PLATFORM" "$REPO_URL" "$PREV_REF"
7647
fi

.github/workflows/auto-create-release-pr.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: Auto Create Release PR
22

3-
# When Runway creates release/X.Y.Z, this workflow calls create-release-pr.yml.
4-
# Semver convention for mobile hotfixes:
5-
# - X.Y.0 — regular release (no OTA_VERSION bump)
6-
# - X.Y.Z with a single-digit patch (e.g. 7.71.1, 7.71.2) — regular hotfix (no OTA_VERSION bump)
7-
# - X.Y.AB with a two-digit patch (e.g. 7.73.01, 7.73.21) — OTA hotfix; OTA_VERSION is v7.73.01.
8-
# Two-digit patch AB → base patch A, OTA iteration B.
9-
# CHANGELOG.md uses the SemVer prerelease format (e.g. 7.73.0-ota.1) permanently
10-
# because auto-changelog validates all version headers as strict SemVer.
3+
# When Runway creates release/X.Y.Z (native) or release/X.Y.Z-ota (OTA hotfix),
4+
# this workflow calls create-release-pr.yml.
5+
# Semver / branch convention for mobile hotfixes:
6+
# - release/X.Y.0 — regular release (no OTA_VERSION bump).
7+
# - release/X.Y.Z (Z > 0) — native hotfix (no OTA_VERSION bump).
8+
# - release/X.Y.Z-ota — OTA hotfix; OTA_VERSION is set to v<X.Y.Z>.
9+
# Runway always increments Z past any existing native patch on the same X.Y
10+
# line, so the production OTA tag v<X.Y.Z> never collides with a native tag.
11+
# The `-ota` suffix is a branch-name convention ONLY: CHANGELOG.md header,
12+
# OTA_VERSION, and the production git tag all use the bare X.Y.Z.
1113

1214
on:
1315
create:
@@ -23,6 +25,7 @@ jobs:
2325
runs-on: ubuntu-latest
2426
outputs:
2527
semver: ${{ steps.out.outputs.semver }}
28+
is_ota: ${{ steps.out.outputs.is_ota }}
2629
steps:
2730
- name: Checkout repository
2831
uses: actions/checkout@v4
@@ -44,3 +47,4 @@ jobs:
4447
google-application-creds-base64: ${{ secrets.GCP_RLS_SHEET_ACCOUNT_BASE64 }}
4548
with:
4649
semver-version: ${{ needs.extract.outputs.semver }}
50+
is-ota: ${{ needs.extract.outputs.is_ota == 'true' }}

.github/workflows/build-rc-auto.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ jobs:
5454
echo "Checking branch: $BRANCH_NAME"
5555
echo "branch-name=$BRANCH_NAME" >> "$GITHUB_OUTPUT"
5656
57-
# Validate branch matches release/x.y.z format (semantic versioning)
58-
if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
57+
# Validate branch matches release/x.y.z or release/x.y.z-ota (OTA hotfix) format
58+
if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+(-ota)?$ ]]; then
5959
VERSION="${BRANCH_NAME#release/}"
60+
# Strip `-ota` suffix: it is a branch-name convention only. Downstream consumers
61+
# (build-announce display "RC X.Y.Z", test-plan artifact name) expect strict X.Y.Z.
62+
VERSION="${VERSION%-ota}"
6063
echo "Valid release branch detected: $BRANCH_NAME (version: $VERSION)"
6164
echo "semver=$VERSION" >> "$GITHUB_OUTPUT"
6265
else
63-
echo "Branch '$BRANCH_NAME' does not match release/x.y.z pattern. Skipping."
66+
echo "Branch '$BRANCH_NAME' does not match release/x.y.z or release/x.y.z-ota pattern. Skipping."
6467
echo "semver=" >> "$GITHUB_OUTPUT"
6568
exit 1
6669
fi

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ jobs:
748748
ios-tests-ready:
749749
name: 'iOS Tests Ready'
750750
runs-on: ubuntu-latest
751-
if: ${{ needs.build-ios-apps.result == 'success' }}
751+
if: ${{ !cancelled() && needs.build-ios-apps.result == 'success' }}
752752
needs: [build-ios-apps]
753753
steps:
754754
- name: iOS build complete

0 commit comments

Comments
 (0)