@deeeed/metamask-harness 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +187 -0
- package/README.md +4 -7
- package/adapters/core/inject.sh +1 -6
- package/adapters/extension/inject.mjs +1 -4
- package/adapters/extension/verify.sh +1 -1
- package/adapters/mobile/inject.sh +5 -4
- package/adapters/mobile/verify.sh +15 -19
- package/adapters/shared/harness-source-fingerprint.mjs +14 -12
- package/dist/adapters/harness-freshness.js +49 -0
- package/dist/cli.js +0 -4
- package/dist/command-contract.js +51 -40
- package/dist/command-journal.js +50 -12
- package/dist/commands/call.js +95 -20
- package/dist/commands/check.js +1 -1
- package/dist/commands/completion-candidates.js +7 -19
- package/dist/commands/fixtures.js +50 -1
- package/dist/commands/last.js +9 -1
- package/dist/commands/launch/extension.js +2 -2
- package/dist/commands/launch/mobile.js +2 -0
- package/dist/commands/list-executables.js +56 -20
- package/dist/commands/manifest.js +28 -12
- package/dist/commands/parse-args.js +55 -3
- package/dist/commands/provision.js +0 -1
- package/dist/commands/run-engine.js +514 -336
- package/dist/commands/run.js +25 -37
- package/dist/commands/shared.js +1 -1
- package/dist/heal-bounds.js +5 -0
- package/dist/mm-harness-cli.js +22 -30
- package/dist/run-diagnostics.js +1 -1
- package/dist/run-recording.js +1 -1
- package/dist/runner.js +24 -2
- package/docs/CONTRIBUTING.md +2 -3
- package/docs/QA.md +0 -1
- package/docs/RECIPES.md +52 -91
- package/library/README.md +5 -5
- package/library/actions/core/perps/_controller.mjs +33 -1
- package/library/actions/core/perps/assert_orders.mjs +6 -7
- package/library/actions/core/perps/assert_positions.mjs +6 -7
- package/library/actions/core/perps/close_orders.mjs +2 -0
- package/library/actions/core/perps/close_positions.mjs +2 -0
- package/library/actions/core/perps/ensure_orders.mjs +4 -2
- package/library/actions/core/perps/ensure_positions.mjs +4 -2
- package/library/actions/core/perps/place_order.mjs +7 -3
- package/library/actions/extension/perps/assert_orders.mjs +2 -1
- package/library/actions/extension/perps/assert_positions.mjs +2 -1
- package/library/actions/extension/perps/perps.mjs +43 -14
- package/library/actions/mobile/perps/assert_orders.mjs +2 -1
- package/library/actions/mobile/perps/assert_positions.mjs +2 -1
- package/library/actions/mobile/perps/perps.mjs +40 -12
- package/library/library.json +1 -1
- package/library/manifests/core.action-manifest.json +1170 -413
- package/library/manifests/extension.action-manifest.json +1495 -641
- package/library/manifests/mobile.action-manifest.json +1704 -769
- package/library/recipes/app/lifecycle.android-smoke.mobile.recipe.json +63 -81
- package/library/recipes/perps/clean-market-testnet.core.recipe.json +44 -0
- package/library/recipes/perps/clean-market-testnet.recipe.json +49 -0
- package/library/recipes/perps/lifecycle.recipe.json +136 -180
- package/library/recipes/perps/order-lifecycle.core.recipe.json +71 -67
- package/library/recipes/perps/performance.background-resume.mobile.recipe.json +51 -67
- package/library/recipes/perps/performance.cold-start.mobile.recipe.json +51 -67
- package/library/recipes/perps/performance.mobile.recipe.json +37 -51
- package/library/recipes/perps/performance.warm-start.mobile.recipe.json +44 -59
- package/library/recipes/perps/read-markets.core.recipe.json +29 -31
- package/library/recipes/perps/smoke.core.recipe.json +29 -32
- package/library/recipes/perps/smoke.extension.recipe.json +41 -44
- package/library/recipes/perps/smoke.mobile.recipe.json +42 -44
- package/library/recipes/perps/trading-lifecycle.core.recipe.json +69 -65
- package/library/recipes/runner/action-validation.extension.recipe.json +312 -405
- package/library/recipes/runner/action-validation.mobile.recipe.json +316 -409
- package/library/recipes/runner/smoke.core.recipe.json +18 -20
- package/library/recipes/runner/smoke.extension.recipe.json +23 -24
- package/library/recipes/runner/smoke.mobile.recipe.json +23 -24
- package/library/recipes/wallet/smoke.extension.recipe.json +33 -35
- package/library/recipes/wallet/smoke.mobile.recipe.json +33 -35
- package/package.json +3 -3
- package/scripts/completions.sh +1 -4
- package/dist/adapters/extension/harness-freshness.js +0 -39
- package/dist/commands/flows.js +0 -91
- package/library/flows/perps.flows.json +0 -64
|
@@ -1,77 +1,81 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
3
|
"title": "MetaMask core headless Perps order lifecycle",
|
|
4
4
|
"description": "Proves the headless `core` adapter places and cancels a REAL resting Perps LIMIT order on HyperLiquid testnet through the full signing path: a default viem signer backs the perps controller's wallet adapter, the active HyperLiquid testnet provider is initialized, a BTC limit BUY 30% below mid is placed (does not fill — rests on the book), asserted open, then canceled and asserted gone. Leaves the account FLAT — no open orders and no open positions. No CDP, bridge, or UI.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "status",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"status": {
|
|
9
|
+
"action": "app.status",
|
|
10
|
+
"next": "start_flat",
|
|
11
|
+
"intent": "Resolve the core checkout and report headless compatibility mode"
|
|
12
|
+
},
|
|
13
|
+
"start_flat": {
|
|
14
|
+
"action": "metamask.perps.start_state",
|
|
15
|
+
"market": "BTC",
|
|
16
|
+
"positions": {
|
|
17
|
+
"state": "none"
|
|
13
18
|
},
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"market": "BTC",
|
|
17
|
-
"positions": { "state": "none" },
|
|
18
|
-
"orders": { "state": "none" },
|
|
19
|
-
"network": "testnet",
|
|
20
|
-
"timeout_ms": 45000,
|
|
21
|
-
"next": "place_order",
|
|
22
|
-
"intent": "Converge BTC testnet baseline to flat (no positions, no orders) before the proof window"
|
|
19
|
+
"orders": {
|
|
20
|
+
"state": "none"
|
|
23
21
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
"network": "testnet",
|
|
23
|
+
"timeout_ms": 45000,
|
|
24
|
+
"next": "place_order",
|
|
25
|
+
"intent": "Converge BTC testnet baseline to flat (no positions, no orders) before the proof window"
|
|
26
|
+
},
|
|
27
|
+
"place_order": {
|
|
28
|
+
"action": "metamask.perps.place_order",
|
|
29
|
+
"market": "BTC",
|
|
30
|
+
"side": "long",
|
|
31
|
+
"order_type": "limit",
|
|
32
|
+
"offset_pct": -30,
|
|
33
|
+
"notional": "11",
|
|
34
|
+
"leverage": 2,
|
|
35
|
+
"timeout_ms": 45000,
|
|
36
|
+
"next": "assert_open",
|
|
37
|
+
"intent": "Place a resting BTC limit BUY 30% below mid via the headless controller (real signed limit order to HL testnet; does not fill)"
|
|
38
|
+
},
|
|
39
|
+
"assert_open": {
|
|
40
|
+
"action": "metamask.perps.assert_orders",
|
|
41
|
+
"market": "BTC",
|
|
42
|
+
"state": "open",
|
|
43
|
+
"timeout_ms": 30000,
|
|
44
|
+
"next": "cancel_order",
|
|
45
|
+
"intent": "Assert the BTC resting limit order opened"
|
|
46
|
+
},
|
|
47
|
+
"cancel_order": {
|
|
48
|
+
"action": "metamask.perps.close_orders",
|
|
49
|
+
"market": "BTC",
|
|
50
|
+
"timeout_ms": 45000,
|
|
51
|
+
"next": "assert_none",
|
|
52
|
+
"intent": "Cancel the BTC resting limit order via the headless controller (real signed cancel to HL testnet)"
|
|
53
|
+
},
|
|
54
|
+
"assert_none": {
|
|
55
|
+
"action": "metamask.perps.assert_orders",
|
|
56
|
+
"market": "BTC",
|
|
57
|
+
"state": "none",
|
|
58
|
+
"timeout_ms": 30000,
|
|
59
|
+
"next": "teardown_flat",
|
|
60
|
+
"intent": "Assert the BTC order canceled — no open orders remain"
|
|
61
|
+
},
|
|
62
|
+
"teardown_flat": {
|
|
63
|
+
"action": "metamask.perps.teardown_state",
|
|
64
|
+
"market": "BTC",
|
|
65
|
+
"positions": {
|
|
66
|
+
"state": "none"
|
|
36
67
|
},
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"market": "BTC",
|
|
40
|
-
"state": "open",
|
|
41
|
-
"timeout_ms": 30000,
|
|
42
|
-
"next": "cancel_order",
|
|
43
|
-
"intent": "Assert the BTC resting limit order opened"
|
|
68
|
+
"orders": {
|
|
69
|
+
"state": "none"
|
|
44
70
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"assert_none": {
|
|
54
|
-
"action": "metamask.perps.assert_orders",
|
|
55
|
-
"market": "BTC",
|
|
56
|
-
"state": "none",
|
|
57
|
-
"timeout_ms": 30000,
|
|
58
|
-
"next": "teardown_flat",
|
|
59
|
-
"intent": "Assert the BTC order canceled — no open orders remain"
|
|
60
|
-
},
|
|
61
|
-
"teardown_flat": {
|
|
62
|
-
"action": "metamask.perps.teardown_state",
|
|
63
|
-
"market": "BTC",
|
|
64
|
-
"positions": { "state": "none" },
|
|
65
|
-
"orders": { "state": "none" },
|
|
66
|
-
"network": "testnet",
|
|
67
|
-
"timeout_ms": 45000,
|
|
68
|
-
"next": "done",
|
|
69
|
-
"intent": "Restore BTC testnet baseline to flat after the proof (leave the shared account clean)"
|
|
70
|
-
},
|
|
71
|
-
"done": {
|
|
72
|
-
"action": "end",
|
|
73
|
-
"status": "pass"
|
|
74
|
-
}
|
|
71
|
+
"network": "testnet",
|
|
72
|
+
"timeout_ms": 45000,
|
|
73
|
+
"next": "done",
|
|
74
|
+
"intent": "Restore BTC testnet baseline to flat after the proof (leave the shared account clean)"
|
|
75
|
+
},
|
|
76
|
+
"done": {
|
|
77
|
+
"action": "end",
|
|
78
|
+
"status": "pass"
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
}
|
|
@@ -1,71 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"title": "MetaMask Mobile Perps performance
|
|
4
|
-
"description": "Measured Perps
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"open-market-detail": {
|
|
54
|
-
"action": "ui.navigate",
|
|
55
|
-
"page": "perps-market",
|
|
56
|
-
"market": "BTC",
|
|
57
|
-
"intent": "Open the BTC Perps market detail screen",
|
|
58
|
-
"detail": "Navigate to the BTC market detail via the stable page alias; its node duration measures market-detail render time.",
|
|
59
|
-
"flow": "perps",
|
|
60
|
-
"next": "end"
|
|
61
|
-
},
|
|
62
|
-
"end": {
|
|
63
|
-
"action": "end",
|
|
64
|
-
"status": "pass",
|
|
65
|
-
"intent": "Finish the background-resume Perps performance flow",
|
|
66
|
-
"detail": "Terminal node; trace.json holds setup plus measured Perps node durations.",
|
|
67
|
-
"flow": "complete"
|
|
68
|
-
}
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "MetaMask Mobile Perps performance recipe — background resume",
|
|
4
|
+
"description": "Measured Perps recipe from a deterministic background-resume state. The graph backgrounds and foregrounds the installed app without rebuilding, unlocks if needed, then records Perps list, state, and BTC detail timings.",
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "background-app",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"open-perps-list": {
|
|
9
|
+
"action": "ui.navigate",
|
|
10
|
+
"page": "perps",
|
|
11
|
+
"intent": "Open the Perps market list screen",
|
|
12
|
+
"next": "read-positions"
|
|
13
|
+
},
|
|
14
|
+
"read-positions": {
|
|
15
|
+
"action": "metamask.perps.read_positions",
|
|
16
|
+
"intent": "Read the live Perps positions shown on the market list",
|
|
17
|
+
"next": "open-market-detail"
|
|
18
|
+
},
|
|
19
|
+
"open-market-detail": {
|
|
20
|
+
"action": "ui.navigate",
|
|
21
|
+
"page": "perps-market",
|
|
22
|
+
"market": "BTC",
|
|
23
|
+
"intent": "Open the BTC Perps market detail screen",
|
|
24
|
+
"next": "end"
|
|
25
|
+
},
|
|
26
|
+
"end": {
|
|
27
|
+
"action": "end",
|
|
28
|
+
"status": "pass"
|
|
29
|
+
},
|
|
30
|
+
"start-state": {
|
|
31
|
+
"action": "app.status",
|
|
32
|
+
"intent": "Record the stable run start status after background-resume setup",
|
|
33
|
+
"next": "open-perps-list"
|
|
34
|
+
},
|
|
35
|
+
"ensure-unlocked": {
|
|
36
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
37
|
+
"intent": "Unlock the wallet before timing the Perps journey",
|
|
38
|
+
"next": "start-state"
|
|
39
|
+
},
|
|
40
|
+
"foreground-app": {
|
|
41
|
+
"action": "app.lifecycle",
|
|
42
|
+
"command": "foreground",
|
|
43
|
+
"settle_ms": 15000,
|
|
44
|
+
"intent": "Foreground the installed app through the Expo dev-client deep link",
|
|
45
|
+
"next": "ensure-unlocked"
|
|
46
|
+
},
|
|
47
|
+
"background-app": {
|
|
48
|
+
"action": "app.lifecycle",
|
|
49
|
+
"command": "background",
|
|
50
|
+
"settle_ms": 3000,
|
|
51
|
+
"intent": "Put the installed app in the background before measuring resume",
|
|
52
|
+
"next": "foreground-app"
|
|
69
53
|
}
|
|
70
54
|
}
|
|
71
55
|
}
|
|
@@ -1,71 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"title": "MetaMask Mobile Perps performance
|
|
4
|
-
"description": "Measured Perps
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"open-market-detail": {
|
|
54
|
-
"action": "ui.navigate",
|
|
55
|
-
"page": "perps-market",
|
|
56
|
-
"market": "BTC",
|
|
57
|
-
"intent": "Open the BTC Perps market detail screen",
|
|
58
|
-
"detail": "Navigate to the BTC market detail via the stable page alias; its node duration measures market-detail render time.",
|
|
59
|
-
"flow": "perps",
|
|
60
|
-
"next": "end"
|
|
61
|
-
},
|
|
62
|
-
"end": {
|
|
63
|
-
"action": "end",
|
|
64
|
-
"status": "pass",
|
|
65
|
-
"intent": "Finish the cold-start Perps performance flow",
|
|
66
|
-
"detail": "Terminal node; trace.json holds setup plus measured Perps node durations.",
|
|
67
|
-
"flow": "complete"
|
|
68
|
-
}
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "MetaMask Mobile Perps performance recipe — cold process start",
|
|
4
|
+
"description": "Measured Perps recipe from a deterministic cold-process state. The graph terminates and relaunches the installed app without rebuilding, unlocks if needed, then records Perps list, state, and BTC detail timings.",
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "terminate-app",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"open-perps-list": {
|
|
9
|
+
"action": "ui.navigate",
|
|
10
|
+
"page": "perps",
|
|
11
|
+
"intent": "Open the Perps market list screen",
|
|
12
|
+
"next": "read-positions"
|
|
13
|
+
},
|
|
14
|
+
"read-positions": {
|
|
15
|
+
"action": "metamask.perps.read_positions",
|
|
16
|
+
"intent": "Read the live Perps positions shown on the market list",
|
|
17
|
+
"next": "open-market-detail"
|
|
18
|
+
},
|
|
19
|
+
"open-market-detail": {
|
|
20
|
+
"action": "ui.navigate",
|
|
21
|
+
"page": "perps-market",
|
|
22
|
+
"market": "BTC",
|
|
23
|
+
"intent": "Open the BTC Perps market detail screen",
|
|
24
|
+
"next": "end"
|
|
25
|
+
},
|
|
26
|
+
"end": {
|
|
27
|
+
"action": "end",
|
|
28
|
+
"status": "pass"
|
|
29
|
+
},
|
|
30
|
+
"start-state": {
|
|
31
|
+
"action": "app.status",
|
|
32
|
+
"intent": "Record the stable run start status after cold-start setup",
|
|
33
|
+
"next": "open-perps-list"
|
|
34
|
+
},
|
|
35
|
+
"ensure-unlocked": {
|
|
36
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
37
|
+
"intent": "Unlock the wallet before timing the Perps journey",
|
|
38
|
+
"next": "start-state"
|
|
39
|
+
},
|
|
40
|
+
"launch-app": {
|
|
41
|
+
"action": "app.lifecycle",
|
|
42
|
+
"command": "launch",
|
|
43
|
+
"settle_ms": 15000,
|
|
44
|
+
"intent": "Launch the installed app through the Expo dev-client deep link",
|
|
45
|
+
"next": "ensure-unlocked"
|
|
46
|
+
},
|
|
47
|
+
"terminate-app": {
|
|
48
|
+
"action": "app.lifecycle",
|
|
49
|
+
"command": "terminate",
|
|
50
|
+
"settle_ms": 3000,
|
|
51
|
+
"intent": "Terminate the installed app process before measuring cold start",
|
|
52
|
+
"next": "launch-app"
|
|
69
53
|
}
|
|
70
54
|
}
|
|
71
55
|
}
|
|
@@ -1,55 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"title": "MetaMask Mobile Perps performance
|
|
4
|
-
"description": "Canonical measured
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"page": "perps-market",
|
|
40
|
-
"market": "BTC",
|
|
41
|
-
"intent": "Open the BTC Perps market detail screen",
|
|
42
|
-
"detail": "Navigate to the BTC market detail via the stable page alias; its node duration measures market-detail render time.",
|
|
43
|
-
"flow": "perps",
|
|
44
|
-
"next": "end"
|
|
45
|
-
},
|
|
46
|
-
"end": {
|
|
47
|
-
"action": "end",
|
|
48
|
-
"status": "pass",
|
|
49
|
-
"intent": "Finish the measured Perps performance flow",
|
|
50
|
-
"detail": "Terminal node; the passing run's trace.json holds the setup, startState, and measured per-node durations to diff across runs.",
|
|
51
|
-
"flow": "complete"
|
|
52
|
-
}
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "MetaMask Mobile Perps performance recipe",
|
|
4
|
+
"description": "Canonical measured MetaMask Mobile Perps recipe. The graph unlocks the wallet, records stable status, opens the market list, reads live state, and opens market detail. Timings live in trace.json. Run pinned so numbers are comparable: `mm-harness run perps.performance --device <serial> --heal off`. Testnet order placement is omitted to keep the recipe repeatable and non-destructive.",
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "ensure-unlocked",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"open-perps-list": {
|
|
9
|
+
"action": "ui.navigate",
|
|
10
|
+
"page": "perps",
|
|
11
|
+
"intent": "Open the Perps market list screen",
|
|
12
|
+
"next": "read-positions"
|
|
13
|
+
},
|
|
14
|
+
"read-positions": {
|
|
15
|
+
"action": "metamask.perps.read_positions",
|
|
16
|
+
"intent": "Read the live Perps positions shown on the market list",
|
|
17
|
+
"next": "open-market-detail"
|
|
18
|
+
},
|
|
19
|
+
"open-market-detail": {
|
|
20
|
+
"action": "ui.navigate",
|
|
21
|
+
"page": "perps-market",
|
|
22
|
+
"market": "BTC",
|
|
23
|
+
"intent": "Open the BTC Perps market detail screen",
|
|
24
|
+
"next": "end"
|
|
25
|
+
},
|
|
26
|
+
"end": {
|
|
27
|
+
"action": "end",
|
|
28
|
+
"status": "pass"
|
|
29
|
+
},
|
|
30
|
+
"start-state": {
|
|
31
|
+
"action": "app.status",
|
|
32
|
+
"intent": "Record the stable run start status after wallet setup",
|
|
33
|
+
"next": "open-perps-list"
|
|
34
|
+
},
|
|
35
|
+
"ensure-unlocked": {
|
|
36
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
37
|
+
"intent": "Unlock the wallet before timing the Perps journey",
|
|
38
|
+
"next": "start-state"
|
|
53
39
|
}
|
|
54
40
|
}
|
|
55
41
|
}
|
|
@@ -1,63 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"title": "MetaMask Mobile Perps performance
|
|
4
|
-
"description": "Measured Perps
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"action": "ui.navigate",
|
|
47
|
-
"page": "perps-market",
|
|
48
|
-
"market": "BTC",
|
|
49
|
-
"intent": "Open the BTC Perps market detail screen",
|
|
50
|
-
"detail": "Navigate to the BTC market detail via the stable page alias; its node duration measures market-detail render time.",
|
|
51
|
-
"flow": "perps",
|
|
52
|
-
"next": "end"
|
|
53
|
-
},
|
|
54
|
-
"end": {
|
|
55
|
-
"action": "end",
|
|
56
|
-
"status": "pass",
|
|
57
|
-
"intent": "Finish the warm-start Perps performance flow",
|
|
58
|
-
"detail": "Terminal node; trace.json holds setup plus measured Perps node durations.",
|
|
59
|
-
"flow": "complete"
|
|
60
|
-
}
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "MetaMask Mobile Perps performance recipe — warm foreground start",
|
|
4
|
+
"description": "Measured Perps recipe from a deterministic warm foreground state. The graph foregrounds the installed app without rebuilding, unlocks if needed, then records Perps list, state, and BTC detail timings.",
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "foreground-app",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"open-perps-list": {
|
|
9
|
+
"action": "ui.navigate",
|
|
10
|
+
"page": "perps",
|
|
11
|
+
"intent": "Open the Perps market list screen",
|
|
12
|
+
"next": "read-positions"
|
|
13
|
+
},
|
|
14
|
+
"read-positions": {
|
|
15
|
+
"action": "metamask.perps.read_positions",
|
|
16
|
+
"intent": "Read the live Perps positions shown on the market list",
|
|
17
|
+
"next": "open-market-detail"
|
|
18
|
+
},
|
|
19
|
+
"open-market-detail": {
|
|
20
|
+
"action": "ui.navigate",
|
|
21
|
+
"page": "perps-market",
|
|
22
|
+
"market": "BTC",
|
|
23
|
+
"intent": "Open the BTC Perps market detail screen",
|
|
24
|
+
"next": "end"
|
|
25
|
+
},
|
|
26
|
+
"end": {
|
|
27
|
+
"action": "end",
|
|
28
|
+
"status": "pass"
|
|
29
|
+
},
|
|
30
|
+
"start-state": {
|
|
31
|
+
"action": "app.status",
|
|
32
|
+
"intent": "Record the stable run start status after warm foreground setup",
|
|
33
|
+
"next": "open-perps-list"
|
|
34
|
+
},
|
|
35
|
+
"ensure-unlocked": {
|
|
36
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
37
|
+
"intent": "Unlock the wallet before timing the Perps journey",
|
|
38
|
+
"next": "start-state"
|
|
39
|
+
},
|
|
40
|
+
"foreground-app": {
|
|
41
|
+
"action": "app.lifecycle",
|
|
42
|
+
"command": "foreground",
|
|
43
|
+
"settle_ms": 10000,
|
|
44
|
+
"intent": "Foreground the installed app through the Expo dev-client deep link",
|
|
45
|
+
"next": "ensure-unlocked"
|
|
61
46
|
}
|
|
62
47
|
}
|
|
63
48
|
}
|