@deeeed/metamask-harness 0.91.2 → 0.91.4
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
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.91.4 - 2026-10-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Mobile `stop` now exits nonzero after Metro/helper cleanup because the initial app/device state is not recorded and restoration cannot be verified. This corrects a false success report; it does not add automatic simulator shutdown or claim that device cleanup completed. Restore and verify device state through its lifecycle owner.
|
|
10
|
+
|
|
11
|
+
## 0.91.3 - 2026-10-13
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Give Mobile `perps.smoke` executable `smoke` and `cleanup` proof targets for live conformance. Assert live controller reads, bind a HUD screenshot to the smoke, and observe wallet home in teardown, including after a failed smoke.
|
|
16
|
+
|
|
5
17
|
## 0.91.2 - 2026-10-13
|
|
6
18
|
|
|
7
19
|
### Added
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { recipeRuntimePath, shellQuote, writeInteractiveProgress } from "@farmslot/recipe-cli/harness";
|
|
1
|
+
import { EXIT, recipeRuntimePath, shellQuote, writeInteractiveProgress } from "@farmslot/recipe-cli/harness";
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { defineAdapter } from "@farmslot/adapter-sdk";
|
|
@@ -60,9 +60,10 @@ const mobileSurface = defineAdapter({
|
|
|
60
60
|
const args = ["--target", target];
|
|
61
61
|
if (process.env.WATCHER_PORT) args.push("--port", process.env.WATCHER_PORT);
|
|
62
62
|
const result = spawnSync("bash", [leaf, ...args], { encoding: "utf8" });
|
|
63
|
-
const
|
|
63
|
+
const metroStatus = result.status ?? 1;
|
|
64
|
+
const status = metroStatus === 0 ? EXIT.runtime : metroStatus;
|
|
64
65
|
const output = `${result.stdout ?? ""}${result.stderr ?? ""}`.trim();
|
|
65
|
-
const summary =
|
|
66
|
+
const summary = metroStatus === 0 ? `Metro cleanup completed for ${target}, but Mobile app/device restoration is unverified: no initial state is recorded. Restore and verify the device through its lifecycle owner.` : `failed to stop Metro for ${target}`;
|
|
66
67
|
return { kind: "stopped", status, summary, output };
|
|
67
68
|
}
|
|
68
69
|
},
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "MetaMask Mobile Perps smoke observation",
|
|
4
|
+
"description": "Observe live Perps positions and orders and capture the current screen. Caller opens Perps before this read-only proof.",
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "read-positions",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"read-positions": {
|
|
9
|
+
"action": "metamask.perps.read_positions",
|
|
10
|
+
"next": "assert-positions",
|
|
11
|
+
"intent": "Read live Perps positions without changing account state"
|
|
12
|
+
},
|
|
13
|
+
"assert-positions": {
|
|
14
|
+
"action": "assert_output",
|
|
15
|
+
"source": "read-positions",
|
|
16
|
+
"assert": {
|
|
17
|
+
"all": [
|
|
18
|
+
{
|
|
19
|
+
"path": "$.source",
|
|
20
|
+
"operator": "eq",
|
|
21
|
+
"value": "mobile-perps-controller"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "$.count",
|
|
25
|
+
"operator": "gte",
|
|
26
|
+
"value": 0
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "$.positions",
|
|
30
|
+
"operator": "not_null"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"next": "read-orders",
|
|
35
|
+
"intent": "Verify the live controller returned Perps positions"
|
|
36
|
+
},
|
|
37
|
+
"read-orders": {
|
|
38
|
+
"action": "metamask.perps.read_orders",
|
|
39
|
+
"next": "assert-orders",
|
|
40
|
+
"intent": "Read live Perps orders without changing account state"
|
|
41
|
+
},
|
|
42
|
+
"assert-orders": {
|
|
43
|
+
"action": "assert_output",
|
|
44
|
+
"source": "read-orders",
|
|
45
|
+
"assert": {
|
|
46
|
+
"all": [
|
|
47
|
+
{
|
|
48
|
+
"path": "$.source",
|
|
49
|
+
"operator": "eq",
|
|
50
|
+
"value": "mobile-perps-controller-open-orders"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"path": "$.count",
|
|
54
|
+
"operator": "gte",
|
|
55
|
+
"value": 0
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "$.orders",
|
|
59
|
+
"operator": "not_null"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"next": "capture",
|
|
64
|
+
"intent": "Verify the live controller returned Perps orders"
|
|
65
|
+
},
|
|
66
|
+
"capture": {
|
|
67
|
+
"action": "ui.screenshot",
|
|
68
|
+
"path": "screenshots/perps-smoke.png",
|
|
69
|
+
"next": "done",
|
|
70
|
+
"intent": "Keep a view of the Perps screen after verifying live account reads"
|
|
71
|
+
},
|
|
72
|
+
"done": {
|
|
73
|
+
"action": "end",
|
|
74
|
+
"status": "pass"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
3
|
"title": "MetaMask Mobile Perps smoke",
|
|
4
|
-
"description": "Non-mutating Perps domain smoke for MetaMask Mobile:
|
|
4
|
+
"description": "Non-mutating Perps domain smoke for debug-enabled MetaMask Mobile: unlock if needed, open Perps, assert live positions and orders, and retain a HUD screenshot. Teardown observes wallet home. Does not close positions or stop the app.",
|
|
5
5
|
"workflow": {
|
|
6
6
|
"entry": "status",
|
|
7
7
|
"nodes": {
|
|
@@ -27,23 +27,64 @@
|
|
|
27
27
|
"open-perps": {
|
|
28
28
|
"action": "ui.navigate",
|
|
29
29
|
"page": "perps",
|
|
30
|
-
"next": "
|
|
30
|
+
"next": "observe-perps",
|
|
31
31
|
"intent": "Show the Perps market list"
|
|
32
32
|
},
|
|
33
|
-
"
|
|
34
|
-
"action": "
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"action": "metamask.perps.read_orders",
|
|
33
|
+
"observe-perps": {
|
|
34
|
+
"action": "call",
|
|
35
|
+
"ref": "perps.smoke-observation",
|
|
36
|
+
"proves": [
|
|
37
|
+
"smoke"
|
|
38
|
+
],
|
|
40
39
|
"next": "done",
|
|
41
|
-
"intent": "
|
|
40
|
+
"intent": "Verify live Perps reads and capture the screen with its intent HUD"
|
|
42
41
|
},
|
|
43
42
|
"done": {
|
|
44
43
|
"action": "end",
|
|
45
44
|
"status": "pass"
|
|
45
|
+
},
|
|
46
|
+
"cleanup-home": {
|
|
47
|
+
"action": "ui.navigate",
|
|
48
|
+
"page": "home",
|
|
49
|
+
"next": "cleanup-state",
|
|
50
|
+
"intent": "Return wallet home after Perps smoke"
|
|
51
|
+
},
|
|
52
|
+
"cleanup-state": {
|
|
53
|
+
"action": "metamask.wallet.read_state",
|
|
54
|
+
"next": "cleanup-assert",
|
|
55
|
+
"intent": "Observe the wallet route after returning home"
|
|
56
|
+
},
|
|
57
|
+
"cleanup-assert": {
|
|
58
|
+
"action": "assert_output",
|
|
59
|
+
"source": "cleanup-state",
|
|
60
|
+
"assert": {
|
|
61
|
+
"path": "$.route.name",
|
|
62
|
+
"operator": "eq",
|
|
63
|
+
"value": "WalletView"
|
|
64
|
+
},
|
|
65
|
+
"proves": [
|
|
66
|
+
"cleanup"
|
|
67
|
+
],
|
|
68
|
+
"next": "cleanup-done",
|
|
69
|
+
"intent": "Verify wallet home was reached during cleanup"
|
|
70
|
+
},
|
|
71
|
+
"cleanup-done": {
|
|
72
|
+
"action": "end",
|
|
73
|
+
"status": "pass"
|
|
46
74
|
}
|
|
75
|
+
},
|
|
76
|
+
"teardown": "cleanup-home"
|
|
77
|
+
},
|
|
78
|
+
"proofTargets": [
|
|
79
|
+
{
|
|
80
|
+
"id": "smoke",
|
|
81
|
+
"claim": "The live Mobile Perps controller returns positions and open orders.",
|
|
82
|
+
"proofMode": "state"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "cleanup",
|
|
86
|
+
"claim": "The wallet reports WalletView after returning home from Perps.",
|
|
87
|
+
"proofMode": "state"
|
|
47
88
|
}
|
|
48
|
-
|
|
89
|
+
]
|
|
49
90
|
}
|