@deeeed/metamask-harness 0.17.5 → 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 +1059 -0
- package/README.md +91 -140
- package/adapters/core/inject.sh +1 -6
- package/adapters/extension/console-tail.mjs +55 -24
- package/adapters/extension/ensure-browser.sh +6 -1
- package/adapters/extension/inject.mjs +7 -13
- package/adapters/extension/launch-browser.cjs +7 -1
- package/adapters/extension/launch-webpack.cjs +83 -0
- package/adapters/extension/launch.sh +8 -11
- package/adapters/extension/lib/chrome-args.cjs +8 -1
- package/adapters/extension/lib/macos-focus.cjs +32 -0
- package/adapters/extension/live.sh +12 -21
- package/adapters/extension/reattach.sh +1 -0
- package/adapters/extension/seed-fixture.sh +4 -12
- package/adapters/extension/sidepanel-toggle.sh +4 -1
- package/adapters/extension/stamp-runtime-title.cjs +58 -0
- package/adapters/extension/start-watch.sh +17 -4
- package/adapters/extension/stop-viewers.sh +1 -1
- package/adapters/extension/sync-webpack-dist.cjs +107 -0
- package/adapters/extension/verify.sh +2 -2
- package/adapters/manifest.json +53 -37
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +16 -0
- package/adapters/mobile/bridge-runtime/console-forwarder.cjs +1 -1
- package/adapters/mobile/bridge-runtime/lib/match-bridge-target.cjs +3 -1
- package/adapters/mobile/bridge-runtime/lib/target-discovery.cjs +2 -3
- package/adapters/mobile/cleanup.sh +16 -176
- package/adapters/mobile/inject.sh +91 -671
- package/adapters/mobile/launch-console-forwarder.cjs +39 -0
- package/adapters/mobile/open-device.sh +45 -7
- package/adapters/mobile/start-console-forwarder.sh +70 -0
- package/adapters/mobile/start-metro.sh +0 -41
- package/adapters/mobile/verify.sh +34 -83
- package/adapters/mobile/wait-for-bridge.sh +22 -8
- package/adapters/shared/harness-source-fingerprint.mjs +14 -12
- package/adapters/shared/resolve-slot-ports-core.mjs +17 -6
- package/adapters/shared/resolve-slot-ports.sh +17 -5
- package/adapters/shared/update-check-worker.mjs +43 -0
- package/bin/mm-harness +21 -2
- package/dist/adapters/core/surface.js +4 -1
- package/dist/adapters/extension/console-capture.js +95 -0
- package/dist/adapters/extension/product-config.js +110 -0
- package/dist/adapters/extension/runtime-decision.js +20 -2
- package/dist/adapters/extension/surface.js +22 -3
- package/dist/adapters/harness-freshness.js +49 -0
- package/dist/adapters/mobile/perps-env.js +43 -3
- package/dist/adapters/mobile/prepare.js +39 -7
- package/dist/adapters/mobile/surface.js +5 -2
- package/dist/adapters/resolve-slot-ports.js +2 -2
- package/dist/adapters/slot-ports.js +13 -16
- package/dist/adapters.js +56 -16
- package/dist/checkout-lock.js +27 -2
- package/dist/cli-color.js +19 -0
- package/dist/cli-commands.js +1 -1
- package/dist/cli.js +7 -18
- package/dist/command-contract.js +462 -0
- package/dist/command-journal.js +263 -0
- package/dist/commands/call.js +252 -57
- package/dist/commands/check.js +10 -4
- package/dist/commands/completion-candidates.js +17 -22
- package/dist/commands/device-target.js +27 -12
- package/dist/commands/doctor.js +106 -25
- package/dist/commands/fixtures.js +142 -35
- package/dist/commands/last.js +60 -0
- package/dist/commands/launch/extension.js +40 -17
- package/dist/commands/launch/index.js +207 -63
- package/dist/commands/launch/mobile.js +2 -0
- package/dist/commands/list-executables.js +187 -29
- package/dist/commands/logs.js +8 -6
- package/dist/commands/manifest.js +286 -35
- package/dist/commands/parse-args.js +68 -4
- package/dist/commands/provision.js +10 -4
- package/dist/commands/run-engine.js +772 -264
- package/dist/commands/run-report.js +12 -3
- package/dist/commands/run.js +378 -85
- package/dist/commands/shared.js +76 -4
- package/dist/commands/status-probe.js +4 -1
- package/dist/commands/status.js +2 -1
- package/dist/commands/stop.js +7 -2
- package/dist/commands/update.js +16 -28
- package/dist/completions-cache.js +1 -1
- package/dist/doctor.js +57 -10
- package/dist/harness.js +47 -137
- package/dist/heal-bounds.js +7 -2
- package/dist/json-stream.js +57 -0
- package/dist/live-adapter-contract.js +138 -32
- package/dist/manifest.js +161 -1
- package/dist/mm-harness-cli.js +146 -73
- package/dist/paths.js +2 -5
- package/dist/recipe-security.js +178 -0
- package/dist/run-diagnostics.js +261 -0
- package/dist/run-recording.js +1 -1
- package/dist/runner.js +140 -9
- package/docs/CONTRIBUTING.md +136 -0
- package/docs/QA.md +184 -0
- package/docs/RECIPES.md +122 -0
- package/docs/SECURITY.md +88 -0
- package/library/README.md +7 -3
- package/library/actions/core/perps/_controller.mjs +43 -56
- 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/core/perps/read_account.mjs +2 -2
- package/library/actions/core/perps/read_orders.mjs +2 -1
- package/library/actions/core/perps/read_positions.mjs +2 -1
- package/library/actions/core/wallet/list_accounts.mjs +95 -0
- 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/extension/platform/cdp.mjs +1 -0
- package/library/actions/extension/wallet/list_accounts.mjs +41 -0
- 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/actions/mobile/wallet/list_accounts.mjs +37 -0
- package/library/library.json +1 -1
- package/library/manifests/core.action-manifest.json +1214 -396
- package/library/manifests/extension.action-manifest.json +1635 -728
- package/library/manifests/mobile.action-manifest.json +1740 -727
- 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 -398
- package/library/recipes/runner/action-validation.mobile.recipe.json +316 -402
- package/library/recipes/runner/smoke.core.recipe.json +25 -0
- 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 +40 -0
- package/library/recipes/wallet/smoke.mobile.recipe.json +40 -0
- package/package.json +12 -5
- package/scripts/completions.sh +8 -11
- package/scripts/validate-human-outcomes.mjs +169 -0
- package/adapters/mobile/overlay/app/dev-tools/AgenticService/AgentStepHud.tsx.patch +0 -185
- package/adapters/mobile/overlay/app/dev-tools/AgenticService/AgenticService.ts.patch +0 -1662
- package/adapters/mobile/overlay/compat/README.md +0 -28
- package/adapters/mobile/overlay/compat/rn81-message-event-source.patch +0 -42
- package/adapters/shared/resolve-farmslot-ports-core.mjs +0 -3
- package/adapters/shared/resolve-farmslot-ports.mjs +0 -5
- package/adapters/shared/resolve-farmslot-ports.sh +0 -7
- package/dist/adapters/extension/harness-freshness.js +0 -39
- package/dist/commands/flows.js +0 -62
- package/docs/ADAPTER-SURFACE.md +0 -119
- package/docs/CHEATSHEET.md +0 -61
- package/docs/CLI-SPEC.md +0 -1098
- package/docs/CODE-MAP.md +0 -62
- package/docs/DEBUG-HANDOVER.md +0 -36
- package/docs/MENTAL-MODEL.md +0 -295
- package/docs/UX-PRINCIPLES.md +0 -64
- package/docs/architecture.md +0 -398
- package/docs/live-adapter-contract.md +0 -188
- package/docs/package-boundaries.md +0 -47
- package/docs/perps-flow-catalog.md +0 -235
- package/docs/recipe-libraries.md +0 -301
- package/docs/runtime-file-conventions.md +0 -36
- package/library/flows/perps.flows.json +0 -64
|
@@ -1,416 +1,330 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
3
|
"title": "MetaMask Extension action E2E validation",
|
|
4
4
|
"description": "Exercises every Extension manifest-declared action against mme-4 and leaves trace output for false-positive checks.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"assert-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
"
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
"
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "prepare-files",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"prepare-files": {
|
|
9
|
+
"action": "command",
|
|
10
|
+
"cmd": "mkdir -p temp/recipe-runner.action-validation && printf 'E2E_ACTION_VALIDATION extension\\n' > temp/recipe-runner.action-validation/probe.txt && printf '{\"platform\":\"extension\",\"ok\":true}\n' > temp/recipe-runner.action-validation/probe.json && printf 'extension log E2E_ACTION_VALIDATION\\n' > temp/recipe-runner.action-validation/validation.log && echo E2E_ACTION_VALIDATION extension",
|
|
11
|
+
"next": "assert-command-exit",
|
|
12
|
+
"intent": "Prepare runner.action-validation probe files"
|
|
13
|
+
},
|
|
14
|
+
"assert-command-exit": {
|
|
15
|
+
"action": "assert_exit_code",
|
|
16
|
+
"source": "prepare-files",
|
|
17
|
+
"expected": 0,
|
|
18
|
+
"next": "assert-command-output",
|
|
19
|
+
"intent": "Verify the probe command exited successfully"
|
|
20
|
+
},
|
|
21
|
+
"assert-command-output": {
|
|
22
|
+
"action": "assert_output",
|
|
23
|
+
"source": "prepare-files",
|
|
24
|
+
"stream": "stdout",
|
|
25
|
+
"contains": "E2E_ACTION_VALIDATION extension",
|
|
26
|
+
"next": "assert-file",
|
|
27
|
+
"intent": "Verify the probe command produced expected output"
|
|
28
|
+
},
|
|
29
|
+
"assert-file": {
|
|
30
|
+
"action": "assert_file",
|
|
31
|
+
"path": "temp/recipe-runner.action-validation/probe.txt",
|
|
32
|
+
"contains": "E2E_ACTION_VALIDATION extension",
|
|
33
|
+
"next": "assert-json",
|
|
34
|
+
"intent": "Verify file assertions work"
|
|
35
|
+
},
|
|
36
|
+
"assert-json": {
|
|
37
|
+
"action": "assert_json",
|
|
38
|
+
"path": "temp/recipe-runner.action-validation/probe.json",
|
|
39
|
+
"assert": {
|
|
40
|
+
"path": "$.platform",
|
|
41
|
+
"operator": "eq",
|
|
42
|
+
"value": "extension"
|
|
43
|
+
},
|
|
44
|
+
"next": "watch-logs",
|
|
45
|
+
"intent": "Verify JSON assertions work"
|
|
46
|
+
},
|
|
47
|
+
"watch-logs": {
|
|
48
|
+
"action": "watch_logs",
|
|
49
|
+
"path": "temp/recipe-runner.action-validation/validation.log",
|
|
50
|
+
"contains": "E2E_ACTION_VALIDATION",
|
|
51
|
+
"next": "index-artifacts",
|
|
52
|
+
"intent": "Verify log watching works"
|
|
53
|
+
},
|
|
54
|
+
"index-artifacts": {
|
|
55
|
+
"action": "index_artifacts",
|
|
56
|
+
"artifacts": [
|
|
57
|
+
{
|
|
58
|
+
"path": "temp/recipe-runner.action-validation/probe.txt",
|
|
59
|
+
"type": "log",
|
|
60
|
+
"category": "debug",
|
|
61
|
+
"label": "Extension action validation probe"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"next": "wait",
|
|
65
|
+
"intent": "Register the probe file as an artifact"
|
|
66
|
+
},
|
|
67
|
+
"wait": {
|
|
68
|
+
"action": "wait",
|
|
69
|
+
"duration_ms": 1,
|
|
70
|
+
"next": "status",
|
|
71
|
+
"intent": "Verify the base wait action works"
|
|
72
|
+
},
|
|
73
|
+
"status": {
|
|
74
|
+
"action": "app.status",
|
|
75
|
+
"next": "app-hud",
|
|
76
|
+
"intent": "Read project runner compatibility status"
|
|
77
|
+
},
|
|
78
|
+
"cdp-probe": {
|
|
79
|
+
"action": "cdp.target",
|
|
80
|
+
"next": "wallet-unlock",
|
|
81
|
+
"required": true,
|
|
82
|
+
"intent": "Verify the automation channel is reachable"
|
|
83
|
+
},
|
|
84
|
+
"fixture": {
|
|
85
|
+
"action": "metamask.wallet.fixture_status",
|
|
86
|
+
"next": "wallet-setup",
|
|
87
|
+
"intent": "Verify wallet fixture availability"
|
|
88
|
+
},
|
|
89
|
+
"wallet-setup": {
|
|
90
|
+
"action": "metamask.wallet.setup",
|
|
91
|
+
"next": "cdp-probe",
|
|
92
|
+
"intent": "Verify wallet setup is ready"
|
|
93
|
+
},
|
|
94
|
+
"wallet-unlock": {
|
|
95
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
96
|
+
"next": "wallet-read-state",
|
|
97
|
+
"intent": "Ensure the wallet is unlocked"
|
|
98
|
+
},
|
|
99
|
+
"wallet-read-state": {
|
|
100
|
+
"action": "metamask.wallet.read_state",
|
|
101
|
+
"next": "wallet-list-accounts",
|
|
102
|
+
"intent": "Read wallet state for proof"
|
|
103
|
+
},
|
|
104
|
+
"wallet-list-accounts": {
|
|
105
|
+
"action": "metamask.wallet.list_accounts",
|
|
106
|
+
"next": "extension-account-list",
|
|
107
|
+
"intent": "List wallet accounts for proof"
|
|
108
|
+
},
|
|
109
|
+
"app-navigate-wallet": {
|
|
110
|
+
"action": "ui.navigate",
|
|
111
|
+
"next": "app-navigate-perps",
|
|
112
|
+
"intent": "Show the wallet home surface",
|
|
113
|
+
"hash": "#/"
|
|
114
|
+
},
|
|
115
|
+
"app-navigate-perps": {
|
|
116
|
+
"action": "ui.navigate",
|
|
117
|
+
"next": "ui-wait-perps",
|
|
118
|
+
"intent": "Open the Perps tab",
|
|
119
|
+
"hash": "#/?tab=perps"
|
|
120
|
+
},
|
|
121
|
+
"ui-wait-perps": {
|
|
122
|
+
"action": "ui.wait_for",
|
|
123
|
+
"text": "Perps",
|
|
124
|
+
"expected": "visible",
|
|
125
|
+
"next": "ui-press",
|
|
126
|
+
"intent": "Confirm the Perps surface is ready"
|
|
127
|
+
},
|
|
128
|
+
"ui-press": {
|
|
129
|
+
"action": "ui.press",
|
|
130
|
+
"selector": "body",
|
|
131
|
+
"next": "ui-scroll",
|
|
132
|
+
"intent": "Activate the visible control"
|
|
133
|
+
},
|
|
134
|
+
"ui-scroll": {
|
|
135
|
+
"action": "ui.scroll",
|
|
136
|
+
"offset": 120,
|
|
137
|
+
"next": "ui-scroll-into-view",
|
|
138
|
+
"intent": "Expose the next visible content"
|
|
139
|
+
},
|
|
140
|
+
"ui-screenshot-perps": {
|
|
141
|
+
"action": "ui.screenshot",
|
|
142
|
+
"path": "screenshots/extension-perps-runner.action-validation.png",
|
|
143
|
+
"timeout_ms": 5000,
|
|
144
|
+
"next": "wallet-navigate-perps",
|
|
145
|
+
"intent": "Record the visible Perps state as evidence"
|
|
146
|
+
},
|
|
147
|
+
"wallet-navigate-perps": {
|
|
148
|
+
"action": "ui.navigate",
|
|
149
|
+
"next": "perps-navigate-home",
|
|
150
|
+
"intent": "Show the Perps home surface",
|
|
151
|
+
"hash": "#/?tab=perps"
|
|
152
|
+
},
|
|
153
|
+
"perps-navigate-home": {
|
|
154
|
+
"action": "ui.navigate",
|
|
155
|
+
"next": "perps-navigate-market",
|
|
156
|
+
"intent": "Show the Perps home surface",
|
|
157
|
+
"hash": "#/?tab=perps"
|
|
158
|
+
},
|
|
159
|
+
"perps-navigate-market": {
|
|
160
|
+
"action": "ui.navigate",
|
|
161
|
+
"next": "start-state",
|
|
162
|
+
"intent": "Show the ETH Perps market details",
|
|
163
|
+
"hash": "#/perps/market/ETH"
|
|
164
|
+
},
|
|
165
|
+
"ensure-clean": {
|
|
166
|
+
"action": "metamask.perps.ensure_positions",
|
|
167
|
+
"market": "ETH",
|
|
168
|
+
"next": "ensure-orders-clean",
|
|
169
|
+
"state": "none",
|
|
170
|
+
"intent": "Ensure no positions are open",
|
|
171
|
+
"mode": "matching"
|
|
172
|
+
},
|
|
173
|
+
"assert-no-position": {
|
|
174
|
+
"action": "metamask.perps.assert_positions",
|
|
175
|
+
"market": "ETH",
|
|
176
|
+
"next": "read-orders-empty",
|
|
177
|
+
"state": "none",
|
|
178
|
+
"intent": "Confirm selected ETH position state is clean",
|
|
179
|
+
"mode": "matching"
|
|
180
|
+
},
|
|
181
|
+
"read-orders-empty": {
|
|
182
|
+
"action": "metamask.perps.read_orders",
|
|
183
|
+
"market": "ETH",
|
|
184
|
+
"next": "assert-no-orders",
|
|
185
|
+
"intent": "Read order state after cleanup"
|
|
186
|
+
},
|
|
187
|
+
"place-order": {
|
|
188
|
+
"action": "metamask.perps.place_order",
|
|
189
|
+
"market": "ETH",
|
|
190
|
+
"side": "long",
|
|
191
|
+
"amount": "11",
|
|
192
|
+
"leverage": 3,
|
|
193
|
+
"next": "read-positions",
|
|
194
|
+
"intent": "Place a small ETH 3x long validation order"
|
|
195
|
+
},
|
|
196
|
+
"read-positions": {
|
|
197
|
+
"action": "metamask.perps.read_positions",
|
|
198
|
+
"market": "ETH",
|
|
199
|
+
"next": "assert-position",
|
|
200
|
+
"intent": "Read ETH position after order placement"
|
|
201
|
+
},
|
|
202
|
+
"assert-position": {
|
|
203
|
+
"action": "metamask.perps.assert_positions",
|
|
204
|
+
"market": "ETH",
|
|
205
|
+
"next": "read-orders-open",
|
|
206
|
+
"state": "open",
|
|
207
|
+
"intent": "Confirm the ETH validation position opened"
|
|
208
|
+
},
|
|
209
|
+
"read-orders-open": {
|
|
210
|
+
"action": "metamask.perps.read_orders",
|
|
211
|
+
"market": "ETH",
|
|
212
|
+
"next": "close-orders",
|
|
213
|
+
"intent": "Read ETH orders before cleanup"
|
|
214
|
+
},
|
|
215
|
+
"assert-closed": {
|
|
216
|
+
"action": "metamask.perps.assert_positions",
|
|
217
|
+
"market": "ETH",
|
|
218
|
+
"next": "teardown-state",
|
|
219
|
+
"state": "none",
|
|
220
|
+
"intent": "Confirm global position cleanup completed",
|
|
221
|
+
"mode": "matching"
|
|
222
|
+
},
|
|
223
|
+
"done": {
|
|
224
|
+
"action": "end",
|
|
225
|
+
"status": "pass"
|
|
226
|
+
},
|
|
227
|
+
"ensure-orders-clean": {
|
|
228
|
+
"action": "metamask.perps.ensure_orders",
|
|
229
|
+
"market": "ETH",
|
|
230
|
+
"state": "none",
|
|
231
|
+
"next": "assert-no-position",
|
|
232
|
+
"intent": "Ensure no orders are open",
|
|
233
|
+
"mode": "matching"
|
|
234
|
+
},
|
|
235
|
+
"assert-no-orders": {
|
|
236
|
+
"action": "metamask.perps.assert_orders",
|
|
237
|
+
"market": "ETH",
|
|
238
|
+
"state": "none",
|
|
239
|
+
"next": "place-order",
|
|
240
|
+
"intent": "Confirm selected ETH order state is clean",
|
|
241
|
+
"mode": "matching"
|
|
242
|
+
},
|
|
243
|
+
"close-orders": {
|
|
244
|
+
"action": "metamask.perps.close_orders",
|
|
245
|
+
"market": "ETH",
|
|
246
|
+
"next": "close-positions",
|
|
247
|
+
"intent": "Close ETH orders created by validation"
|
|
248
|
+
},
|
|
249
|
+
"close-positions": {
|
|
250
|
+
"action": "metamask.perps.close_positions",
|
|
251
|
+
"market": "ETH",
|
|
252
|
+
"next": "assert-closed",
|
|
253
|
+
"intent": "Close the ETH validation position"
|
|
254
|
+
},
|
|
255
|
+
"start-state": {
|
|
256
|
+
"action": "metamask.perps.start_state",
|
|
257
|
+
"profile": "clean_market_testnet",
|
|
258
|
+
"market": "ETH",
|
|
259
|
+
"positions": {
|
|
211
260
|
"state": "none",
|
|
212
|
-
"intent": "Ensure no positions are open",
|
|
213
|
-
"detail": "Use the reusable Perps position precondition in selected-market cleanup mode.",
|
|
214
|
-
"flow": "perps setup",
|
|
215
261
|
"mode": "matching"
|
|
216
262
|
},
|
|
217
|
-
"
|
|
218
|
-
"action": "metamask.perps.assert_positions",
|
|
219
|
-
"market": "ETH",
|
|
220
|
-
"next": "read-orders-empty",
|
|
263
|
+
"orders": {
|
|
221
264
|
"state": "none",
|
|
222
|
-
"intent": "Confirm selected ETH position state is clean",
|
|
223
|
-
"detail": "Assert no position exists before placing a validation order.",
|
|
224
|
-
"flow": "perps setup",
|
|
225
265
|
"mode": "matching"
|
|
226
266
|
},
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"
|
|
236
|
-
"action": "metamask.perps.place_order",
|
|
237
|
-
"market": "ETH",
|
|
238
|
-
"side": "long",
|
|
239
|
-
"amount": "11",
|
|
240
|
-
"leverage": 3,
|
|
241
|
-
"next": "read-positions",
|
|
242
|
-
"intent": "Place a small ETH 3x long validation order",
|
|
243
|
-
"detail": "Create an approximately $11 real Perps position through the runner action.",
|
|
244
|
-
"flow": "perps validation"
|
|
245
|
-
},
|
|
246
|
-
"read-positions": {
|
|
247
|
-
"action": "metamask.perps.read_positions",
|
|
248
|
-
"market": "ETH",
|
|
249
|
-
"next": "assert-position",
|
|
250
|
-
"intent": "Read ETH position after order placement",
|
|
251
|
-
"detail": "Collect current ETH position state for proof.",
|
|
252
|
-
"flow": "perps validation"
|
|
253
|
-
},
|
|
254
|
-
"assert-position": {
|
|
255
|
-
"action": "metamask.perps.assert_positions",
|
|
256
|
-
"market": "ETH",
|
|
257
|
-
"next": "read-orders-open",
|
|
258
|
-
"state": "open",
|
|
259
|
-
"intent": "Confirm the ETH validation position opened",
|
|
260
|
-
"detail": "Assert the order produced an open ETH position.",
|
|
261
|
-
"flow": "perps validation"
|
|
262
|
-
},
|
|
263
|
-
"read-orders-open": {
|
|
264
|
-
"action": "metamask.perps.read_orders",
|
|
265
|
-
"market": "ETH",
|
|
266
|
-
"next": "close-orders",
|
|
267
|
-
"intent": "Read ETH orders before cleanup",
|
|
268
|
-
"detail": "Collect order state before closing validation artifacts.",
|
|
269
|
-
"flow": "perps validation"
|
|
270
|
-
},
|
|
271
|
-
"assert-closed": {
|
|
272
|
-
"action": "metamask.perps.assert_positions",
|
|
273
|
-
"market": "ETH",
|
|
274
|
-
"next": "teardown-state",
|
|
267
|
+
"page": "market",
|
|
268
|
+
"next": "ensure-clean",
|
|
269
|
+
"intent": "Prepare selected-market clean testnet Perps validation state",
|
|
270
|
+
"mode": "matching"
|
|
271
|
+
},
|
|
272
|
+
"teardown-state": {
|
|
273
|
+
"action": "metamask.perps.teardown_state",
|
|
274
|
+
"market": "ETH",
|
|
275
|
+
"positions": {
|
|
275
276
|
"state": "none",
|
|
276
|
-
"intent": "Confirm global position cleanup completed",
|
|
277
|
-
"detail": "Assert no selected ETH position remains after cleanup.",
|
|
278
|
-
"flow": "perps teardown",
|
|
279
277
|
"mode": "matching"
|
|
280
278
|
},
|
|
281
|
-
"
|
|
282
|
-
"action": "end",
|
|
283
|
-
"status": "pass",
|
|
284
|
-
"intent": "Finish action validation successfully",
|
|
285
|
-
"detail": "Mark the recipe run as passed after all checks complete.",
|
|
286
|
-
"flow": "teardown"
|
|
287
|
-
},
|
|
288
|
-
"ensure-orders-clean": {
|
|
289
|
-
"action": "metamask.perps.ensure_orders",
|
|
290
|
-
"market": "ETH",
|
|
279
|
+
"orders": {
|
|
291
280
|
"state": "none",
|
|
292
|
-
"next": "assert-no-position",
|
|
293
|
-
"intent": "Ensure no orders are open",
|
|
294
|
-
"detail": "Use the reusable Perps order precondition in selected-market cleanup mode.",
|
|
295
|
-
"flow": "perps setup",
|
|
296
281
|
"mode": "matching"
|
|
297
282
|
},
|
|
298
|
-
"
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
"
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
"teardown-state": {
|
|
344
|
-
"action": "metamask.perps.teardown_state",
|
|
345
|
-
"market": "ETH",
|
|
346
|
-
"positions": {
|
|
347
|
-
"state": "none",
|
|
348
|
-
"mode": "matching"
|
|
349
|
-
},
|
|
350
|
-
"orders": {
|
|
351
|
-
"state": "none",
|
|
352
|
-
"mode": "matching"
|
|
353
|
-
},
|
|
354
|
-
"page": "home",
|
|
355
|
-
"next": "done",
|
|
356
|
-
"intent": "Return Perps to a selected-market clean home state",
|
|
357
|
-
"detail": "Close remaining ETH positions and orders so the account ends selected-market clean.",
|
|
358
|
-
"flow": "perps teardown",
|
|
359
|
-
"mode": "matching"
|
|
360
|
-
},
|
|
361
|
-
"app-hud": {
|
|
362
|
-
"action": "app.hud",
|
|
363
|
-
"text": "extension action parity validation",
|
|
364
|
-
"status": "running",
|
|
365
|
-
"next": "fixture",
|
|
366
|
-
"intent": "Start visible recipe progress HUD",
|
|
367
|
-
"detail": "Show the human reviewer what this validation is doing.",
|
|
368
|
-
"flow": "setup"
|
|
369
|
-
},
|
|
370
|
-
"select-account": {
|
|
371
|
-
"action": "metamask.wallet.select_account",
|
|
372
|
-
"address": "0x8dc623e964475d4d669da601fd15ea9125469003",
|
|
373
|
-
"next": "app-navigate-wallet",
|
|
374
|
-
"intent": "Select the validation account",
|
|
375
|
-
"detail": "Ensure the run uses the configured deterministic account.",
|
|
376
|
-
"flow": "wallet"
|
|
377
|
-
},
|
|
378
|
-
"ui-scroll-into-view": {
|
|
379
|
-
"action": "ui.scroll",
|
|
380
|
-
"selector": "body",
|
|
381
|
-
"scroll_into_view": true,
|
|
382
|
-
"next": "ui-screenshot-perps",
|
|
383
|
-
"intent": "Bring the extension page into view for proof",
|
|
384
|
-
"detail": "Exercise the Recipe v1 scroll_into_view contract over CDP.",
|
|
385
|
-
"flow": "ui"
|
|
386
|
-
},
|
|
387
|
-
"extension-account-list": {
|
|
388
|
-
"action": "ui.navigate",
|
|
389
|
-
"hash": "/account-list",
|
|
390
|
-
"next": "extension-account-search-visible",
|
|
391
|
-
"intent": "Open a harmless extension text input surface",
|
|
392
|
-
"detail": "Navigate to the account list so Recipe v1 can validate generic text input through a real DOM input.",
|
|
393
|
-
"flow": "ui"
|
|
394
|
-
},
|
|
395
|
-
"extension-account-search-visible": {
|
|
396
|
-
"action": "ui.wait_for",
|
|
397
|
-
"selector": "[data-testid=multichain-account-list-search] input",
|
|
398
|
-
"visible": true,
|
|
399
|
-
"timeout_ms": 10000,
|
|
400
|
-
"next": "ui-set-input-account-search",
|
|
401
|
-
"intent": "Wait for the account search input",
|
|
402
|
-
"detail": "Ensure the DOM input exists before setting text.",
|
|
403
|
-
"flow": "ui"
|
|
404
|
-
},
|
|
405
|
-
"ui-set-input-account-search": {
|
|
406
|
-
"action": "ui.set_input",
|
|
407
|
-
"selector": "[data-testid=multichain-account-list-search] input",
|
|
408
|
-
"value": "Account",
|
|
409
|
-
"next": "select-account",
|
|
410
|
-
"intent": "Set a visible account search value",
|
|
411
|
-
"detail": "Exercise ui.set_input on a harmless search field without changing wallet or Perps state.",
|
|
412
|
-
"flow": "ui"
|
|
413
|
-
}
|
|
283
|
+
"page": "home",
|
|
284
|
+
"next": "done",
|
|
285
|
+
"intent": "Return Perps to a selected-market clean home state",
|
|
286
|
+
"mode": "matching"
|
|
287
|
+
},
|
|
288
|
+
"app-hud": {
|
|
289
|
+
"action": "app.hud",
|
|
290
|
+
"text": "extension action parity validation",
|
|
291
|
+
"status": "running",
|
|
292
|
+
"next": "fixture",
|
|
293
|
+
"intent": "Start visible recipe progress HUD"
|
|
294
|
+
},
|
|
295
|
+
"select-account": {
|
|
296
|
+
"action": "metamask.wallet.select_account",
|
|
297
|
+
"address": "0x8dc623e964475d4d669da601fd15ea9125469003",
|
|
298
|
+
"next": "app-navigate-wallet",
|
|
299
|
+
"intent": "Select the validation account"
|
|
300
|
+
},
|
|
301
|
+
"ui-scroll-into-view": {
|
|
302
|
+
"action": "ui.scroll",
|
|
303
|
+
"selector": "body",
|
|
304
|
+
"scroll_into_view": true,
|
|
305
|
+
"next": "ui-screenshot-perps",
|
|
306
|
+
"intent": "Expose the extension content needed for proof"
|
|
307
|
+
},
|
|
308
|
+
"extension-account-list": {
|
|
309
|
+
"action": "ui.navigate",
|
|
310
|
+
"hash": "/account-list",
|
|
311
|
+
"next": "extension-account-search-visible",
|
|
312
|
+
"intent": "Open a harmless extension text input surface"
|
|
313
|
+
},
|
|
314
|
+
"extension-account-search-visible": {
|
|
315
|
+
"action": "ui.wait_for",
|
|
316
|
+
"selector": "[data-testid=multichain-account-list-search] input",
|
|
317
|
+
"visible": true,
|
|
318
|
+
"timeout_ms": 10000,
|
|
319
|
+
"next": "ui-set-input-account-search",
|
|
320
|
+
"intent": "Confirm account search is ready"
|
|
321
|
+
},
|
|
322
|
+
"ui-set-input-account-search": {
|
|
323
|
+
"action": "ui.set_input",
|
|
324
|
+
"selector": "[data-testid=multichain-account-list-search] input",
|
|
325
|
+
"value": "Account",
|
|
326
|
+
"next": "select-account",
|
|
327
|
+
"intent": "Filter the visible account list"
|
|
414
328
|
}
|
|
415
329
|
}
|
|
416
330
|
}
|