@muggleai/works 5.26.0-staging.217 → 5.26.0-staging.219

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 (44) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +2 -0
  3. package/dist/{chunk-FP5PRYGP.js → chunk-45WV6RS5.js} +188 -3
  4. package/dist/{chunk-MJ34HBWC.js → chunk-NFS44KNQ.js} +564 -326
  5. package/dist/cli.js +2 -2
  6. package/dist/index.js +2 -2
  7. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  8. package/dist/plugin/.codex-mcp.json +1 -1
  9. package/dist/plugin/.codex-plugin/plugin.json +1 -1
  10. package/dist/plugin/.cursor-plugin/plugin.json +1 -1
  11. package/dist/plugin/.mcp.json +1 -1
  12. package/dist/plugin/skills/_shared/dev-loop/failures.md +1 -1
  13. package/dist/plugin/skills/_shared/dev-loop/run.md +16 -4
  14. package/dist/plugin/skills/do/e2e-acceptance.md +9 -1
  15. package/dist/plugin/skills/do/e2e-repair.md +2 -0
  16. package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +4 -2
  17. package/dist/plugin/skills/muggle-preferences/SKILL.md +1 -0
  18. package/dist/plugin/skills/muggle-preferences/ops/list.md +1 -0
  19. package/dist/plugin/skills/muggle-preferences/ops/llm-source.md +28 -0
  20. package/dist/plugin/skills/muggle-preferences/ops/onboard.md +4 -0
  21. package/dist/plugin/skills/muggle-test/SKILL.md +1 -1
  22. package/dist/plugin/skills/muggle-test/execute-local.md +4 -2
  23. package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +3 -1
  24. package/dist/release-manifest.json +3 -3
  25. package/dist/src-HALLVP7O.js +1 -0
  26. package/package.json +10 -10
  27. package/plugin/.claude-plugin/plugin.json +1 -1
  28. package/plugin/.codex-mcp.json +1 -1
  29. package/plugin/.codex-plugin/plugin.json +1 -1
  30. package/plugin/.cursor-plugin/plugin.json +1 -1
  31. package/plugin/.mcp.json +1 -1
  32. package/plugin/skills/_shared/dev-loop/failures.md +1 -1
  33. package/plugin/skills/_shared/dev-loop/run.md +16 -4
  34. package/plugin/skills/do/e2e-acceptance.md +9 -1
  35. package/plugin/skills/do/e2e-repair.md +2 -0
  36. package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +4 -2
  37. package/plugin/skills/muggle-preferences/SKILL.md +1 -0
  38. package/plugin/skills/muggle-preferences/ops/list.md +1 -0
  39. package/plugin/skills/muggle-preferences/ops/llm-source.md +28 -0
  40. package/plugin/skills/muggle-preferences/ops/onboard.md +4 -0
  41. package/plugin/skills/muggle-test/SKILL.md +1 -1
  42. package/plugin/skills/muggle-test/execute-local.md +4 -2
  43. package/plugin/skills/muggle-test-feature-local/SKILL.md +3 -1
  44. package/dist/src-B7WALKBP.js +0 -1
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-FP5PRYGP.js';
3
- import './chunk-MJ34HBWC.js';
2
+ import { runCli } from './chunk-45WV6RS5.js';
3
+ import './chunk-NFS44KNQ.js';
4
4
 
5
5
  // src/cli/main.ts
6
6
  runCli().catch((error) => {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-FP5PRYGP.js';
2
- export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-MJ34HBWC.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-45WV6RS5.js';
2
+ export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-NFS44KNQ.js';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.26.0-staging.217",
4
+ "version": "5.26.0-staging.219",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.217",
7
+ "@muggleai/works@5.26.0-staging.219",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.26.0-staging.217",
3
+ "version": "5.26.0-staging.219",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.26.0-staging.217",
5
+ "version": "5.26.0-staging.219",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.217",
7
+ "@muggleai/works@5.26.0-staging.219",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -1,6 +1,6 @@
1
1
  # Dev Loop — Reading the Result
2
2
 
3
- For each `runId`, call `muggle-local-run-result-get` and read **structured fields**, never `execute`'s stdout tail (a truncated display excerpt). Order: `Status` → `Error` → `Artifacts`. Retain per test case: `testCaseId`, `testScriptId` (if any), `runId`, `status`, `artifactsDir`.
3
+ For each `runId`, call `muggle-local-run-result-get` and read **structured fields**, never `execute`'s stdout tail (a truncated display excerpt). Order: `Status` → `Error` → `Artifacts`. Retain per run: `testCaseId`, `testScriptId` (if any), `runId`, `status`, `artifactsDir`, plus the record it ran: `runSettingsId` from the `cloudRunSettingsId` the result prints as `**Cloud Run Settings ID:**` (absent on a run filed under no record), and the `resolutionLabel` of the plan record it ran.
4
4
 
5
5
  ## Artifacts
6
6
 
@@ -12,19 +12,31 @@ The caller resolves these before the loop and supplies them per test case:
12
12
  - `localUrl` — local execution target. Local-only; never changes the cloud project or test definitions.
13
13
  - `cwd` — absolute path of the active working tree (PR-branch worktree if one exists, else repo root). Drives the cross-worktree single-flight lock so concurrent runs serialize, and names the checkout the execute tools check for freshness.
14
14
  - `baseBranch` — the change's base, only when it is not the remote default (a stacked change, a PR into a release branch). Omitted, the tools check `cwd` against the remote default.
15
- - `testCase` / `cloudTestCaseId` — the cloud test case and its id.
15
+ - `testCase` / `cloudTestCaseId` / `projectId` — the cloud test case, its id and its project.
16
16
  - `showUi` — from the caller's `showElectronBrowser` resolution: omit for visible, `false` for headless.
17
17
 
18
18
  The tool boundary is fixed: cloud reads (`muggle-remote-*`) resolve definitions and scripts; local tools (`muggle-local-*`) run the browser, fetch results, and publish.
19
19
 
20
+ ## Records
21
+
22
+ A test case runs once per runSettings record its local lane fans out to. Before its first run, call `muggle-remote-fan-out-plan` with `projectId`, `testCaseId` and `runEnvironmentType: "local"`. Pass `fanOutChoice` only when the user named one (`primaryOnly`, `allNow`); the records it leaves out are listed in `notRunRunSettingsIds` and are not results.
23
+
24
+ - **`records` empty** — one run, as the Sequence below describes.
25
+ - **Otherwise** — one run per record, in `records` order:
26
+ - In `replay` mode, a record with a `testScriptId` → the Replay branch with that id in step 1. The script names its record, so the replay is filed under it.
27
+ - In `regen` mode, or a record without a `testScriptId` → the Regen branch, passing the record's `runSettingsId` and `displayResolution` to `muggle-local-execute-test-generation`.
28
+ - **Gate** — when `isSecondaryGatedOnPrimary` is true, read the first record's run with `muggle-local-run-result-get` before starting another. A `Status` other than `passed` → run none of the rest: each becomes a result with `status: "skipped"`, `reason: "primary failed"`, its record's `runSettingsId` and `resolutionLabel`, and no `runId`. A skipped record launched nothing, so it never goes through failure handling. When the gate is false, run every record.
29
+
30
+ Every run's result carries its record: `runSettingsId` is the run result's `cloudRunSettingsId` (see [`failures.md`](failures.md)) and `resolutionLabel` is the plan record's. Rerunning one record's run, including the debug path's "give feedback & rerun", is the Regen branch with that record's `runSettingsId` and `displayResolution`.
31
+
20
32
  ## Sequence
21
33
 
22
34
  One local browser exists, so **execution is sequential** — one test case at a time, in the caller's order. The pre/post fetches are independent across test cases and should be issued in parallel batches around the sequential execute calls.
23
35
 
24
- Per test case, branch on `mode`:
36
+ Per test case, or per record when it has [records](#records), branch on `mode`:
25
37
 
26
38
  **Replay**
27
- 1. `muggle-remote-test-script-get` (latest replayable script — the lane-scoped one the caller resolved during classification per [`../failure-mode-handling.md`](../failure-mode-handling.md) §A) → note `actionScriptId`.
39
+ 1. `muggle-remote-test-script-get` (the record's `testScriptId`; with no records, the latest replayable script — the lane-scoped one the caller resolved during classification per [`../failure-mode-handling.md`](../failure-mode-handling.md) §A) → note `actionScriptId`.
28
40
  2. `muggle-remote-action-script-get` with that id → full `actionScript` (see [`action-script.md`](action-script.md)), plus the `pinnedAccount` and `freshSession` its `actionParams` recorded.
29
41
  3. `muggle-local-execute-replay` with `testScript`, `actionScript`, `localUrl`, `cwd`, `showUi`, `pinnedAccount` and `freshSession` (each copied from the recording's `actionParams` when present; see [`fresh-session.md`](fresh-session.md)), `timeoutMs` (see [`timeouts.md`](timeouts.md)).
30
42
 
@@ -32,7 +44,7 @@ Per test case, branch on `mode`:
32
44
  1. `muggle-remote-test-case-get` → full test case object.
33
45
  2. `muggle-local-execute-test-generation` with `testCase`, `localUrl`, `cwd`, `showUi`, `freshSession` (omit it so the stored flag decides; pass it only to override for this run, per [`fresh-session.md`](fresh-session.md)), `timeoutMs`.
34
46
 
35
- Store the returned `runId`, tagged with its `mode`. If a run fails, log it and continue the batch — never abort. Read the result per [`failures.md`](failures.md), then [`publish.md`](publish.md).
47
+ Store the returned `runId`, tagged with its `mode` and record. If a run fails, log it and continue the batch — never abort. Read the result per [`failures.md`](failures.md), then [`publish.md`](publish.md).
36
48
 
37
49
  **A refused run is not a failure.** A result headed `Run refused — checkout is not on the latest …` launched nothing and has no `runId`: the `cwd` checkout lacks its base's latest commit (`BEHIND_BASE`) or carries another branch's commits (`FOREIGN_BASE`). Sync it per [`../sync-branch-with-base.md`](../sync-branch-with-base.md), re-invoke [`muggle-test-prepare`](../../muggle-test-prepare/SKILL.md) so the dev server serves the synced code, and run the case again. Never route it through failure handling or count it as a result.
38
50
 
@@ -133,10 +133,12 @@ Ancestors generated here are prerequisites, not results: they belong in neither
133
133
 
134
134
  ### Step 4: Run the dev loop, gather screenshots
135
135
 
136
- For each scoped test case, run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): `muggle-remote-test-script-list` by `testCaseId` with `runEnvironmentType: "local"` (this stage runs against localhost) to pick [replay vs regen](../_shared/dev-loop/run.md), [execute with `timeoutMs`](../_shared/dev-loop/timeouts.md), [fetch the result](../_shared/dev-loop/failures.md) and [interpret failures](../_shared/dev-loop/failures.md), then read the studio-published [cloud refs and per-step screenshots](../_shared/dev-loop/publish.md) off the run result.
136
+ For each scoped test case, run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): `muggle-remote-test-script-list` by `testCaseId` with `runEnvironmentType: "local"` (this stage runs against localhost) to pick [replay vs regen](../_shared/dev-loop/run.md), [run once per record](../_shared/dev-loop/run.md#records), [execute with `timeoutMs`](../_shared/dev-loop/timeouts.md), [fetch the result](../_shared/dev-loop/failures.md) and [interpret failures](../_shared/dev-loop/failures.md), then read the studio-published [cloud refs and per-step screenshots](../_shared/dev-loop/publish.md) off the run result.
137
137
 
138
138
  Inputs to the loop: `mode` from the script-exists check, `localUrl`/project from Step 1.7, `cwd` = the working tree recorded in `state.md`.
139
139
 
140
+ Each record's run is its own report entry carrying its `runSettingsId` and `resolutionLabel`. A record skipped because its primary failed is an Inconclusive entry with reason `primary failed`, not a skipped test case.
141
+
140
142
  ### Step 7: Collect Results
141
143
 
142
144
  For each test case:
@@ -151,6 +153,8 @@ For each test case:
151
153
  **Passed:** (count)
152
154
  - (test case name):
153
155
  - testCaseId: `<id>`
156
+ - runSettingsId: `<id>` (the run result's `cloudRunSettingsId`; omit when absent)
157
+ - resolutionLabel: `<width>×<height>` (the record's size, e.g. `390×844`; omit with `runSettingsId`)
154
158
  - testScriptId: `<id>`
155
159
  - runId: `<id>`
156
160
  - viewUrl: `<url>`
@@ -159,6 +163,8 @@ For each test case:
159
163
  **Failed:** (count)
160
164
  - (test case name):
161
165
  - testCaseId: `<id>`
166
+ - runSettingsId: `<id>`
167
+ - resolutionLabel: `<width>×<height>`
162
168
  - testScriptId: `<id>`
163
169
  - runId: `<id>`
164
170
  - viewUrl: `<url>`
@@ -170,6 +176,8 @@ For each test case:
170
176
  **Inconclusive:** (count) — use for runs that couldn't yield a pass/fail signal: no replayable script, environment precondition unmet, prerequisites unmet (Step 3.5), infra error, agent stalled on auth/cookie banner before reaching the assertion, missing secrets. The product is **not** implicated — that's `failed`, not `inconclusive`.
171
177
  - (test case name):
172
178
  - testCaseId: `<id>`
179
+ - runSettingsId: `<id>`
180
+ - resolutionLabel: `<width>×<height>`
173
181
  - runId: `<id>` (synthesize a UUID if no run started)
174
182
  - viewUrl: `<url>` (project-level run-results fallback when no specific run URL exists)
175
183
  - reason: `<one short sentence>`
@@ -56,6 +56,8 @@ A `repair` disposition requires a named defect: the failing step, expected-versu
56
56
 
57
57
  An Inconclusive entry Stage 6 recorded as `prerequisites unmet` never executed. It carries no bucket and none may be derived from it — there is no run to read. Its disposition is `ask`, and the question names the missing prerequisite: what failed is the project's test-plan chain, not the diff.
58
58
 
59
+ An Inconclusive entry Stage 6 recorded as `primary failed` never executed either: it is a record held back by its test case's failed primary. It takes no disposition of its own; the primary's entry is the one repaired, and re-running the test case runs it again.
60
+
59
61
  ## Step 3: Act
60
62
 
61
63
  Process dispositions in order — `retry`, then `regenerate`, then `repair` — so cheap self-healing runs before any code change.
@@ -12,6 +12,8 @@ Include **all** runs — passed, failed, **and inconclusive**. Never drop a run.
12
12
 
13
13
  If a test should be inconclusive but you don't have a real `runId` / `viewUrl` (e.g., generation never ran), use the same project-level dashboard fallback as the "last-resort" failed branch below: synthesize a UUID-shaped runId and use the project runs page as `viewUrl`. The schema requires both fields — but a working dashboard link is better than nothing.
14
14
 
15
+ A record skipped because its test case's primary failed never ran either: an `inconclusive` entry with `reason: "primary failed"`, the `runSettingsId` and `resolutionLabel` the caller carried for it, `steps: []`, and that same synthesized `runId` and project-level `viewUrl`.
16
+
15
17
  ## Published run (passed or failed; the common path)
16
18
 
17
19
  The studio publishes every completed local run — pass or fail, with or without action steps — to the cloud during execution. `muggle-local-run-result-get` carries `viewUrl` and `cloudActionScriptId`; `cloudTestScriptId` is **only present for passing runs and replays** (failed generations skip the test script wrapper to avoid clobbering the canonical replay target).
@@ -42,9 +44,9 @@ On every entry: `description` (test case title/description — drives the collap
42
44
 
43
45
  Set `testCaseShortId` to the test case's `shortId` and `replayShortId` to the run's `shortId` (e.g. `TC-42`, `R-2051`) whenever the record you already fetched carries one; the walkthrough then labels the test `TC-42 · <name>` and leads its run row with `R-2051`. Omit either when absent — entities created before short IDs existed have none.
44
46
 
45
- Set `runSettingsId` to the run result's `cloudRunSettingsId` (`muggle-local-run-result-get` prints it as `**Cloud Run Settings ID:**`) and `resolutionLabel` to that record's window size as `<width>×<height>` (e.g. `390×844`): the `resolutionLabel` `muggle-remote-run-settings-list` returns for that `runSettingsId` (with `runEnvironmentType: "local"`), or the `displayResolution` the run executed at, written the same way (`R_0390x0844` → `390×844`). The walkthrough keeps each record of a test case as its own entry, labelled `<name> (390×844)`, and collapses only reruns of one record to the latest. Omit both when the run result carries no `cloudRunSettingsId`; the entry then collapses with the test case's other runs.
47
+ Set `runSettingsId` to the run result's `cloudRunSettingsId` (`muggle-local-run-result-get` prints it as `**Cloud Run Settings ID:**`) and `resolutionLabel` to that record's window size as `<width>×<height>` (e.g. `390×844`): the `resolutionLabel` the caller carried for the run when it has one, else the `resolutionLabel` `muggle-remote-run-settings-list` returns for that `runSettingsId` (with `runEnvironmentType: "local"`), or the `displayResolution` the run executed at, written the same way (`R_0390x0844` → `390×844`). The walkthrough keeps each record of a test case as its own entry, labelled `<name> (390×844)`, and collapses only reruns of one record to the latest. Omit both when the run result carries no `cloudRunSettingsId`; the entry then collapses with the test case's other runs.
46
48
 
47
- If called from `muggle-do`: `e2e-acceptance.md` already produces this shape — pass it through unchanged.
49
+ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, each entry's `runSettingsId` and `resolutionLabel` included — pass it through unchanged.
48
50
 
49
51
  ## Shape
50
52
 
@@ -19,6 +19,7 @@ Pick the operation, then read its op file for the procedure.
19
19
  | "show preferences" / no args | `ops/list.md` |
20
20
  | "configure muggle" / "muggle setup" / change without naming a key | `ops/configure.md` |
21
21
  | "reset preferences" | `ops/reset.md` |
22
+ | "LLM source" / use my own Anthropic key or a local model / who pays for local runs | `ops/llm-source.md` |
22
23
  | Session context says first-run setup has not been run | `ops/onboard.md` |
23
24
 
24
25
  ## Shared context (all ops)
@@ -2,6 +2,7 @@
2
2
 
3
3
  1. Read each `preference-gates/<key>.md` (skip `README.md`). First paragraph of each = description.
4
4
  2. Render `Preference | Value | Description` table titled `Muggle AI — Preferences`. Values from session context.
5
+ Under the table, print the line `muggle llm-source --show` reports — who supplies the model for local runs.
5
6
  3. Footer:
6
7
  ```
7
8
  Values: always · ask · never — except defaultExecutionMode (local/remote/ask),
@@ -0,0 +1,28 @@
1
+ # LLM source
2
+
3
+ Who supplies the model for tests Studio runs on this computer: Muggle AI credit (default), the user's own Anthropic API key, or a local / self-hosted model. Cloud runs always use Muggle AI credit.
4
+
5
+ The CLI owns the options, labels, and storage. Render what `muggle llm-source --json` returns — never hardcode labels, and never write `preferences.json` or the credentials file directly.
6
+
7
+ **Never collect an API key in chat.** A key typed here lands in the conversation transcript. The key is accepted only at the CLI's hidden terminal prompt.
8
+
9
+ ## Step 1 — load the question
10
+
11
+ Run `muggle llm-source --json`. It returns `header`, `prompt`, `scopeNote`, `options` (each `source`, `label`, `description`), and `current` (the source in effect; any key is already masked).
12
+
13
+ ## Step 2 — ask
14
+
15
+ One `AskUserQuestion`: `header` = `header`, question text = `prompt` followed by `scopeNote`, one option per entry in `options` using `label` and `description`. Pre-select the option whose `source` equals `current.source`.
16
+
17
+ ## Step 3 — apply
18
+
19
+ | Picked `source` | Do |
20
+ | :-------------- | :- |
21
+ | `current.source` again | Nothing to change. Say which source stays in effect. |
22
+ | `muggle-credit` | `muggle llm-source --use muggle-credit` |
23
+ | `local-model` | Ask in chat for the endpoint URL and the vision-capable model name (neither is secret), then `muggle llm-source --use local-model --base-url <url> --model <name>`. If the endpoint needs its own key, tell the user to run `muggle llm-source` in a terminal instead. |
24
+ | `anthropic-api-key` | Do not run anything. Tell the user to run `muggle llm-source` in their own terminal and paste the key at the hidden prompt. |
25
+
26
+ ## Step 4 — confirm
27
+
28
+ Print the line the CLI reported. To show the source later: `muggle llm-source --show`.
@@ -52,3 +52,7 @@ Run `muggle init --apply ~/.muggle-ai/temp/onboarding-answers.json`, then delete
52
52
  ## Step 6 — confirm
53
53
 
54
54
  Print what the CLI reported. On `skip`, say it will be offered again next session and move on — a declined offer retires itself after the third time.
55
+
56
+ ## Step 7 — LLM source
57
+
58
+ Unless the user picked `skip`, run [`llm-source.md`](llm-source.md) — who supplies the model for local runs.
@@ -265,7 +265,7 @@ Run the path matching the mode confirmed in Step 1. Each path owns its own proce
265
265
 
266
266
  ## Step 7C: Route every failed run through the debug path
267
267
 
268
- For every run with `status: "failed"` (or any non-passing terminal state) returned by Step 7 (either path), route through [`_shared/debug-failed-run.md`](../_shared/debug-failed-run.md). This is **mandatory** — a failure is never reported without it. The debug path gathers evidence (attempted steps + reasoning + screenshot), diagnoses via [`_shared/failure-mode-handling.md`](../_shared/failure-mode-handling.md) (§B replay / §C regen), shows the debug card, and presents the guaranteed selection in which **"give feedback & rerun"** is always an option and "skip" is never the default.
268
+ For every run with `status: "failed"` (or any non-passing terminal state; a local record `skipped` because its primary failed is not a run) returned by Step 7 (either path), route through [`_shared/debug-failed-run.md`](../_shared/debug-failed-run.md). This is **mandatory** — a failure is never reported without it. The debug path gathers evidence (attempted steps + reasoning + screenshot), diagnoses via [`_shared/failure-mode-handling.md`](../_shared/failure-mode-handling.md) (§B replay / §C regen), shows the debug card, and presents the guaranteed selection in which **"give feedback & rerun"** is always an option and "skip" is never the default.
269
269
 
270
270
  Pass it per failed run: the `runId` (local) or workflow runtime id (remote), the `mode` that failed, `testCaseId`, `projectId`, and the execution handle (local: [`execute-local.md`](execute-local.md); remote: [`execute-remote.md`](execute-remote.md)) so a rerun re-enters the same path. Process failures one at a time so the user isn't drowning in pickers.
271
271
 
@@ -36,7 +36,7 @@ Before the first run, resolve each selected test case's prerequisite chain and m
36
36
 
37
37
  ## Run the dev loop
38
38
 
39
- Execute each test case via the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [sequential replay/regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`freshSession`](../_shared/dev-loop/fresh-session.md), and [`timeoutMs`](../_shared/dev-loop/timeouts.md).
39
+ Execute each test case via the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [one run per record](../_shared/dev-loop/run.md#records), [sequential replay/regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`freshSession`](../_shared/dev-loop/fresh-session.md), and [`timeoutMs`](../_shared/dev-loop/timeouts.md).
40
40
 
41
41
  Caller glue:
42
42
  - `mode` per test case is the input from the router; `localUrl` from the pre-flight question; `showUi` from the `showElectronBrowser` resolution.
@@ -59,8 +59,10 @@ Checkout flow FAILED 15.7s 12 <viewUrl>
59
59
  Total: 3 tests | 2 passed | 1 failed | 37.1s
60
60
  ```
61
61
 
62
+ A test case with records gets one row per record, named `<title> (<resolutionLabel>)`; a record skipped because its primary failed shows `SKIPPED`.
63
+
62
64
  For failures, don't hand-write a verdict — the router routes each through the debug path.
63
65
 
64
66
  ## Output
65
67
 
66
- Return the uniform runs list the router consumes: `[{ testCaseId, mode, runId, status, viewUrl?, cloudTestScriptId?, cloudActionScriptId? }]`. The studio published each run during execution, so `viewUrl` / `cloudTestScriptId` / `cloudActionScriptId` come straight off the run result (`muggle-local-run-result-get`).
68
+ Return the uniform runs list the router consumes: `[{ testCaseId, mode, runId, status, viewUrl?, cloudTestScriptId?, cloudActionScriptId?, runSettingsId?, resolutionLabel? }]`. The studio published each run during execution, so `viewUrl` / `cloudTestScriptId` / `cloudActionScriptId` / `runSettingsId` (its `cloudRunSettingsId`) come straight off the run result (`muggle-local-run-result-get`). A record skipped because its primary failed is an entry `{ testCaseId, status: "skipped", reason: "primary failed", runSettingsId, resolutionLabel }` with no `runId`: it is not a failed run and skips the debug path.
@@ -142,9 +142,11 @@ Before deciding the target's script, resolve its prerequisite chain from the bac
142
142
  - **If any replayable/succeeded scripts exist:** use `AskUserQuestion` to present them as clickable options. Show: name, created/updated, step count per option. Include **"Generate new script"** as the last option.
143
143
  - **If none:** go straight to generation (no need to ask replay vs generate).
144
144
 
145
+ A test case whose local lane has records runs once per record ([`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md#records)), so the pick sets only the mode: a script means replay, which replays each record's own script, and "Generate new script" means regen.
146
+
145
147
  ### 6. Load data for the chosen path
146
148
 
147
- Run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [`freshSession`](../_shared/dev-loop/fresh-session.md), [replay vs regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`timeoutMs`](../_shared/dev-loop/timeouts.md), and [failure interpretation](../_shared/dev-loop/failures.md).
149
+ Run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [one run per record](../_shared/dev-loop/run.md#records), [`freshSession`](../_shared/dev-loop/fresh-session.md), [replay vs regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`timeoutMs`](../_shared/dev-loop/timeouts.md), and [failure interpretation](../_shared/dev-loop/failures.md).
148
150
 
149
151
  Caller glue: `mode` is the path chosen in §5; `localUrl` from §4; `cwd` = the repo root, or the prepared worktree when one is in use.
150
152
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "release": "5.18.0",
3
- "buildId": "run-217-1",
4
- "commitSha": "da9b22cc3e0a7221c4cc7913dbd53c4cc5e4654d",
5
- "buildTime": "2026-10-26T20:54:14Z",
3
+ "buildId": "run-219-1",
4
+ "commitSha": "973f7588aacd538b345c3cf3e42562ab4e7b1b9e",
5
+ "buildTime": "2026-10-26T21:49:08Z",
6
6
  "serviceName": "muggle-ai-works-mcp"
7
7
  }
@@ -0,0 +1 @@
1
+ export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CheckoutFreshnessVerdict, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, StackCheckVerdict, StackClaimVerdict, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackRelease, decideStackRenewal, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, e2e_exports as e2e, evaluateCheckoutFreshness, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-NFS44KNQ.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@muggleai/works",
3
3
  "mcpName": "io.github.multiplex-ai/muggle",
4
- "version": "5.26.0-staging.217",
4
+ "version": "5.26.0-staging.219",
5
5
  "description": "13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -60,21 +60,21 @@
60
60
  "typecheck:browser-bench": "tsc --noEmit -p internal/browser-bench/tsconfig.json"
61
61
  },
62
62
  "muggleConfig": {
63
- "electronAppVersion": "1.13.9",
63
+ "electronAppVersion": "1.16.0",
64
64
  "downloadBaseUrl": "https://github.com/multiplex-ai/muggle-ai-works/releases/download",
65
65
  "runtimeTargetDefault": "staging",
66
66
  "checksumsByStream": {
67
67
  "production": {
68
- "win32-x64": "807123fb84ba60a0fa38addd4477663e1f69a7bd3080639241b75ac3f25e3a82",
69
- "linux-x64": "697c22d2cdbbe5b2a846c1a1fb9e8b10f51eaad025fa1f2d299d63f7e3a11ec6",
70
- "darwin-arm64": "5e8ab3b3ef436e1cae23ec044795569e69343a5f7bacfd3bd4a9ef3e681b1e9b",
71
- "darwin-x64": "1aedbd6d8ed93b63a16d9078e73d4dd8ccc21b5a7e0199cbc8f164484f27542f"
68
+ "win32-x64": "bbd5886d4cc3bceef8f359da1d3b1a918b7d4f92b9df9d5363308953231c69e4",
69
+ "linux-x64": "6ff06170ea816b39644d3368c2ed336376b407a467f458380481538b9ae41c49",
70
+ "darwin-arm64": "3cb6ed0c4e81c6491c37f3ed1222fce835eff8ac01944befe8db792117575e0e",
71
+ "darwin-x64": "bcacd957fc1211054a8d9f2d23a84597fe7c191af14bc763b5774b7ccc5c3b1c"
72
72
  },
73
73
  "staging": {
74
- "darwin-arm64": "3b143eb69817b3548b49ed2684059acbb09d84a47fbfacdb2c0dbe642d2475c1",
75
- "linux-x64": "a1016173104c2df2a7479f268d6ba36114897656ac5788250bd52a6ca24f94b6",
76
- "win32-x64": "e5f3efa7bdb26f4520fa53a6b2c39cb07ea50599a0ddd5f02729a98b38977d35",
77
- "darwin-x64": "0346dd828f280c8a49ead29003deae2421bc443806afc5de0fc33a82efcf7e0f"
74
+ "darwin-arm64": "d108778d3f63c4d93c72fb87981e9fc79145dc186f5c81fba5141810d497f35f",
75
+ "linux-x64": "981fd72a1d0df04c00ebe3b4c60fa8ae99dfdeefeb6491ff80899d1681396e3f",
76
+ "win32-x64": "32f0e0a0a450abbda394491db0bb89e343ccdf73d014877fc864d63a065a7198",
77
+ "darwin-x64": "1853f8409879e7ffafc4b42c7bde05d8bc7e7a946f125eeed434d5a6098e9a5d"
78
78
  }
79
79
  },
80
80
  "electronAppSignedFromVersion": "1.10.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.26.0-staging.217",
4
+ "version": "5.26.0-staging.219",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.217",
7
+ "@muggleai/works@5.26.0-staging.219",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.26.0-staging.217",
3
+ "version": "5.26.0-staging.219",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.26.0-staging.217",
5
+ "version": "5.26.0-staging.219",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
package/plugin/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.217",
7
+ "@muggleai/works@5.26.0-staging.219",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -1,6 +1,6 @@
1
1
  # Dev Loop — Reading the Result
2
2
 
3
- For each `runId`, call `muggle-local-run-result-get` and read **structured fields**, never `execute`'s stdout tail (a truncated display excerpt). Order: `Status` → `Error` → `Artifacts`. Retain per test case: `testCaseId`, `testScriptId` (if any), `runId`, `status`, `artifactsDir`.
3
+ For each `runId`, call `muggle-local-run-result-get` and read **structured fields**, never `execute`'s stdout tail (a truncated display excerpt). Order: `Status` → `Error` → `Artifacts`. Retain per run: `testCaseId`, `testScriptId` (if any), `runId`, `status`, `artifactsDir`, plus the record it ran: `runSettingsId` from the `cloudRunSettingsId` the result prints as `**Cloud Run Settings ID:**` (absent on a run filed under no record), and the `resolutionLabel` of the plan record it ran.
4
4
 
5
5
  ## Artifacts
6
6
 
@@ -12,19 +12,31 @@ The caller resolves these before the loop and supplies them per test case:
12
12
  - `localUrl` — local execution target. Local-only; never changes the cloud project or test definitions.
13
13
  - `cwd` — absolute path of the active working tree (PR-branch worktree if one exists, else repo root). Drives the cross-worktree single-flight lock so concurrent runs serialize, and names the checkout the execute tools check for freshness.
14
14
  - `baseBranch` — the change's base, only when it is not the remote default (a stacked change, a PR into a release branch). Omitted, the tools check `cwd` against the remote default.
15
- - `testCase` / `cloudTestCaseId` — the cloud test case and its id.
15
+ - `testCase` / `cloudTestCaseId` / `projectId` — the cloud test case, its id and its project.
16
16
  - `showUi` — from the caller's `showElectronBrowser` resolution: omit for visible, `false` for headless.
17
17
 
18
18
  The tool boundary is fixed: cloud reads (`muggle-remote-*`) resolve definitions and scripts; local tools (`muggle-local-*`) run the browser, fetch results, and publish.
19
19
 
20
+ ## Records
21
+
22
+ A test case runs once per runSettings record its local lane fans out to. Before its first run, call `muggle-remote-fan-out-plan` with `projectId`, `testCaseId` and `runEnvironmentType: "local"`. Pass `fanOutChoice` only when the user named one (`primaryOnly`, `allNow`); the records it leaves out are listed in `notRunRunSettingsIds` and are not results.
23
+
24
+ - **`records` empty** — one run, as the Sequence below describes.
25
+ - **Otherwise** — one run per record, in `records` order:
26
+ - In `replay` mode, a record with a `testScriptId` → the Replay branch with that id in step 1. The script names its record, so the replay is filed under it.
27
+ - In `regen` mode, or a record without a `testScriptId` → the Regen branch, passing the record's `runSettingsId` and `displayResolution` to `muggle-local-execute-test-generation`.
28
+ - **Gate** — when `isSecondaryGatedOnPrimary` is true, read the first record's run with `muggle-local-run-result-get` before starting another. A `Status` other than `passed` → run none of the rest: each becomes a result with `status: "skipped"`, `reason: "primary failed"`, its record's `runSettingsId` and `resolutionLabel`, and no `runId`. A skipped record launched nothing, so it never goes through failure handling. When the gate is false, run every record.
29
+
30
+ Every run's result carries its record: `runSettingsId` is the run result's `cloudRunSettingsId` (see [`failures.md`](failures.md)) and `resolutionLabel` is the plan record's. Rerunning one record's run, including the debug path's "give feedback & rerun", is the Regen branch with that record's `runSettingsId` and `displayResolution`.
31
+
20
32
  ## Sequence
21
33
 
22
34
  One local browser exists, so **execution is sequential** — one test case at a time, in the caller's order. The pre/post fetches are independent across test cases and should be issued in parallel batches around the sequential execute calls.
23
35
 
24
- Per test case, branch on `mode`:
36
+ Per test case, or per record when it has [records](#records), branch on `mode`:
25
37
 
26
38
  **Replay**
27
- 1. `muggle-remote-test-script-get` (latest replayable script — the lane-scoped one the caller resolved during classification per [`../failure-mode-handling.md`](../failure-mode-handling.md) §A) → note `actionScriptId`.
39
+ 1. `muggle-remote-test-script-get` (the record's `testScriptId`; with no records, the latest replayable script — the lane-scoped one the caller resolved during classification per [`../failure-mode-handling.md`](../failure-mode-handling.md) §A) → note `actionScriptId`.
28
40
  2. `muggle-remote-action-script-get` with that id → full `actionScript` (see [`action-script.md`](action-script.md)), plus the `pinnedAccount` and `freshSession` its `actionParams` recorded.
29
41
  3. `muggle-local-execute-replay` with `testScript`, `actionScript`, `localUrl`, `cwd`, `showUi`, `pinnedAccount` and `freshSession` (each copied from the recording's `actionParams` when present; see [`fresh-session.md`](fresh-session.md)), `timeoutMs` (see [`timeouts.md`](timeouts.md)).
30
42
 
@@ -32,7 +44,7 @@ Per test case, branch on `mode`:
32
44
  1. `muggle-remote-test-case-get` → full test case object.
33
45
  2. `muggle-local-execute-test-generation` with `testCase`, `localUrl`, `cwd`, `showUi`, `freshSession` (omit it so the stored flag decides; pass it only to override for this run, per [`fresh-session.md`](fresh-session.md)), `timeoutMs`.
34
46
 
35
- Store the returned `runId`, tagged with its `mode`. If a run fails, log it and continue the batch — never abort. Read the result per [`failures.md`](failures.md), then [`publish.md`](publish.md).
47
+ Store the returned `runId`, tagged with its `mode` and record. If a run fails, log it and continue the batch — never abort. Read the result per [`failures.md`](failures.md), then [`publish.md`](publish.md).
36
48
 
37
49
  **A refused run is not a failure.** A result headed `Run refused — checkout is not on the latest …` launched nothing and has no `runId`: the `cwd` checkout lacks its base's latest commit (`BEHIND_BASE`) or carries another branch's commits (`FOREIGN_BASE`). Sync it per [`../sync-branch-with-base.md`](../sync-branch-with-base.md), re-invoke [`muggle-test-prepare`](../../muggle-test-prepare/SKILL.md) so the dev server serves the synced code, and run the case again. Never route it through failure handling or count it as a result.
38
50
 
@@ -133,10 +133,12 @@ Ancestors generated here are prerequisites, not results: they belong in neither
133
133
 
134
134
  ### Step 4: Run the dev loop, gather screenshots
135
135
 
136
- For each scoped test case, run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): `muggle-remote-test-script-list` by `testCaseId` with `runEnvironmentType: "local"` (this stage runs against localhost) to pick [replay vs regen](../_shared/dev-loop/run.md), [execute with `timeoutMs`](../_shared/dev-loop/timeouts.md), [fetch the result](../_shared/dev-loop/failures.md) and [interpret failures](../_shared/dev-loop/failures.md), then read the studio-published [cloud refs and per-step screenshots](../_shared/dev-loop/publish.md) off the run result.
136
+ For each scoped test case, run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): `muggle-remote-test-script-list` by `testCaseId` with `runEnvironmentType: "local"` (this stage runs against localhost) to pick [replay vs regen](../_shared/dev-loop/run.md), [run once per record](../_shared/dev-loop/run.md#records), [execute with `timeoutMs`](../_shared/dev-loop/timeouts.md), [fetch the result](../_shared/dev-loop/failures.md) and [interpret failures](../_shared/dev-loop/failures.md), then read the studio-published [cloud refs and per-step screenshots](../_shared/dev-loop/publish.md) off the run result.
137
137
 
138
138
  Inputs to the loop: `mode` from the script-exists check, `localUrl`/project from Step 1.7, `cwd` = the working tree recorded in `state.md`.
139
139
 
140
+ Each record's run is its own report entry carrying its `runSettingsId` and `resolutionLabel`. A record skipped because its primary failed is an Inconclusive entry with reason `primary failed`, not a skipped test case.
141
+
140
142
  ### Step 7: Collect Results
141
143
 
142
144
  For each test case:
@@ -151,6 +153,8 @@ For each test case:
151
153
  **Passed:** (count)
152
154
  - (test case name):
153
155
  - testCaseId: `<id>`
156
+ - runSettingsId: `<id>` (the run result's `cloudRunSettingsId`; omit when absent)
157
+ - resolutionLabel: `<width>×<height>` (the record's size, e.g. `390×844`; omit with `runSettingsId`)
154
158
  - testScriptId: `<id>`
155
159
  - runId: `<id>`
156
160
  - viewUrl: `<url>`
@@ -159,6 +163,8 @@ For each test case:
159
163
  **Failed:** (count)
160
164
  - (test case name):
161
165
  - testCaseId: `<id>`
166
+ - runSettingsId: `<id>`
167
+ - resolutionLabel: `<width>×<height>`
162
168
  - testScriptId: `<id>`
163
169
  - runId: `<id>`
164
170
  - viewUrl: `<url>`
@@ -170,6 +176,8 @@ For each test case:
170
176
  **Inconclusive:** (count) — use for runs that couldn't yield a pass/fail signal: no replayable script, environment precondition unmet, prerequisites unmet (Step 3.5), infra error, agent stalled on auth/cookie banner before reaching the assertion, missing secrets. The product is **not** implicated — that's `failed`, not `inconclusive`.
171
177
  - (test case name):
172
178
  - testCaseId: `<id>`
179
+ - runSettingsId: `<id>`
180
+ - resolutionLabel: `<width>×<height>`
173
181
  - runId: `<id>` (synthesize a UUID if no run started)
174
182
  - viewUrl: `<url>` (project-level run-results fallback when no specific run URL exists)
175
183
  - reason: `<one short sentence>`
@@ -56,6 +56,8 @@ A `repair` disposition requires a named defect: the failing step, expected-versu
56
56
 
57
57
  An Inconclusive entry Stage 6 recorded as `prerequisites unmet` never executed. It carries no bucket and none may be derived from it — there is no run to read. Its disposition is `ask`, and the question names the missing prerequisite: what failed is the project's test-plan chain, not the diff.
58
58
 
59
+ An Inconclusive entry Stage 6 recorded as `primary failed` never executed either: it is a record held back by its test case's failed primary. It takes no disposition of its own; the primary's entry is the one repaired, and re-running the test case runs it again.
60
+
59
61
  ## Step 3: Act
60
62
 
61
63
  Process dispositions in order — `retry`, then `regenerate`, then `repair` — so cheap self-healing runs before any code change.
@@ -12,6 +12,8 @@ Include **all** runs — passed, failed, **and inconclusive**. Never drop a run.
12
12
 
13
13
  If a test should be inconclusive but you don't have a real `runId` / `viewUrl` (e.g., generation never ran), use the same project-level dashboard fallback as the "last-resort" failed branch below: synthesize a UUID-shaped runId and use the project runs page as `viewUrl`. The schema requires both fields — but a working dashboard link is better than nothing.
14
14
 
15
+ A record skipped because its test case's primary failed never ran either: an `inconclusive` entry with `reason: "primary failed"`, the `runSettingsId` and `resolutionLabel` the caller carried for it, `steps: []`, and that same synthesized `runId` and project-level `viewUrl`.
16
+
15
17
  ## Published run (passed or failed; the common path)
16
18
 
17
19
  The studio publishes every completed local run — pass or fail, with or without action steps — to the cloud during execution. `muggle-local-run-result-get` carries `viewUrl` and `cloudActionScriptId`; `cloudTestScriptId` is **only present for passing runs and replays** (failed generations skip the test script wrapper to avoid clobbering the canonical replay target).
@@ -42,9 +44,9 @@ On every entry: `description` (test case title/description — drives the collap
42
44
 
43
45
  Set `testCaseShortId` to the test case's `shortId` and `replayShortId` to the run's `shortId` (e.g. `TC-42`, `R-2051`) whenever the record you already fetched carries one; the walkthrough then labels the test `TC-42 · <name>` and leads its run row with `R-2051`. Omit either when absent — entities created before short IDs existed have none.
44
46
 
45
- Set `runSettingsId` to the run result's `cloudRunSettingsId` (`muggle-local-run-result-get` prints it as `**Cloud Run Settings ID:**`) and `resolutionLabel` to that record's window size as `<width>×<height>` (e.g. `390×844`): the `resolutionLabel` `muggle-remote-run-settings-list` returns for that `runSettingsId` (with `runEnvironmentType: "local"`), or the `displayResolution` the run executed at, written the same way (`R_0390x0844` → `390×844`). The walkthrough keeps each record of a test case as its own entry, labelled `<name> (390×844)`, and collapses only reruns of one record to the latest. Omit both when the run result carries no `cloudRunSettingsId`; the entry then collapses with the test case's other runs.
47
+ Set `runSettingsId` to the run result's `cloudRunSettingsId` (`muggle-local-run-result-get` prints it as `**Cloud Run Settings ID:**`) and `resolutionLabel` to that record's window size as `<width>×<height>` (e.g. `390×844`): the `resolutionLabel` the caller carried for the run when it has one, else the `resolutionLabel` `muggle-remote-run-settings-list` returns for that `runSettingsId` (with `runEnvironmentType: "local"`), or the `displayResolution` the run executed at, written the same way (`R_0390x0844` → `390×844`). The walkthrough keeps each record of a test case as its own entry, labelled `<name> (390×844)`, and collapses only reruns of one record to the latest. Omit both when the run result carries no `cloudRunSettingsId`; the entry then collapses with the test case's other runs.
46
48
 
47
- If called from `muggle-do`: `e2e-acceptance.md` already produces this shape — pass it through unchanged.
49
+ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, each entry's `runSettingsId` and `resolutionLabel` included — pass it through unchanged.
48
50
 
49
51
  ## Shape
50
52
 
@@ -19,6 +19,7 @@ Pick the operation, then read its op file for the procedure.
19
19
  | "show preferences" / no args | `ops/list.md` |
20
20
  | "configure muggle" / "muggle setup" / change without naming a key | `ops/configure.md` |
21
21
  | "reset preferences" | `ops/reset.md` |
22
+ | "LLM source" / use my own Anthropic key or a local model / who pays for local runs | `ops/llm-source.md` |
22
23
  | Session context says first-run setup has not been run | `ops/onboard.md` |
23
24
 
24
25
  ## Shared context (all ops)
@@ -2,6 +2,7 @@
2
2
 
3
3
  1. Read each `preference-gates/<key>.md` (skip `README.md`). First paragraph of each = description.
4
4
  2. Render `Preference | Value | Description` table titled `Muggle AI — Preferences`. Values from session context.
5
+ Under the table, print the line `muggle llm-source --show` reports — who supplies the model for local runs.
5
6
  3. Footer:
6
7
  ```
7
8
  Values: always · ask · never — except defaultExecutionMode (local/remote/ask),