@deeeed/metamask-harness 0.43.0 → 0.44.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 +25 -0
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +304 -34
- package/adapters/mobile/bridge-runtime/console-forwarder.cjs +20 -8
- package/adapters/mobile/bridge-runtime/lib/cdp-broker.cjs +102 -0
- package/adapters/mobile/bridge-runtime/lib/target-discovery.cjs +4 -2
- package/adapters/mobile/reload-app.mjs +99 -1
- package/dist/adapters/mobile/prepare.js +12 -0
- package/dist/adapters.js +22 -3
- package/dist/commands/call.js +40 -2
- package/dist/commands/run-engine.js +247 -139
- package/dist/commands/run-report.js +68 -0
- package/dist/commands/run.js +47 -2
- package/dist/execution-provenance.js +342 -0
- package/dist/run-diagnostics.js +36 -11
- package/dist/runner.js +44 -13
- package/library/actions/mobile/perps/performance-capture.mjs +570 -189
- package/library/actions/mobile/perps/perps.mjs +122 -0
- package/library/actions/mobile/platform/bridge.mjs +40 -8
- package/library/actions/mobile/platform/native-session.mjs +1 -1
- package/library/actions/mobile/wallet/lock.mjs +1 -4
- package/library/actions/mobile/wallet/select_account.mjs +129 -17
- package/library/manifests/mobile.action-manifest.json +28 -3
- package/library/recipes/mobile/perps/performance.recipe.json +73 -47
- package/package.json +1 -1
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"type": "string",
|
|
52
52
|
"enum": [
|
|
53
53
|
"navigate_return",
|
|
54
|
-
"cold_disk_cache",
|
|
55
54
|
"cold_no_cache",
|
|
56
55
|
"background_short",
|
|
57
56
|
"background_reconnect",
|
|
@@ -168,25 +167,25 @@
|
|
|
168
167
|
"value": "{{params.content_variant}}",
|
|
169
168
|
"equals": "trending",
|
|
170
169
|
"cases": {
|
|
171
|
-
"match": "
|
|
170
|
+
"match": "assert-no-positions"
|
|
172
171
|
},
|
|
173
172
|
"default": "assert-position",
|
|
174
173
|
"intent": "Prepare either the existing position or an empty account before timing"
|
|
175
174
|
},
|
|
176
|
-
"
|
|
177
|
-
"action": "metamask.perps.
|
|
175
|
+
"assert-no-positions": {
|
|
176
|
+
"action": "metamask.perps.assert_positions",
|
|
178
177
|
"state": "none",
|
|
179
178
|
"mode": "all",
|
|
180
179
|
"timeout_ms": 120000,
|
|
181
|
-
"intent": "
|
|
182
|
-
"next": "
|
|
180
|
+
"intent": "Require an already-empty position account without changing financial state",
|
|
181
|
+
"next": "assert-no-orders"
|
|
183
182
|
},
|
|
184
|
-
"
|
|
185
|
-
"action": "metamask.perps.
|
|
183
|
+
"assert-no-orders": {
|
|
184
|
+
"action": "metamask.perps.assert_orders",
|
|
186
185
|
"state": "none",
|
|
187
186
|
"mode": "all",
|
|
188
187
|
"timeout_ms": 120000,
|
|
189
|
-
"intent": "
|
|
188
|
+
"intent": "Require an already-empty order account without changing financial state",
|
|
190
189
|
"next": "select-account-switch-preparation"
|
|
191
190
|
},
|
|
192
191
|
"assert-position": {
|
|
@@ -366,7 +365,7 @@
|
|
|
366
365
|
"cases": {
|
|
367
366
|
"match": "clear-perps-caches"
|
|
368
367
|
},
|
|
369
|
-
"default": "select-
|
|
368
|
+
"default": "select-background-short",
|
|
370
369
|
"intent": "Choose the cold no-cache transition only for its named lifecycle"
|
|
371
370
|
},
|
|
372
371
|
"clear-perps-caches": {
|
|
@@ -374,16 +373,6 @@
|
|
|
374
373
|
"intent": "Remove only persisted Perps market and user snapshots while preserving the wallet",
|
|
375
374
|
"next": "restart-app"
|
|
376
375
|
},
|
|
377
|
-
"select-cold-disk-cache": {
|
|
378
|
-
"action": "switch",
|
|
379
|
-
"value": "{{params.lifecycle}}",
|
|
380
|
-
"equals": "cold_disk_cache",
|
|
381
|
-
"cases": {
|
|
382
|
-
"match": "restart-app"
|
|
383
|
-
},
|
|
384
|
-
"default": "select-background-short",
|
|
385
|
-
"intent": "Choose the returning cold-process transition only for its named lifecycle"
|
|
386
|
-
},
|
|
387
376
|
"restart-app": {
|
|
388
377
|
"action": "app.lifecycle",
|
|
389
378
|
"command": "restart",
|
|
@@ -414,6 +403,7 @@
|
|
|
414
403
|
"background-short": {
|
|
415
404
|
"action": "app.lifecycle",
|
|
416
405
|
"command": "background",
|
|
406
|
+
"require_process_continuity": true,
|
|
417
407
|
"settle_ms": 3000,
|
|
418
408
|
"intent": "Keep the process inactive for less than the Perps connection grace period",
|
|
419
409
|
"next": "foreground-app"
|
|
@@ -431,6 +421,7 @@
|
|
|
431
421
|
"background-reconnect": {
|
|
432
422
|
"action": "app.lifecycle",
|
|
433
423
|
"command": "background",
|
|
424
|
+
"require_process_continuity": true,
|
|
434
425
|
"settle_ms": 25000,
|
|
435
426
|
"intent": "Keep the process inactive beyond the Perps connection grace period",
|
|
436
427
|
"next": "foreground-app"
|
|
@@ -438,6 +429,7 @@
|
|
|
438
429
|
"foreground-app": {
|
|
439
430
|
"action": "app.lifecycle",
|
|
440
431
|
"command": "foreground",
|
|
432
|
+
"require_process_continuity": true,
|
|
441
433
|
"settle_ms": 0,
|
|
442
434
|
"runtime_ready_timeout_ms": 90000,
|
|
443
435
|
"timeout_ms": 120000,
|
|
@@ -568,18 +560,8 @@
|
|
|
568
560
|
"cases": {
|
|
569
561
|
"match": "finish-cold-no-cache-performance-capture"
|
|
570
562
|
},
|
|
571
|
-
"default": "select-cold-disk-cache-finish",
|
|
572
|
-
"intent": "Accept fresh data preloaded after process start but before the Homepage viewport demand only for cold no-cache"
|
|
573
|
-
},
|
|
574
|
-
"select-cold-disk-cache-finish": {
|
|
575
|
-
"action": "switch",
|
|
576
|
-
"value": "{{params.lifecycle}}",
|
|
577
|
-
"equals": "cold_disk_cache",
|
|
578
|
-
"cases": {
|
|
579
|
-
"match": "finish-cold-disk-cache-performance-capture"
|
|
580
|
-
},
|
|
581
563
|
"default": "select-background-short-finish",
|
|
582
|
-
"intent": "
|
|
564
|
+
"intent": "Accept fresh data preloaded after process start but before the Homepage viewport demand only for cold no-cache"
|
|
583
565
|
},
|
|
584
566
|
"select-background-short-finish": {
|
|
585
567
|
"action": "switch",
|
|
@@ -614,43 +596,69 @@
|
|
|
614
596
|
"finish-resident-performance-capture": {
|
|
615
597
|
"action": "metamask.perps.capture_performance",
|
|
616
598
|
"phase": "end",
|
|
617
|
-
"require_records":
|
|
599
|
+
"require_records": true,
|
|
600
|
+
"required_stages": [
|
|
601
|
+
"surface_demand",
|
|
602
|
+
"surface_initial_ui_recorded",
|
|
603
|
+
"surface_resolved_recorded"
|
|
604
|
+
],
|
|
605
|
+
"wait_for_stage": "surface_resolved_recorded",
|
|
606
|
+
"wait_for_lifecycle": "{{params.lifecycle}}",
|
|
607
|
+
"wait_for_content_variant": "{{params.content_variant}}",
|
|
618
608
|
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
609
|
+
"wait_timeout_ms": 90000,
|
|
619
610
|
"intent": "Preserve the warm resident capture after native visible-content proof",
|
|
620
611
|
"next": "capture-position"
|
|
621
612
|
},
|
|
622
613
|
"finish-cold-no-cache-performance-capture": {
|
|
623
614
|
"action": "metamask.perps.capture_performance",
|
|
624
615
|
"phase": "end",
|
|
625
|
-
"require_records":
|
|
616
|
+
"require_records": true,
|
|
617
|
+
"required_stages": [
|
|
618
|
+
"surface_demand",
|
|
619
|
+
"surface_initial_ui_recorded",
|
|
620
|
+
"surface_resolved_recorded",
|
|
621
|
+
"surface_live_recorded"
|
|
622
|
+
],
|
|
623
|
+
"wait_for_stage": "surface_live_recorded",
|
|
624
|
+
"wait_for_lifecycle": "{{params.lifecycle}}",
|
|
625
|
+
"wait_for_content_variant": "{{params.content_variant}}",
|
|
626
626
|
"required_live_streams": ["positions", "orders", "account"],
|
|
627
627
|
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
628
628
|
"wait_timeout_ms": 90000,
|
|
629
629
|
"intent": "Require complete live account streams after native cold visible-content proof; live prices remain an independent optional milestone",
|
|
630
630
|
"next": "capture-position"
|
|
631
631
|
},
|
|
632
|
-
"finish-cold-disk-cache-performance-capture": {
|
|
633
|
-
"action": "metamask.perps.capture_performance",
|
|
634
|
-
"phase": "end",
|
|
635
|
-
"require_records": false,
|
|
636
|
-
"required_live_streams": ["positions", "orders", "account"],
|
|
637
|
-
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
638
|
-
"wait_timeout_ms": 90000,
|
|
639
|
-
"intent": "Require complete live account takeover after native cached-content proof",
|
|
640
|
-
"next": "capture-position"
|
|
641
|
-
},
|
|
642
632
|
"finish-background-short-performance-capture": {
|
|
643
633
|
"action": "metamask.perps.capture_performance",
|
|
644
634
|
"phase": "end",
|
|
645
|
-
"require_records":
|
|
635
|
+
"require_records": true,
|
|
636
|
+
"required_stages": [
|
|
637
|
+
"surface_demand",
|
|
638
|
+
"surface_initial_ui_recorded",
|
|
639
|
+
"surface_resolved_recorded"
|
|
640
|
+
],
|
|
641
|
+
"wait_for_stage": "surface_resolved_recorded",
|
|
642
|
+
"wait_for_lifecycle": "{{params.lifecycle}}",
|
|
643
|
+
"wait_for_content_variant": "{{params.content_variant}}",
|
|
646
644
|
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
645
|
+
"wait_timeout_ms": 90000,
|
|
647
646
|
"intent": "Preserve the short-resume capture after native resident-content proof; a new socket frame is not required while continuity is retained",
|
|
648
647
|
"next": "capture-position"
|
|
649
648
|
},
|
|
650
649
|
"finish-account-switch-performance-capture": {
|
|
651
650
|
"action": "metamask.perps.capture_performance",
|
|
652
651
|
"phase": "end",
|
|
653
|
-
"require_records":
|
|
652
|
+
"require_records": true,
|
|
653
|
+
"required_stages": [
|
|
654
|
+
"surface_demand",
|
|
655
|
+
"surface_initial_ui_recorded",
|
|
656
|
+
"surface_resolved_recorded",
|
|
657
|
+
"surface_live_recorded"
|
|
658
|
+
],
|
|
659
|
+
"wait_for_stage": "surface_live_recorded",
|
|
660
|
+
"wait_for_lifecycle": "{{params.lifecycle}}",
|
|
661
|
+
"wait_for_content_variant": "{{params.content_variant}}",
|
|
654
662
|
"required_live_streams": ["positions", "orders", "account"],
|
|
655
663
|
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
656
664
|
"wait_timeout_ms": 90000,
|
|
@@ -660,7 +668,16 @@
|
|
|
660
668
|
"finish-account-switch-empty-performance-capture": {
|
|
661
669
|
"action": "metamask.perps.capture_performance",
|
|
662
670
|
"phase": "end",
|
|
663
|
-
"require_records":
|
|
671
|
+
"require_records": true,
|
|
672
|
+
"required_stages": [
|
|
673
|
+
"surface_demand",
|
|
674
|
+
"surface_initial_ui_recorded",
|
|
675
|
+
"surface_resolved_recorded",
|
|
676
|
+
"surface_live_recorded"
|
|
677
|
+
],
|
|
678
|
+
"wait_for_stage": "surface_live_recorded",
|
|
679
|
+
"wait_for_lifecycle": "{{params.lifecycle}}",
|
|
680
|
+
"wait_for_content_variant": "{{params.content_variant}}",
|
|
664
681
|
"required_live_streams": ["positions", "orders", "account"],
|
|
665
682
|
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
666
683
|
"wait_timeout_ms": 90000,
|
|
@@ -670,7 +687,16 @@
|
|
|
670
687
|
"finish-performance-capture": {
|
|
671
688
|
"action": "metamask.perps.capture_performance",
|
|
672
689
|
"phase": "end",
|
|
673
|
-
"require_records":
|
|
690
|
+
"require_records": true,
|
|
691
|
+
"required_stages": [
|
|
692
|
+
"surface_demand",
|
|
693
|
+
"surface_initial_ui_recorded",
|
|
694
|
+
"surface_resolved_recorded",
|
|
695
|
+
"surface_live_recorded"
|
|
696
|
+
],
|
|
697
|
+
"wait_for_stage": "surface_live_recorded",
|
|
698
|
+
"wait_for_lifecycle": "{{params.lifecycle}}",
|
|
699
|
+
"wait_for_content_variant": "{{params.content_variant}}",
|
|
674
700
|
"required_live_streams": ["positions", "orders", "account"],
|
|
675
701
|
"artifact_prefix": "logs/perps-{{params.content_variant}}-{{params.lifecycle}}-{{params.sample_id}}",
|
|
676
702
|
"wait_timeout_ms": 90000,
|