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

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 (35) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +1 -0
  3. package/dist/{chunk-FP5PRYGP.js → chunk-CVR6N2KN.js} +2 -2
  4. package/dist/{chunk-MJ34HBWC.js → chunk-EC47OWYJ.js} +23 -0
  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-test/SKILL.md +1 -1
  18. package/dist/plugin/skills/muggle-test/execute-local.md +4 -2
  19. package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +3 -1
  20. package/dist/release-manifest.json +3 -3
  21. package/dist/{src-B7WALKBP.js → src-VMHCXZNO.js} +1 -1
  22. package/package.json +10 -10
  23. package/plugin/.claude-plugin/plugin.json +1 -1
  24. package/plugin/.codex-mcp.json +1 -1
  25. package/plugin/.codex-plugin/plugin.json +1 -1
  26. package/plugin/.cursor-plugin/plugin.json +1 -1
  27. package/plugin/.mcp.json +1 -1
  28. package/plugin/skills/_shared/dev-loop/failures.md +1 -1
  29. package/plugin/skills/_shared/dev-loop/run.md +16 -4
  30. package/plugin/skills/do/e2e-acceptance.md +9 -1
  31. package/plugin/skills/do/e2e-repair.md +2 -0
  32. package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +4 -2
  33. package/plugin/skills/muggle-test/SKILL.md +1 -1
  34. package/plugin/skills/muggle-test/execute-local.md +4 -2
  35. package/plugin/skills/muggle-test-feature-local/SKILL.md +3 -1
@@ -9,7 +9,7 @@
9
9
  "name": "muggleai",
10
10
  "source": "./plugin",
11
11
  "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.",
12
- "version": "5.26.0-staging.217"
12
+ "version": "5.26.0-staging.218"
13
13
  }
14
14
  ]
15
15
  }
package/README.md CHANGED
@@ -297,6 +297,7 @@ so the result carries a viewUrl straight to the dashboard
297
297
  | `muggle-remote-test-case-generate-from-prompt` | Generate from a prompt |
298
298
  | `muggle-remote-test-case-ancestors-get` | Walk prerequisite chains |
299
299
  | `muggle-remote-run-settings-list` | A test case's runSettings records in one lane |
300
+ | `muggle-remote-fan-out-plan` | A lane's records in start order, and whether the rest wait on the primary |
300
301
  | `muggle-remote-test-case-bulk-preview-submit` | Async batch preview (~50% cheaper) |
301
302
  | `muggle-remote-test-plan-graph-rebuild` | Rebuild the prerequisite graph |
302
303
 
@@ -1,4 +1,4 @@
1
- import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, OnboardingBlanketChoice, PreferenceKey, getDataDir } from './chunk-MJ34HBWC.js';
1
+ import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, OnboardingBlanketChoice, PreferenceKey, getDataDir } from './chunk-EC47OWYJ.js';
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema } from '@modelcontextprotocol/sdk/types.js';
4
4
  import { v4 } from 'uuid';
@@ -1053,7 +1053,7 @@ async function resolveGsScreenshotUrls(report, opts) {
1053
1053
  if (gsUrls.length === 0) {
1054
1054
  return report;
1055
1055
  }
1056
- const mcps = await import('./src-B7WALKBP.js');
1056
+ const mcps = await import('./src-VMHCXZNO.js');
1057
1057
  const credentials = await mcps.getCallerCredentialsAsync();
1058
1058
  if (!credentials.bearerToken && !credentials.apiKey) {
1059
1059
  stderrWrite(
@@ -5608,6 +5608,14 @@ var SecretFieldEnum = /* @__PURE__ */ ((SecretFieldEnum2) => {
5608
5608
  SecretFieldEnum2["BILLING_POSTAL_CODE"] = "billing_postal_code";
5609
5609
  return SecretFieldEnum2;
5610
5610
  })(SecretFieldEnum || {});
5611
+ var FanOutPlanInputSchema = z.object({
5612
+ projectId: z.string().min(1).describe("Project ID"),
5613
+ testCaseId: z.string().min(1).describe("Test case ID whose fan-out to plan"),
5614
+ runEnvironmentType: RunEnvironmentSchema.describe(
5615
+ "Lane to plan: 'local' (developer localhost) or 'remote' (deployed). A record belongs to one lane."
5616
+ ),
5617
+ fanOutChoice: FanOutChoiceInputSchema
5618
+ });
5611
5619
  var DisplayParamsSchema = z.object({
5612
5620
  browserWindowWidth: z.number(),
5613
5621
  browserWindowHeight: z.number()
@@ -7144,6 +7152,20 @@ var testCaseTools = [
7144
7152
  },
7145
7153
  mapFromUpstream: mapRunSettingsList
7146
7154
  },
7155
+ {
7156
+ name: "muggle-remote-fan-out-plan",
7157
+ description: "Plan a test case's fan-out across its runSettings records in one lane, for a caller that runs the records itself, such as a local run; it starts nothing and writes nothing. Response shape: { testCaseId, laneType, fanOutPolicy, fanOutChoice, isPrimaryKnownGood, isSecondaryGatedOnPrimary, records: [{ runSettingsId, resolutionLabel, displayResolution, isPrimary, testScriptId }], notRunRunSettingsIds }. `records` is in start order, primary first: run records[0] first. When isSecondaryGatedOnPrimary is true, run the rest only if that run passed, and otherwise report each as skipped because the primary failed; when false, run them all. A record's testScriptId is its script on the lane, absent when it has none: replay that script, or generate with the record's runSettingsId and displayResolution. Empty records means the lane has no records for the test case. notRunRunSettingsIds lists the records primaryOnly leaves unrun. Omit fanOutChoice to follow the lane's policy.",
7158
+ inputSchema: FanOutPlanInputSchema,
7159
+ mapToUpstream: (input) => {
7160
+ const toolInput = input;
7161
+ return {
7162
+ method: "POST",
7163
+ path: `${MUGGLE_TEST_PREFIX}/projects/${toolInput.projectId}/test-cases/${toolInput.testCaseId}/fan-out/plan`,
7164
+ queryParams: { type: toolInput.runEnvironmentType },
7165
+ body: { ...toolInput.fanOutChoice && { fanOutChoice: toolInput.fanOutChoice } }
7166
+ };
7167
+ }
7168
+ },
7147
7169
  {
7148
7170
  name: "muggle-remote-test-plan-graph-rebuild",
7149
7171
  description: "Queue a full rebuild of a project's test-plan dependency graph: every node is dropped and the dependency analysis runs again across the whole project. Needed because the incremental analysis only ever adds nodes for test cases that have none \u2014 a case already stored as a root stays a root even once a prerequisite for it exists, so a rebuild is the only way to re-derive those edges. Reach for this when muggle-remote-test-case-ancestors-get reports `orphan: true` across a project, which means nothing is ordering prerequisites and bulk replays are running cases that destroy each other's fixtures. Returns { projectId, workflowRuntimeId }: it resolves when the rebuild is QUEUED, not when it has finished, and it returns no graph \u2014 re-fetch the graph, or call muggle-remote-test-case-ancestors-get again, to observe the result.",
@@ -9838,6 +9860,7 @@ __export(e2e_exports2, {
9838
9860
  EmptyInputSchema: () => EmptyInputSchema,
9839
9861
  FanOutChoice: () => FanOutChoice,
9840
9862
  FanOutChoiceInputSchema: () => FanOutChoiceInputSchema,
9863
+ FanOutPlanInputSchema: () => FanOutPlanInputSchema,
9841
9864
  GatewayError: () => GatewayError,
9842
9865
  IdSchema: () => IdSchema,
9843
9866
  LocalExecutionContextInputSchema: () => LocalExecutionContextInputSchema,
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-CVR6N2KN.js';
3
+ import './chunk-EC47OWYJ.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-CVR6N2KN.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-EC47OWYJ.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.218",
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.218",
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.218",
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.218",
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.218",
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
 
@@ -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-218-1",
4
+ "commitSha": "6cdf57d112c32c82cf5c18a0acba5f3c6435c965",
5
+ "buildTime": "2026-10-26T21:27:08Z",
6
6
  "serviceName": "muggle-ai-works-mcp"
7
7
  }
@@ -1 +1 @@
1
- export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, 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, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackRelease, decideStackRenewal, deleteApiKeyData, deleteCredentials, 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, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, 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, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-MJ34HBWC.js';
1
+ export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, 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, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackRelease, decideStackRenewal, deleteApiKeyData, deleteCredentials, 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, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, 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, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-EC47OWYJ.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.218",
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.218",
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.218",
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.218",
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.218",
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.218",
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
 
@@ -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