@deeeed/metamask-harness 0.46.0 → 0.47.1

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +1 -1
  3. package/adapters/manifest.json +12 -4
  4. package/adapters/mobile/wait-for-bridge.cjs +550 -0
  5. package/adapters/mobile/wait-for-bridge.sh +11 -148
  6. package/bin/mm-harness +7 -2
  7. package/dist/adapters/mobile/prepare.js +26 -18
  8. package/dist/adapters/mobile/runtime-decision.js +1 -0
  9. package/dist/cli-commands.js +2 -0
  10. package/dist/command-contract.js +7 -0
  11. package/dist/commands/checklist.js +1 -0
  12. package/dist/commands/help.js +76 -0
  13. package/dist/commands/parse-args.js +2 -1
  14. package/dist/commands/recipe-quality.js +1 -1
  15. package/dist/commands/tutorial.js +46 -0
  16. package/dist/mm-harness-cli.js +45 -6
  17. package/docs/CONTRIBUTING.md +2 -0
  18. package/docs/QA.md +2 -2
  19. package/library/actions/mobile/perps/perps.mjs +1 -1
  20. package/package.json +2 -2
  21. package/scripts/site-contrast.mjs +6 -2
  22. package/site/assets/help-recipes.json +113 -0
  23. package/site/architecture.html +0 -497
  24. package/site/assets/metamask-fox.svg +0 -24
  25. package/site/assets/progress.mjs +0 -323
  26. package/site/assets/style.css +0 -1066
  27. package/site/cheatsheet.html +0 -307
  28. package/site/ecosystem.html +0 -162
  29. package/site/how-it-works.html +0 -692
  30. package/site/index.html +0 -184
  31. package/site/perps-advanced-orders-qa.html +0 -96
  32. package/site/perps.html +0 -265
  33. package/site/recipes.html +0 -423
  34. package/site/reviewers.html +0 -375
  35. package/site/tutorials/index.html +0 -181
  36. package/site/tutorials/v1.html +0 -212
  37. package/site/tutorials/v2.html +0 -207
  38. package/site/tutorials/v3.html +0 -258
  39. package/site/tutorials/v4.html +0 -196
  40. package/site/tutorials/v5.html +0 -164
  41. package/site/tutorials/v6.html +0 -166
  42. package/site/tutorials/v7.html +0 -185
@@ -1,166 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>V6 — Release validation</title>
7
- <meta name="description" content="Validate one team's changes on a frozen release candidate, with a four-verdict vocabulary that includes NOT RUN.">
8
- <link rel="icon" href="../assets/metamask-fox.svg" type="image/svg+xml">
9
- <link rel="stylesheet" href="../assets/style.css?v=4">
10
- </head>
11
- <body data-progress-page="v6">
12
- <a class="skip" href="#flow">Skip to the flow</a>
13
-
14
- <header class="topbar">
15
- <div class="wrap topbar-inner">
16
- <a class="brand" href="../index.html">
17
- <img class="brand-mark" src="../assets/metamask-fox.svg" alt="" width="22" height="22">
18
- <span class="brand-name">recipes</span>
19
- </a>
20
- <nav class="nav" aria-label="Main">
21
- <a class="nav-cta" href="../index.html#prompt">Quick start</a>
22
- <a href="../how-it-works.html">How it works</a>
23
- <a href="../perps.html">Team / Perps</a>
24
- <a href="../cheatsheet.html">Cheatsheet</a>
25
- <a href="../architecture.html">Architecture</a>
26
- <a href="index.html" aria-current="page">Tutorials</a>
27
- </nav>
28
- </div>
29
- </header>
30
-
31
- <div class="progress-rail">
32
- <div class="wrap progress-inner">
33
- <div class="progress-track" role="progressbar" aria-label="Tutorial progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
34
- <div class="progress-fill"></div>
35
- </div>
36
- <span class="progress-label">0/4 steps</span>
37
- <button type="button" class="progress-reset">Reset</button>
38
- </div>
39
- </div>
40
-
41
- <main>
42
- <section class="wrap hero" style="padding-bottom:1rem">
43
- <span class="eyebrow">Tutorial V6 · 6 minutes</span>
44
- <h1>Release validation</h1>
45
- <p class="lede">
46
- One release candidate, one team's changes, one report. For leads and QA deciding whether a build is
47
- ready for sign-off.
48
- </p>
49
- <div class="hero-meta">
50
- <span class="badge soon">skill not merged yet</span>
51
- <span>maturity: experimental</span>
52
- </div>
53
- </section>
54
-
55
- <section class="wrap">
56
- <div class="vid-thumb" style="border-radius:var(--radius);border:1px solid var(--line);margin-bottom:1.5rem">
57
- <div style="text-align:center;padding:1rem">
58
- <div class="vid-id" style="font-size:2.6rem">V6</div>
59
- <p style="color:var(--text-dim);margin:.5rem 0 0;font-size:.92rem">Video recording in progress</p>
60
- </div>
61
- </div>
62
-
63
- <div class="note">
64
- <span class="note-title">Status: shipping, not yet merged</span>
65
- <p>
66
- Like <a href="v5.html">V5</a>, this skill lives on a branch rather than the skills repo's main
67
- branch. No install command here until it lands.
68
- </p>
69
- </div>
70
-
71
- <p>
72
- <a href="v5.html">V5</a> reviews one pull request head. This sits a layer above: it takes the team's
73
- changes that actually shipped into one frozen release head and validates their assembled flows on
74
- that build.
75
- </p>
76
- </section>
77
-
78
- <section class="wrap">
79
- <h2 id="flow">The flow</h2>
80
-
81
- <ol class="steps">
82
- <li class="step" data-step="target">
83
- <div class="step-head">
84
- <input type="checkbox" class="step-check" id="v6-target" aria-labelledby="t6-target">
85
- <h3 class="step-title" id="t6-target">Two things, both exact</h3>
86
- </div>
87
- <p class="step-why">
88
- One release target — a <code>release/X.Y.Z</code> ref, its release pull request, or an
89
- unambiguous version — and one team scope, given as explicit pull request URLs, owned paths,
90
- release labels, or a repository team definition. Ambiguity in either is refused rather than
91
- guessed, because a report scoped to the wrong changes is worse than no report.
92
- </p>
93
- </li>
94
-
95
- <li class="step" data-step="assemble">
96
- <div class="step-head">
97
- <input type="checkbox" class="step-check" id="v6-assemble" aria-labelledby="t6-assemble">
98
- <h3 class="step-title" id="t6-assemble">Criteria assembled across the release</h3>
99
- </div>
100
- <p class="step-why">
101
- It reuses the same acceptance-criteria contract as PR review, then combines the criteria from
102
- every in-scope change into the user flows they add up to on the release build. A flow can break
103
- from the interaction of two individually correct changes; that is the class of problem this
104
- catches and per-PR review cannot.
105
- </p>
106
- </li>
107
-
108
- <li class="step" data-step="verdicts">
109
- <div class="step-head">
110
- <input type="checkbox" class="step-check" id="v6-verdicts" aria-labelledby="t6-verdicts">
111
- <h3 class="step-title" id="t6-verdicts">Four verdicts, not two</h3>
112
- </div>
113
- <div class="table-scroll">
114
- <table>
115
- <thead><tr><th>Verdict</th><th>Means</th></tr></thead>
116
- <tbody>
117
- <tr><td><span class="verdict pass">PASS</span></td><td>Demonstrated on the release build, with evidence.</td></tr>
118
- <tr><td><span class="verdict fail">FAIL</span></td><td>Exercised and did not hold. A real result.</td></tr>
119
- <tr><td><code>UNTESTABLE</code></td><td>The surface cannot demonstrate it. Needs a human.</td></tr>
120
- <tr><td><code>NOT RUN</code></td><td>In scope, not attempted. Stated rather than omitted.</td></tr>
121
- </tbody>
122
- </table>
123
- </div>
124
- <p class="step-why">
125
- <code>NOT RUN</code> is the one that keeps the report honest. A run that skipped something says
126
- so, instead of leaving a silent gap that reads as coverage.
127
- </p>
128
- </li>
129
-
130
- <li class="step" data-step="signoff">
131
- <div class="step-head">
132
- <input type="checkbox" class="step-check" id="v6-signoff" aria-labelledby="t6-signoff">
133
- <h3 class="step-title" id="t6-signoff">Ready for sign-off, which is not sign-off</h3>
134
- </div>
135
- <div class="doctrine">
136
- <p>
137
- <span class="k">A first autonomous release QA result, not an approval.</span> The report frames
138
- itself as ready for team QA sign-off. The sign-off is still a person's, and the report is the
139
- evidence they read to give it.
140
- </p>
141
- </div>
142
- <p class="step-why">
143
- What changes is where the human starts: from a report with per-criterion verdicts and evidence
144
- paths, rather than from a build and a list of tickets.
145
- </p>
146
- </li>
147
- </ol>
148
-
149
- <hr class="sep">
150
- <div class="btn-row">
151
- <a class="btn btn-primary" href="v7.html">Next: a ticket end to end →</a>
152
- <a class="btn btn-ghost" href="index.html">Back to the series</a>
153
- </div>
154
- </section>
155
- </main>
156
-
157
- <footer class="footer">
158
- <div class="wrap">
159
- <p>Internal getting-started guide for proving MetaMask changes with recipes. Not official MetaMask product documentation.</p>
160
- <p>Sample output moves between releases; trust your terminal over this page.</p>
161
- </div>
162
- </footer>
163
-
164
- <script type="module" src="../assets/progress.mjs?v=4"></script>
165
- </body>
166
- </html>
@@ -1,185 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>V7 — A ticket end to end</title>
7
- <meta name="description" content="One real ticket from assignment to a pull request that carries proof, and what the reviewer sees.">
8
- <link rel="icon" href="../assets/metamask-fox.svg" type="image/svg+xml">
9
- <link rel="stylesheet" href="../assets/style.css?v=4">
10
- </head>
11
- <body data-progress-page="v7">
12
- <a class="skip" href="#steps">Skip to the checklist</a>
13
-
14
- <header class="topbar">
15
- <div class="wrap topbar-inner">
16
- <a class="brand" href="../index.html">
17
- <img class="brand-mark" src="../assets/metamask-fox.svg" alt="" width="22" height="22">
18
- <span class="brand-name">recipes</span>
19
- </a>
20
- <nav class="nav" aria-label="Main">
21
- <a class="nav-cta" href="../index.html#prompt">Quick start</a>
22
- <a href="../how-it-works.html">How it works</a>
23
- <a href="../perps.html">Team / Perps</a>
24
- <a href="../cheatsheet.html">Cheatsheet</a>
25
- <a href="../architecture.html">Architecture</a>
26
- <a href="index.html" aria-current="page">Tutorials</a>
27
- </nav>
28
- </div>
29
- </header>
30
-
31
- <div class="progress-rail">
32
- <div class="wrap progress-inner">
33
- <div class="progress-track" role="progressbar" aria-label="Tutorial progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
34
- <div class="progress-fill"></div>
35
- </div>
36
- <span class="progress-label">0/6 steps</span>
37
- <button type="button" class="progress-reset">Reset</button>
38
- </div>
39
- </div>
40
-
41
- <main>
42
- <section class="wrap hero" style="padding-bottom:1rem">
43
- <span class="eyebrow">Tutorial V7 · 10 minutes</span>
44
- <h1>A ticket end to end</h1>
45
- <p class="lede">
46
- How the pieces combine on ordinary work: one ticket, implemented, proven, and opened as a pull
47
- request a reviewer can check without rebuilding it themselves.
48
- </p>
49
- <div class="hero-meta">
50
- <span>prerequisites: <a href="v3.html">V3</a> and <a href="v4.html">V4</a></span>
51
- </div>
52
- </section>
53
-
54
- <section class="wrap">
55
- <div class="vid-thumb" style="border-radius:var(--radius);border:1px solid var(--line);margin-bottom:1.5rem">
56
- <div style="text-align:center;padding:1rem">
57
- <div class="vid-id" style="font-size:2.6rem">V7</div>
58
- <p style="color:var(--text-dim);margin:.5rem 0 0;font-size:.92rem">Video recording in progress</p>
59
- </div>
60
- </div>
61
-
62
- <div class="doctrine">
63
- <p>
64
- <span class="k">The through-line:</span> you steered at every gate, the system did the labour, and
65
- the pull request carries proof instead of claims.
66
- </p>
67
- </div>
68
- </section>
69
-
70
- <section class="wrap">
71
- <h2 id="steps">The walkthrough</h2>
72
-
73
- <ol class="steps">
74
- <li class="step" data-step="setup">
75
- <div class="step-head">
76
- <input type="checkbox" class="step-check" id="v7-setup" aria-labelledby="t7-setup">
77
- <h3 class="step-title" id="t7-setup">Start from a working checkout</h3>
78
- </div>
79
- <p class="step-why">Current harness, library declared, app reachable.</p>
80
- <div class="cmd"><pre><code><span class="p">$ </span>mm-harness update
81
- <span class="p">$ </span>mm-harness doctor
82
- <span class="p">$ </span>mm-harness run --list</code></pre></div>
83
- <p class="step-why">
84
- If your team's recipes are not in that list, fix it now rather than mid-task —
85
- <a href="v3.html#steps">V3</a> covers it.
86
- </p>
87
- </li>
88
-
89
- <li class="step" data-step="criteria">
90
- <div class="step-head">
91
- <input type="checkbox" class="step-check" id="v7-criteria" aria-labelledby="t7-criteria">
92
- <h3 class="step-title" id="t7-criteria">Read the ticket for what is observable</h3>
93
- </div>
94
- <p class="step-why">
95
- Separate the criteria that describe behaviour someone could watch happen from the ones that
96
- describe intent. The first kind is what a recipe can prove. Naming that split up front decides
97
- the shape of everything after it.
98
- </p>
99
- </li>
100
-
101
- <li class="step" data-step="implement">
102
- <div class="step-head">
103
- <input type="checkbox" class="step-check" id="v7-implement" aria-labelledby="t7-implement">
104
- <h3 class="step-title" id="t7-implement">Implement, using the harness to look</h3>
105
- </div>
106
- <p class="step-why">
107
- <code>call</code> is the fast loop while developing — one action against the running app, no
108
- recipe needed. This is the same execution path a recipe uses, so what works here works there.
109
- </p>
110
- <div class="cmd"><pre><code><span class="p">$ </span>mm-harness call read_state
111
- <span class="p">$ </span>mm-harness call navigate page=perps
112
- <span class="p">$ </span>mm-harness logs</code></pre></div>
113
- </li>
114
-
115
- <li class="step" data-step="cook">
116
- <div class="step-head">
117
- <input type="checkbox" class="step-check" id="v7-cook" aria-labelledby="t7-cook">
118
- <h3 class="step-title" id="t7-cook">Cook the proof for the criteria</h3>
119
- </div>
120
- <p class="step-why">
121
- <a href="v4.html">V4's</a> flow, pointed at this ticket. Author against the discovered actions,
122
- validate with <code>--plan</code>, run it.
123
- </p>
124
- <div class="cmd"><pre><code><span class="p">$ </span>mm-harness run ./proof.json --plan
125
- <span class="p">$ </span>mm-harness run ./proof.json --artifacts-dir ./proof-artifacts</code></pre></div>
126
- <p class="step-why">
127
- Then revert your change and run it again. Green after a revert means the recipe is not testing
128
- your work.
129
- </p>
130
- </li>
131
-
132
- <li class="step" data-step="pr">
133
- <div class="step-head">
134
- <input type="checkbox" class="step-check" id="v7-pr" aria-labelledby="t7-pr">
135
- <h3 class="step-title" id="t7-pr">Open the pull request with the evidence</h3>
136
- </div>
137
- <p class="step-why">
138
- Check your diff before you push, then link the criteria to the nodes that prove them. A reviewer
139
- should not have to guess which part of the bundle answers which criterion.
140
- </p>
141
- <div class="cmd"><pre><code><span class="p">$ </span>mm-harness check diff --profile fast</code></pre></div>
142
- <p class="step-why">
143
- The recipe is the durable half. It stays in the library and fails later if someone breaks the
144
- behaviour — the difference between evidence and a regression test is only whether you keep it.
145
- </p>
146
- </li>
147
-
148
- <li class="step" data-step="review">
149
- <div class="step-head">
150
- <input type="checkbox" class="step-check" id="v7-review" aria-labelledby="t7-review">
151
- <h3 class="step-title" id="t7-review">Look at it as the reviewer</h3>
152
- </div>
153
- <p class="step-why">
154
- Open your own bundle the way <a href="v2.html">V2</a> does: read the intents in order and ask
155
- whether they add up to the claim in the description. Anything you cannot answer from the trace is
156
- something you are asking a colleague to take on trust.
157
- </p>
158
- <div class="cmd"><pre><code><span class="p">$ </span>cat proof-artifacts/report.md</code></pre></div>
159
- <p class="step-why">
160
- If the agent's checklist asked for learnings, they are written beside the evidence — worth
161
- reading before you close the ticket, and the raw material for what eventually reaches
162
- <a href="../architecture.html#loop">the team's shared knowledge</a>.
163
- </p>
164
- </li>
165
- </ol>
166
-
167
- <hr class="sep">
168
- <div class="btn-row">
169
- <a class="btn btn-primary" href="index.html">Back to the series</a>
170
- <a class="btn btn-ghost" href="../reviewers.html">The reviewer's guide</a>
171
- <a class="btn btn-ghost" href="../cheatsheet.html">Cheatsheet</a>
172
- </div>
173
- </section>
174
- </main>
175
-
176
- <footer class="footer">
177
- <div class="wrap">
178
- <p>Internal getting-started guide for proving MetaMask changes with recipes. Not official MetaMask product documentation.</p>
179
- <p>Sample output moves between releases; trust your terminal over this page.</p>
180
- </div>
181
- </footer>
182
-
183
- <script type="module" src="../assets/progress.mjs?v=4"></script>
184
- </body>
185
- </html>