@muggleai/works 5.26.0-staging.196 → 5.26.0-staging.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/README.md +3 -3
- package/dist/{chunk-OOSMKH2M.js → chunk-U5ZA3VTZ.js} +98 -13
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-mcp.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/.mcp.json +1 -1
- package/dist/plugin/scripts/guardrails.mjs +25 -4
- package/dist/plugin/skills/do/e2e-acceptance.md +3 -1
- package/dist/plugin/skills/do/open-prs/forward.md +3 -1
- package/dist/plugin/skills/muggle-do/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoInstallCiWorkflow.md +1 -1
- package/dist/release-manifest.json +3 -3
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-mcp.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/scripts/guardrails.mjs +25 -4
- package/plugin/skills/do/e2e-acceptance.md +3 -1
- package/plugin/skills/do/open-prs/forward.md +3 -1
- package/plugin/skills/muggle-do/SKILL.md +1 -1
- package/plugin/skills/muggle-preferences/preference-gates/autoInstallCiWorkflow.md +1 -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.
|
|
12
|
+
"version": "5.26.0-staging.198"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
}
|
package/README.md
CHANGED
|
@@ -175,7 +175,7 @@ The `autoInstallCiWorkflow` preference, chosen during `muggle init`, decides whe
|
|
|
175
175
|
muggle ci-install
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
That writes `.github/workflows/muggle-walkthrough.yml`. To add it by hand instead:
|
|
178
|
+
That writes `.github/workflows/muggle-walkthrough.yml`. Run again later, it replaces a copy an earlier release wrote with the current one, and leaves a copy you edited alone unless you pass `--force`; `muggle init` and `/muggle-do` do the same refresh on their own unless `autoInstallCiWorkflow` is `never`. To add it by hand instead:
|
|
179
179
|
|
|
180
180
|
<!-- muggle:ci-workflow-snippet -->
|
|
181
181
|
```yaml
|
|
@@ -212,7 +212,7 @@ Four things worth knowing:
|
|
|
212
212
|
|
|
213
213
|
- The verdict is published as a check run against the pull request's head commit, not as this job's own status. An `issue_comment` run executes against the default branch, and only a head-commit check reaches the pull request from there — which is what lets settling the comment turn the check green without a new push.
|
|
214
214
|
- GitHub reads the `issue_comment` trigger from the **default branch's** copy of the workflow, so comment-driven re-runs start working only once it is merged.
|
|
215
|
-
- Runs for one pull request queue rather than cancel. Settling the comment starts a run while the one checking the push may still be going, and cancelling that run would leave a cancelled job on the pull request — red beside a green check. An installed copy that still says `cancel-in-progress: true` shows exactly that; `muggle ci-install
|
|
215
|
+
- Runs for one pull request queue rather than cancel. Settling the comment starts a run while the one checking the push may still be going, and cancelling that run would leave a cancelled job on the pull request — red beside a green check. An installed copy that still says `cancel-in-progress: true` shows exactly that; `muggle ci-install` updates it.
|
|
216
216
|
- On a pull request from a fork, `GITHUB_TOKEN` is read-only and the check run cannot be published. The command fails open and reports nothing rather than blocking the pull request.
|
|
217
217
|
|
|
218
218
|
---
|
|
@@ -362,7 +362,7 @@ muggle logout
|
|
|
362
362
|
muggle status
|
|
363
363
|
|
|
364
364
|
# Pull requests
|
|
365
|
-
muggle ci-install [--force] # Add the walkthrough check
|
|
365
|
+
muggle ci-install [--force] # Add or update the walkthrough check in GitHub Actions
|
|
366
366
|
muggle pr-walkthrough-check # Verify a PR's walkthrough comment is settled
|
|
367
367
|
muggle build-pr-section # Render a PR evidence block from a report on stdin
|
|
368
368
|
|
|
@@ -11,6 +11,7 @@ import { dirname, resolve, join } from 'path';
|
|
|
11
11
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
12
12
|
import { Command } from 'commander';
|
|
13
13
|
import axios from 'axios';
|
|
14
|
+
import { createHash } from 'crypto';
|
|
14
15
|
import { platform, homedir, arch } from 'os';
|
|
15
16
|
import { createInterface } from 'readline/promises';
|
|
16
17
|
import { execFile, execFileSync } from 'child_process';
|
|
@@ -1220,6 +1221,21 @@ async function checkoutFreshnessCommand(flags) {
|
|
|
1220
1221
|
// src/ci-workflow/constants.ts
|
|
1221
1222
|
var USER_WORKFLOW_PATH = ".github/workflows/muggle-walkthrough.yml";
|
|
1222
1223
|
var USER_WORKFLOW_COMMAND = "npx -y -p @muggleai/works muggle pr-walkthrough-check --check-run";
|
|
1224
|
+
var USER_WORKFLOW_SHA256 = "761a0ef73d988d6538232f7ab2482377012e869d69eef4e836ae6001b61de970";
|
|
1225
|
+
var PRIOR_USER_WORKFLOW_SHA256S = /* @__PURE__ */ new Set([
|
|
1226
|
+
"d7fb2892a4a7684a3f08de060a86bce60a02d10a7a63587b1a6836163828e881",
|
|
1227
|
+
"908e0c71af8a2e8ac3d9c3afe3ecb8c8b7537c7e7e5d886a0dacdfa806351d9c"
|
|
1228
|
+
]);
|
|
1229
|
+
function hashUserWorkflow(workflowContent) {
|
|
1230
|
+
return createHash("sha256").update(workflowContent.replace(/\r\n/g, "\n")).digest("hex");
|
|
1231
|
+
}
|
|
1232
|
+
function classifyInstalledWorkflow(workflowContent) {
|
|
1233
|
+
if (workflowContent === null) return "missing" /* Missing */;
|
|
1234
|
+
const workflowHash = hashUserWorkflow(workflowContent);
|
|
1235
|
+
if (workflowHash === USER_WORKFLOW_SHA256) return "current" /* Current */;
|
|
1236
|
+
if (PRIOR_USER_WORKFLOW_SHA256S.has(workflowHash)) return "outdated" /* Outdated */;
|
|
1237
|
+
return "customized" /* Customized */;
|
|
1238
|
+
}
|
|
1223
1239
|
|
|
1224
1240
|
// src/ci-workflow/template.ts
|
|
1225
1241
|
function renderUserWorkflow() {
|
|
@@ -1273,28 +1289,51 @@ jobs:
|
|
|
1273
1289
|
`;
|
|
1274
1290
|
}
|
|
1275
1291
|
|
|
1292
|
+
// src/cli/ci-install-constants.ts
|
|
1293
|
+
var WORKFLOW_WRITING_OUTCOMES = /* @__PURE__ */ new Set([
|
|
1294
|
+
"installed" /* Installed */,
|
|
1295
|
+
"updated" /* Updated */,
|
|
1296
|
+
"replaced" /* Replaced */
|
|
1297
|
+
]);
|
|
1298
|
+
var CI_INSTALL_MESSAGES = {
|
|
1299
|
+
["installed" /* Installed */]: (path6) => `Wrote ${path6}
|
|
1300
|
+
Commit it, and every pull request here will owe a settled Muggle AI walkthrough comment.`,
|
|
1301
|
+
["updated" /* Updated */]: (path6) => `Updated ${path6} from an earlier Muggle release to the current workflow. Commit it.`,
|
|
1302
|
+
["already-current" /* AlreadyCurrent */]: (path6) => `${path6} is already the current workflow \u2014 nothing to do.`,
|
|
1303
|
+
["kept-customized" /* KeptCustomized */]: (path6) => `${path6} has been edited since Muggle wrote it \u2014 left untouched. Re-run with --force to replace it.`,
|
|
1304
|
+
["replaced" /* Replaced */]: (path6) => `Replaced ${path6} with the current workflow. Commit it.`,
|
|
1305
|
+
["not-a-repository" /* NotARepository */]: () => "Not a git repository \u2014 run this from the repo that should carry the check."
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1276
1308
|
// src/cli/ci-install.ts
|
|
1309
|
+
function resolveInstallOutcome(installedState, force) {
|
|
1310
|
+
switch (installedState) {
|
|
1311
|
+
case "missing" /* Missing */:
|
|
1312
|
+
return "installed" /* Installed */;
|
|
1313
|
+
case "outdated" /* Outdated */:
|
|
1314
|
+
return "updated" /* Updated */;
|
|
1315
|
+
case "current" /* Current */:
|
|
1316
|
+
return "already-current" /* AlreadyCurrent */;
|
|
1317
|
+
case "customized" /* Customized */:
|
|
1318
|
+
return force ? "replaced" /* Replaced */ : "kept-customized" /* KeptCustomized */;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1277
1321
|
function installCiWorkflow(options) {
|
|
1278
1322
|
const workflowPath = join(options.cwd, USER_WORKFLOW_PATH);
|
|
1279
1323
|
if (!existsSync(join(options.cwd, ".git"))) {
|
|
1280
1324
|
return { outcome: "not-a-repository" /* NotARepository */, workflowPath };
|
|
1281
1325
|
}
|
|
1282
|
-
|
|
1283
|
-
|
|
1326
|
+
const installedContent = existsSync(workflowPath) ? readFileSync(workflowPath, "utf-8") : null;
|
|
1327
|
+
const outcome = resolveInstallOutcome(classifyInstalledWorkflow(installedContent), options.force);
|
|
1328
|
+
if (WORKFLOW_WRITING_OUTCOMES.has(outcome)) {
|
|
1329
|
+
mkdirSync(dirname(workflowPath), { recursive: true });
|
|
1330
|
+
writeFileSync(workflowPath, renderUserWorkflow());
|
|
1284
1331
|
}
|
|
1285
|
-
|
|
1286
|
-
writeFileSync(workflowPath, renderUserWorkflow());
|
|
1287
|
-
return { outcome: "installed" /* Installed */, workflowPath };
|
|
1332
|
+
return { outcome, workflowPath };
|
|
1288
1333
|
}
|
|
1289
|
-
var MESSAGES = {
|
|
1290
|
-
["installed" /* Installed */]: (path6) => `Wrote ${path6}
|
|
1291
|
-
Commit it, and every pull request here will owe a settled Muggle AI walkthrough comment.`,
|
|
1292
|
-
["already-present" /* AlreadyPresent */]: (path6) => `${path6} already exists \u2014 left untouched. Re-run with --force to replace it.`,
|
|
1293
|
-
["not-a-repository" /* NotARepository */]: () => "Not a git repository \u2014 run this from the repo that should carry the check."
|
|
1294
|
-
};
|
|
1295
1334
|
function ciInstallCommand(flags) {
|
|
1296
1335
|
const report = installCiWorkflow({ cwd: process.cwd(), force: flags.force === true });
|
|
1297
|
-
const render =
|
|
1336
|
+
const render = CI_INSTALL_MESSAGES[report.outcome];
|
|
1298
1337
|
process.stdout.write(`${render(report.workflowPath)}
|
|
1299
1338
|
`);
|
|
1300
1339
|
if (report.outcome === "not-a-repository" /* NotARepository */) process.exitCode = 1;
|
|
@@ -2195,10 +2234,14 @@ function helpCommand() {
|
|
|
2195
2234
|
console.log(getHelpGuidance());
|
|
2196
2235
|
}
|
|
2197
2236
|
var QUESTION = "Make E2E acceptance a CI check in this repo? It adds a GitHub Actions workflow that fails a pull request\nwhose Muggle walkthrough is missing or reports a failed test. [y/N]: ";
|
|
2237
|
+
function keepInstalledWorkflowCurrent(cwd) {
|
|
2238
|
+
const report = installCiWorkflow({ cwd, force: false });
|
|
2239
|
+
return report.outcome === "updated" /* Updated */ ? "updated" /* Updated */ : "already-installed" /* AlreadyInstalled */;
|
|
2240
|
+
}
|
|
2198
2241
|
async function applyCiWorkflowPreference(preference, cwd, ask) {
|
|
2199
2242
|
if (!existsSync(join(cwd, ".git"))) return "not-applicable" /* NotApplicable */;
|
|
2200
|
-
if (existsSync(join(cwd, USER_WORKFLOW_PATH))) return "already-installed" /* AlreadyInstalled */;
|
|
2201
2243
|
if (preference === "never" /* Never */) return "turned-off" /* TurnedOff */;
|
|
2244
|
+
if (existsSync(join(cwd, USER_WORKFLOW_PATH))) return keepInstalledWorkflowCurrent(cwd);
|
|
2202
2245
|
if (preference !== "always" /* Always */) {
|
|
2203
2246
|
if (!ask) return "deferred" /* Deferred */;
|
|
2204
2247
|
const answer = (await ask(QUESTION)).trim().toLowerCase();
|
|
@@ -2354,6 +2397,7 @@ var CI_OFFER_REPORT = {
|
|
|
2354
2397
|
["deferred" /* Deferred */]: "This repo has no Muggle E2E check in CI yet \u2014 run `muggle ci-install` to add it.",
|
|
2355
2398
|
["turned-off" /* TurnedOff */]: null,
|
|
2356
2399
|
["already-installed" /* AlreadyInstalled */]: null,
|
|
2400
|
+
["updated" /* Updated */]: `Updated ${USER_WORKFLOW_PATH} from an earlier Muggle release \u2014 commit it.`,
|
|
2357
2401
|
["not-applicable" /* NotApplicable */]: null
|
|
2358
2402
|
};
|
|
2359
2403
|
async function runCiOffer(ask) {
|
|
@@ -2480,6 +2524,7 @@ var E2eSkipCode = /* @__PURE__ */ ((E2eSkipCode2) => {
|
|
|
2480
2524
|
E2eSkipCode2["NoPr"] = "NO_PR";
|
|
2481
2525
|
E2eSkipCode2["UserWaived"] = "USER_WAIVED";
|
|
2482
2526
|
E2eSkipCode2["NoAppLogicChange"] = "NO_APP_LOGIC_CHANGE";
|
|
2527
|
+
E2eSkipCode2["NotApplicable"] = "NOT_APPLICABLE";
|
|
2483
2528
|
return E2eSkipCode2;
|
|
2484
2529
|
})(E2eSkipCode || {});
|
|
2485
2530
|
|
|
@@ -2492,6 +2537,7 @@ var WALKTHROUGH_SLOT_MARKER = "<!-- muggle-pr-walkthrough:v1 -->";
|
|
|
2492
2537
|
var WALKTHROUGH_SKIPPED_MARKER = "<!-- muggle-pr-walkthrough-status:skipped -->";
|
|
2493
2538
|
var WALKTHROUGH_COMMENT_HEADING = "### Muggle AI \u2014 PR visual walkthrough";
|
|
2494
2539
|
var GH_COMMENT_TIMEOUT_MS = 1e4;
|
|
2540
|
+
var DEPENDENCY_BOT_LOGINS = ["dependabot[bot]", "renovate[bot]"];
|
|
2495
2541
|
|
|
2496
2542
|
// src/pr-walkthrough/comment.ts
|
|
2497
2543
|
function renderReservedComment() {
|
|
@@ -2500,6 +2546,13 @@ ${WALKTHROUGH_COMMENT_HEADING}
|
|
|
2500
2546
|
|
|
2501
2547
|
_Awaiting the E2E acceptance run. Muggle edits this comment in place when the run finishes \u2014 or records why E2E does not apply to this change._`;
|
|
2502
2548
|
}
|
|
2549
|
+
function renderDependencyBotComment(login) {
|
|
2550
|
+
return `${WALKTHROUGH_SLOT_MARKER}
|
|
2551
|
+
${WALKTHROUGH_SKIPPED_MARKER}
|
|
2552
|
+
${WALKTHROUGH_COMMENT_HEADING}
|
|
2553
|
+
|
|
2554
|
+
**No E2E run \u2014 not applicable.** A dependency update opened by \`${login}\`; no coding session ran on it.`;
|
|
2555
|
+
}
|
|
2503
2556
|
function classifyComment(body) {
|
|
2504
2557
|
if (body.includes(REPORT_SENTINEL)) return "reported" /* Reported */;
|
|
2505
2558
|
if (!body.includes(WALKTHROUGH_SLOT_MARKER)) return "not-designated" /* NotDesignated */;
|
|
@@ -2558,6 +2611,13 @@ function readPrHeadSha(pr, run) {
|
|
|
2558
2611
|
return null;
|
|
2559
2612
|
}
|
|
2560
2613
|
}
|
|
2614
|
+
function readPrAuthorLogin(pr, run) {
|
|
2615
|
+
try {
|
|
2616
|
+
return run(["api", `repos/${pr.repo}/pulls/${pr.prNumber}`, "--jq", ".user.login"])?.trim() || null;
|
|
2617
|
+
} catch {
|
|
2618
|
+
return null;
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2561
2621
|
function writeJson(args, payload, run) {
|
|
2562
2622
|
try {
|
|
2563
2623
|
return run(args, JSON.stringify(payload)) !== null;
|
|
@@ -2572,6 +2632,13 @@ function postPrComment(pr, body, run) {
|
|
|
2572
2632
|
run
|
|
2573
2633
|
);
|
|
2574
2634
|
}
|
|
2635
|
+
function patchPrComment(pr, commentId, body, run) {
|
|
2636
|
+
return writeJson(
|
|
2637
|
+
["api", "--method", "PATCH", `repos/${pr.repo}/issues/comments/${commentId}`, "--input", "-"],
|
|
2638
|
+
{ body },
|
|
2639
|
+
run
|
|
2640
|
+
);
|
|
2641
|
+
}
|
|
2575
2642
|
function createCheckRun(repo, checkRun, run) {
|
|
2576
2643
|
return writeJson(["api", "--method", "POST", `repos/${repo}/check-runs`, "--input", "-"], {
|
|
2577
2644
|
name: checkRun.name,
|
|
@@ -2583,6 +2650,9 @@ function createCheckRun(repo, checkRun, run) {
|
|
|
2583
2650
|
}
|
|
2584
2651
|
|
|
2585
2652
|
// src/pr-walkthrough/reserve.ts
|
|
2653
|
+
function commentWithStatus(comments, status) {
|
|
2654
|
+
return comments.find((comment) => classifyComment(comment.body) === status);
|
|
2655
|
+
}
|
|
2586
2656
|
function reserveComment(pr, comments, run) {
|
|
2587
2657
|
const claimed = comments.some(
|
|
2588
2658
|
(comment) => classifyComment(comment.body) !== "not-designated" /* NotDesignated */
|
|
@@ -2590,6 +2660,11 @@ function reserveComment(pr, comments, run) {
|
|
|
2590
2660
|
if (claimed) return false;
|
|
2591
2661
|
return postPrComment(pr, renderReservedComment(), run);
|
|
2592
2662
|
}
|
|
2663
|
+
function settleDependencyBotComment(pr, comments, login, run) {
|
|
2664
|
+
const body = renderDependencyBotComment(login);
|
|
2665
|
+
const reserved = commentWithStatus(comments, "pending" /* Pending */);
|
|
2666
|
+
return reserved ? patchPrComment(pr, reserved.id, body, run) : postPrComment(pr, body, run);
|
|
2667
|
+
}
|
|
2593
2668
|
|
|
2594
2669
|
// src/cli/pr-walkthrough/constants.ts
|
|
2595
2670
|
var CHECK_RUN_NAME = "muggle-walkthrough";
|
|
@@ -2634,6 +2709,16 @@ function judgeComments(pr, comments, run) {
|
|
|
2634
2709
|
}
|
|
2635
2710
|
const bodies = comments.map((comment) => comment.body);
|
|
2636
2711
|
const verdict = walkthroughVerdict(bodies);
|
|
2712
|
+
if (verdict !== "satisfied" /* Satisfied */) {
|
|
2713
|
+
const author = readPrAuthorLogin(pr, run);
|
|
2714
|
+
if (author && DEPENDENCY_BOT_LOGINS.includes(author)) {
|
|
2715
|
+
settleDependencyBotComment(pr, comments, author, run);
|
|
2716
|
+
return {
|
|
2717
|
+
outcome: "settled" /* Settled */,
|
|
2718
|
+
summary: FIXED_SUMMARIES["settled" /* Settled */]
|
|
2719
|
+
};
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2637
2722
|
if (verdict === "missing" /* Missing */) reserveComment(pr, comments, run);
|
|
2638
2723
|
const record = latestE2eResult(bodies);
|
|
2639
2724
|
if (record && record.unpassed.length > 0) {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-
|
|
1
|
+
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-U5ZA3VTZ.js';
|
|
2
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-SLU7LHVJ.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.
|
|
4
|
+
"version": "5.26.0-staging.198",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"version": "5.26.0-staging.
|
|
3
|
+
"version": "5.26.0-staging.198",
|
|
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.
|
|
5
|
+
"version": "5.26.0-staging.198",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/dist/plugin/.mcp.json
CHANGED
|
@@ -1092,6 +1092,7 @@ var E2eSkipCode = /* @__PURE__ */ ((E2eSkipCode3) => {
|
|
|
1092
1092
|
E2eSkipCode3["NoPr"] = "NO_PR";
|
|
1093
1093
|
E2eSkipCode3["UserWaived"] = "USER_WAIVED";
|
|
1094
1094
|
E2eSkipCode3["NoAppLogicChange"] = "NO_APP_LOGIC_CHANGE";
|
|
1095
|
+
E2eSkipCode3["NotApplicable"] = "NOT_APPLICABLE";
|
|
1095
1096
|
return E2eSkipCode3;
|
|
1096
1097
|
})(E2eSkipCode || {});
|
|
1097
1098
|
|
|
@@ -1107,7 +1108,8 @@ var E2E_SKIP_CODE_CLAIMS = {
|
|
|
1107
1108
|
["MUGGLE_AUTH_DOWN" /* MuggleAuthDown */]: "the stored Muggle session is missing or expired",
|
|
1108
1109
|
["NO_PR" /* NoPr */]: "no pull request was handled this session",
|
|
1109
1110
|
["USER_WAIVED" /* UserWaived */]: "the user waived E2E in their own words",
|
|
1110
|
-
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: `every path changed since the named commit is ${NON_APP_PATH_SUMMARY}
|
|
1111
|
+
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: `every path changed since the named commit is ${NON_APP_PATH_SUMMARY}`,
|
|
1112
|
+
["NOT_APPLICABLE" /* NotApplicable */]: "a browser run cannot exercise this change, for the reason stated"
|
|
1111
1113
|
};
|
|
1112
1114
|
var CYCLE_SCOPED_SKIP_CODES = ["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */];
|
|
1113
1115
|
var PRE_CYCLE_SHA_TOKEN = /^([0-9a-f]{7,40})(?![0-9a-z_])/i;
|
|
@@ -1128,6 +1130,7 @@ var NON_APP_PATH_PATTERNS = [
|
|
|
1128
1130
|
];
|
|
1129
1131
|
var MAX_NAMED_APP_LOGIC_PATHS = 5;
|
|
1130
1132
|
var USER_WAIVE_PHRASE = "SKIP E2E";
|
|
1133
|
+
var MIN_NOT_APPLICABLE_REASON_WORDS = 4;
|
|
1131
1134
|
var DEV_SERVER_PROBE_TIMEOUT_MS = 2e3;
|
|
1132
1135
|
var GIT_PROBE_TIMEOUT_MS = 5e3;
|
|
1133
1136
|
var WEB_SERVER_COMMAND = /\b(vite|next\s+(dev|start)|react-scripts|ng\s+serve|nuxt|astro\s+dev|remix\s+dev|webpack(-dev)?-server|http-server|serve\s+-s|gatsby\s+develop|vue-cli-service\s+serve)\b/;
|
|
@@ -1176,6 +1179,7 @@ _Awaiting the E2E acceptance run. Muggle edits this comment in place when the ru
|
|
|
1176
1179
|
}
|
|
1177
1180
|
function renderSkippedComment(code, detail) {
|
|
1178
1181
|
const stated = detail.trim();
|
|
1182
|
+
if (code === "NOT_APPLICABLE" /* NotApplicable */) return renderNotApplicableComment(stated);
|
|
1179
1183
|
const qualifier = stated ? ` \u2014 ${stated}` : "";
|
|
1180
1184
|
return `${WALKTHROUGH_SLOT_MARKER}
|
|
1181
1185
|
${WALKTHROUGH_SKIPPED_MARKER}
|
|
@@ -1183,6 +1187,15 @@ ${WALKTHROUGH_COMMENT_HEADING}
|
|
|
1183
1187
|
|
|
1184
1188
|
**No E2E run.** Muggle verified \`${code}\` \u2014 ${E2E_SKIP_CODE_CLAIMS[code]}${qualifier}.`;
|
|
1185
1189
|
}
|
|
1190
|
+
function renderNotApplicableComment(reason) {
|
|
1191
|
+
return `${WALKTHROUGH_SLOT_MARKER}
|
|
1192
|
+
${WALKTHROUGH_SKIPPED_MARKER}
|
|
1193
|
+
${WALKTHROUGH_COMMENT_HEADING}
|
|
1194
|
+
|
|
1195
|
+
**No E2E run \u2014 not applicable.** ${reason.replace(/\.$/, "")}.
|
|
1196
|
+
|
|
1197
|
+
_The coding agent judged that a browser run cannot exercise this change (\`${"NOT_APPLICABLE" /* NotApplicable */}\`). Muggle did not verify this reason._`;
|
|
1198
|
+
}
|
|
1186
1199
|
function renderUnreasonedSkipComment() {
|
|
1187
1200
|
return `${WALKTHROUGH_SLOT_MARKER}
|
|
1188
1201
|
${WALKTHROUGH_SKIPPED_MARKER}
|
|
@@ -1401,6 +1414,13 @@ var verifyNoAppLogicChange = (context, detail) => {
|
|
|
1401
1414
|
if (appLogicPaths.length > 0) return refuted(`app-logic paths changed since ${sha}: ${namePaths(appLogicPaths)}`);
|
|
1402
1415
|
return verified;
|
|
1403
1416
|
};
|
|
1417
|
+
var verifyNotApplicable = (_context, detail) => {
|
|
1418
|
+
const words = detail.trim().split(/\s+/).filter(Boolean).length;
|
|
1419
|
+
if (words >= MIN_NOT_APPLICABLE_REASON_WORDS) return verified;
|
|
1420
|
+
return refuted(
|
|
1421
|
+
`the reason is ${words === 0 ? "missing" : "too short to weigh"} \u2014 cite it as NOT_APPLICABLE: <why a browser run cannot exercise this change>, in at least ${MIN_NOT_APPLICABLE_REASON_WORDS} words`
|
|
1422
|
+
);
|
|
1423
|
+
};
|
|
1404
1424
|
var VERIFIERS = {
|
|
1405
1425
|
["NO_WEB_SURFACE" /* NoWebSurface */]: verifyNoWebSurface,
|
|
1406
1426
|
["DEV_SERVER_UNREACHABLE" /* DevServerUnreachable */]: verifyDevServerUnreachable,
|
|
@@ -1408,7 +1428,8 @@ var VERIFIERS = {
|
|
|
1408
1428
|
["MUGGLE_AUTH_DOWN" /* MuggleAuthDown */]: verifyMuggleAuthDown,
|
|
1409
1429
|
["NO_PR" /* NoPr */]: verifyNoPr,
|
|
1410
1430
|
["USER_WAIVED" /* UserWaived */]: verifyUserWaived,
|
|
1411
|
-
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: verifyNoAppLogicChange
|
|
1431
|
+
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: verifyNoAppLogicChange,
|
|
1432
|
+
["NOT_APPLICABLE" /* NotApplicable */]: verifyNotApplicable
|
|
1412
1433
|
};
|
|
1413
1434
|
function verifyDeclaredSkip(skip, context) {
|
|
1414
1435
|
return VERIFIERS[skip.code](context, skip.detail);
|
|
@@ -1433,7 +1454,7 @@ function explainRejection(judged) {
|
|
|
1433
1454
|
return `That skip declaration states no code. E2E is skipped only by citing one of: ${codeMenu()}.`;
|
|
1434
1455
|
}
|
|
1435
1456
|
if (judged.rejection === "unknown-code" /* UnknownCode */) {
|
|
1436
|
-
return `"${judged.claimedCode}" is not a skip code, so E2E is still owed.
|
|
1457
|
+
return `"${judged.claimedCode}" is not a skip code, so E2E is still owed. Cite one of: ${codeMenu()}. If none of them is true, the run has to happen.`;
|
|
1437
1458
|
}
|
|
1438
1459
|
return `The skip cited ${judged.claimedCode}, but that could not be verified: ${judged.failure}. E2E is still owed \u2014 cite a code that holds, or run it.`;
|
|
1439
1460
|
}
|
|
@@ -2085,7 +2106,7 @@ function e2eGate() {
|
|
|
2085
2106
|
if (decision.action === "none" /* None */) return "{}";
|
|
2086
2107
|
state.e2eBlockCount = decision.blockCount;
|
|
2087
2108
|
writeState(state);
|
|
2088
|
-
const reason = decision.blockCount === 1 ? `Do not end the turn yet. This session went unit-green or opened a PR, but no E2E acceptance run has happened. Per the autoE2ETest preference (default: always), run change-driven E2E now via ${muggleSkill("/muggle:muggle-test")}, then finish.
|
|
2109
|
+
const reason = decision.blockCount === 1 ? `Do not end the turn yet. This session went unit-green or opened a PR, but no E2E acceptance run has happened. Per the autoE2ETest preference (default: always), run change-driven E2E now via ${muggleSkill("/muggle:muggle-test")}, then finish. To skip, run \`echo "MUGGLE_E2E_SKIP: <CODE>: <detail>"\` citing one of ${E2E_SKIP_CODES.join(", ")}. Muggle verifies each code itself, so one that does not hold leaves this gate blocked. Only when no verifiable code fits and a browser run genuinely cannot exercise the change, cite ${"NOT_APPLICABLE" /* NotApplicable */} with the reason \u2014 the PR shows it as your unverified judgment.` : `E2E acceptance run still owed (reminder ${decision.blockCount}/${MAX_E2E_BLOCKS}): run ${muggleSkill("/muggle:muggle-test")}, or cite a verifiable code via \`echo "MUGGLE_E2E_SKIP: <CODE>: <detail>"\`.`;
|
|
2089
2110
|
return blockStop(reason, host);
|
|
2090
2111
|
}
|
|
2091
2112
|
function watchGate() {
|
|
@@ -23,7 +23,9 @@ This stage is **mode-driven by pre-flight**:
|
|
|
23
23
|
|
|
24
24
|
**Every SKIPPED exit from this stage** (Step 0 poll-only, Step 1 `unit-only`/`skip`, Step 1.5 placeholder branch) also runs `echo "MUGGLE_E2E_SKIP: <CODE>: <detail>"` as a single Bash call before exiting — it records the skip in guardrail session state so the Stop-hook E2E gate releases instead of blocking the turn.
|
|
25
25
|
|
|
26
|
-
`<CODE>` is one of `NO_WEB_SURFACE`, `DEV_SERVER_UNREACHABLE`, `EMPTY_DIFF`, `MUGGLE_AUTH_DOWN`, `NO_PR`, `USER_WAIVED`, `NO_APP_LOGIC_CHANGE` — the one list of
|
|
26
|
+
`<CODE>` is one of `NO_WEB_SURFACE`, `DEV_SERVER_UNREACHABLE`, `EMPTY_DIFF`, `MUGGLE_AUTH_DOWN`, `NO_PR`, `USER_WAIVED`, `NO_APP_LOGIC_CHANGE`, `NOT_APPLICABLE` — the one list of skip codes, which other files reference rather than restate — and the guardrail checks it before the gate releases. Every code but `NOT_APPLICABLE` names a fact the guardrail checks for itself, about the environment or about which paths a commit range touched. "Static page", "layout only", "unit tests cover it" and "verified with another tool" are not reasons E2E cannot apply — cite a code that holds, or run the tests. `USER_WAIVED` needs the user's own literal `SKIP E2E` in the transcript, never an inferred go-ahead. A rejected declaration is answered with the check that failed, and the turn stays blocked.
|
|
27
|
+
|
|
28
|
+
`NOT_APPLICABLE` is the last resort, for a change no browser run can exercise and no verifiable code covers — an email template, a backend path the UI never reaches, a scheduled job. Its detail is the reason, in at least four words, and the PR's walkthrough comment shows that reason as the agent's own judgment, marked unverified, for the reviewer to accept or push back on. Never cite it to avoid a run that could happen.
|
|
27
29
|
|
|
28
30
|
`NO_APP_LOGIC_CHANGE` belongs to a watcher cycle's minor tail ([`cycle-size.md`](cycle-size.md)), never to a Stage 6 exit. Its detail opens with the cycle's starting commit. Muggle diffs that commit against HEAD and accepts only when every changed path is docs (`*.md`, `*.markdown`, `*.rst`), tests (`*.test.*`, `*.spec.*`, `__tests__/`, `__snapshots__/`, `__mocks__/`, `test_*.py`, `*_test.py`, `*_test.go`, a root-level `test/` or `tests/`), lint/format config (ESLint, Prettier, Stylelint and markdownlint config or ignore files, `biome.json`, `.editorconfig`), or CI config (`.github/workflows/`, `.gitlab-ci.yml`). A commit it cannot resolve, an empty diff, or any other path — a comment-only edit in a source file included — fails.
|
|
29
31
|
- `staging-replay` is not executed in this stage path and should be surfaced as `INCONCLUSIVE` unless the caller has already routed to a dedicated staging runner.
|
|
@@ -24,7 +24,9 @@ Forward pipeline's Stage 7. Invoked by `/muggle-do` after stages 1–6 of a fres
|
|
|
24
24
|
|
|
25
25
|
1. **Sync with the base:** run [`../../_shared/sync-branch-with-base.md`](../../_shared/sync-branch-with-base.md) with `base` set to the PR target recorded in `state.md` — gated by [`autoRebase`](../../muggle-preferences/preference-gates/autoRebase.md), fires only when `behind > 0`. The branch is not on the remote yet, so the rebase lands without a force-push. Sync here rather than trusting stage 6: a `unit-only` or `skip` run never reaches the E2E stage's sync at all, and on a run that does, the base moves freely while stages 3–6 build and test. If the sync escalates — conflicts under `autoResolveConflicts=never`, or a resolution that fails the verify-or-rollback gate — stop and report; never open a PR on a tree that did not verify.
|
|
26
26
|
|
|
27
|
-
1.5. **CI check:**
|
|
27
|
+
1.5. **CI check:** GitHub repos only, gated by [`autoInstallCiWorkflow`](../../muggle-preferences/preference-gates/autoInstallCiWorkflow.md).
|
|
28
|
+
- **Tree lacks `.github/workflows/muggle-walkthrough.yml`** — on `always`, or `CI check: add` recorded by pre-flight, run `muggle ci-install` in the working tree and commit the workflow as `ci: add the Muggle E2E walkthrough check`, so it ships in this PR. On `never` or `CI check: skip`, leave CI alone.
|
|
29
|
+
- **Tree has it** — unless the gate resolves to `never`, run `muggle ci-install` without `--force`. It replaces only an unedited copy an earlier release wrote and leaves a current or edited one alone, so nothing needs asking. When it reports `Updated`, commit the file as `ci: update the Muggle E2E walkthrough check`.
|
|
28
30
|
|
|
29
31
|
2. **Push:** Execute per [`../../_shared/vcs/common/push-to-branch.md`](../../_shared/vcs/common/push-to-branch.md) — the tool-agnostic instruction for pushing commits (handles the signing gate and directs to provider-specific recipes).
|
|
30
32
|
|
|
@@ -70,7 +70,7 @@ When invoked with the directive (PR URL + slug + review ids), routes to [`../do/
|
|
|
70
70
|
| `autoE2ETest` | Stage 6 — run E2E every cycle (default `always`), or fold into pre-flight |
|
|
71
71
|
| `autoResolveConflicts` | On rebase conflict — `always` resolves autonomously behind a verify-or-rollback gate, `never` aborts + escalates; resolve from the configured preference (don't assume a default) |
|
|
72
72
|
| `autoRouteBuildToMuggleDo` | Front-door guardrail — route build/implement/fix requests through this pipeline (build delegated to superpowers); fired by the UserPromptSubmit guardrail, default `ask` |
|
|
73
|
-
| `autoInstallCiWorkflow` | Stage 7 — add the `muggle-walkthrough` CI check to a GitHub repo that lacks it, shipped in the PR; `ask` folds into pre-flight, default `ask` |
|
|
73
|
+
| `autoInstallCiWorkflow` | Stage 7 — add the `muggle-walkthrough` CI check to a GitHub repo that lacks it, shipped in the PR; `ask` folds into pre-flight, default `ask`. An unedited copy from an earlier release is refreshed unless `never` |
|
|
74
74
|
|
|
75
75
|
`autoUseWorktree`, `autoRebase`, `autoResolveConflicts`, `autoCreatePR`, `autoCleanup`, `postPRVisualWalkthrough` fire from per-stage files.
|
|
76
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `autoInstallCiWorkflow`
|
|
2
2
|
|
|
3
|
-
Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the workflow already exists
|
|
3
|
+
Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the repository is not on GitHub. Where the workflow already exists only `never` counts: any other value lets `muggle ci-install` replace an unedited copy an earlier release wrote, without asking, and an edited copy is never touched. Substitute `{repo}`.
|
|
4
4
|
|
|
5
5
|
**Picker 1** — header `CI check`, question `"Add the Muggle E2E check to {repo}'s CI? Pull requests then fail while their walkthrough is missing or reports a failed test."`
|
|
6
6
|
- `Add it` — `Run muggle ci-install and ship the workflow with this change.` → `always`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"release": "5.18.0",
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-10-
|
|
3
|
+
"buildId": "run-198-1",
|
|
4
|
+
"commitSha": "887a8e6d00ec12e27ae8414332766a3239930222",
|
|
5
|
+
"buildTime": "2026-10-25T04:03:06Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
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.
|
|
4
|
+
"version": "5.26.0-staging.198",
|
|
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",
|
|
@@ -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.
|
|
4
|
+
"version": "5.26.0-staging.198",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
package/plugin/.codex-mcp.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"version": "5.26.0-staging.
|
|
3
|
+
"version": "5.26.0-staging.198",
|
|
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.
|
|
5
|
+
"version": "5.26.0-staging.198",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/.mcp.json
CHANGED
|
@@ -1092,6 +1092,7 @@ var E2eSkipCode = /* @__PURE__ */ ((E2eSkipCode3) => {
|
|
|
1092
1092
|
E2eSkipCode3["NoPr"] = "NO_PR";
|
|
1093
1093
|
E2eSkipCode3["UserWaived"] = "USER_WAIVED";
|
|
1094
1094
|
E2eSkipCode3["NoAppLogicChange"] = "NO_APP_LOGIC_CHANGE";
|
|
1095
|
+
E2eSkipCode3["NotApplicable"] = "NOT_APPLICABLE";
|
|
1095
1096
|
return E2eSkipCode3;
|
|
1096
1097
|
})(E2eSkipCode || {});
|
|
1097
1098
|
|
|
@@ -1107,7 +1108,8 @@ var E2E_SKIP_CODE_CLAIMS = {
|
|
|
1107
1108
|
["MUGGLE_AUTH_DOWN" /* MuggleAuthDown */]: "the stored Muggle session is missing or expired",
|
|
1108
1109
|
["NO_PR" /* NoPr */]: "no pull request was handled this session",
|
|
1109
1110
|
["USER_WAIVED" /* UserWaived */]: "the user waived E2E in their own words",
|
|
1110
|
-
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: `every path changed since the named commit is ${NON_APP_PATH_SUMMARY}
|
|
1111
|
+
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: `every path changed since the named commit is ${NON_APP_PATH_SUMMARY}`,
|
|
1112
|
+
["NOT_APPLICABLE" /* NotApplicable */]: "a browser run cannot exercise this change, for the reason stated"
|
|
1111
1113
|
};
|
|
1112
1114
|
var CYCLE_SCOPED_SKIP_CODES = ["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */];
|
|
1113
1115
|
var PRE_CYCLE_SHA_TOKEN = /^([0-9a-f]{7,40})(?![0-9a-z_])/i;
|
|
@@ -1128,6 +1130,7 @@ var NON_APP_PATH_PATTERNS = [
|
|
|
1128
1130
|
];
|
|
1129
1131
|
var MAX_NAMED_APP_LOGIC_PATHS = 5;
|
|
1130
1132
|
var USER_WAIVE_PHRASE = "SKIP E2E";
|
|
1133
|
+
var MIN_NOT_APPLICABLE_REASON_WORDS = 4;
|
|
1131
1134
|
var DEV_SERVER_PROBE_TIMEOUT_MS = 2e3;
|
|
1132
1135
|
var GIT_PROBE_TIMEOUT_MS = 5e3;
|
|
1133
1136
|
var WEB_SERVER_COMMAND = /\b(vite|next\s+(dev|start)|react-scripts|ng\s+serve|nuxt|astro\s+dev|remix\s+dev|webpack(-dev)?-server|http-server|serve\s+-s|gatsby\s+develop|vue-cli-service\s+serve)\b/;
|
|
@@ -1176,6 +1179,7 @@ _Awaiting the E2E acceptance run. Muggle edits this comment in place when the ru
|
|
|
1176
1179
|
}
|
|
1177
1180
|
function renderSkippedComment(code, detail) {
|
|
1178
1181
|
const stated = detail.trim();
|
|
1182
|
+
if (code === "NOT_APPLICABLE" /* NotApplicable */) return renderNotApplicableComment(stated);
|
|
1179
1183
|
const qualifier = stated ? ` \u2014 ${stated}` : "";
|
|
1180
1184
|
return `${WALKTHROUGH_SLOT_MARKER}
|
|
1181
1185
|
${WALKTHROUGH_SKIPPED_MARKER}
|
|
@@ -1183,6 +1187,15 @@ ${WALKTHROUGH_COMMENT_HEADING}
|
|
|
1183
1187
|
|
|
1184
1188
|
**No E2E run.** Muggle verified \`${code}\` \u2014 ${E2E_SKIP_CODE_CLAIMS[code]}${qualifier}.`;
|
|
1185
1189
|
}
|
|
1190
|
+
function renderNotApplicableComment(reason) {
|
|
1191
|
+
return `${WALKTHROUGH_SLOT_MARKER}
|
|
1192
|
+
${WALKTHROUGH_SKIPPED_MARKER}
|
|
1193
|
+
${WALKTHROUGH_COMMENT_HEADING}
|
|
1194
|
+
|
|
1195
|
+
**No E2E run \u2014 not applicable.** ${reason.replace(/\.$/, "")}.
|
|
1196
|
+
|
|
1197
|
+
_The coding agent judged that a browser run cannot exercise this change (\`${"NOT_APPLICABLE" /* NotApplicable */}\`). Muggle did not verify this reason._`;
|
|
1198
|
+
}
|
|
1186
1199
|
function renderUnreasonedSkipComment() {
|
|
1187
1200
|
return `${WALKTHROUGH_SLOT_MARKER}
|
|
1188
1201
|
${WALKTHROUGH_SKIPPED_MARKER}
|
|
@@ -1401,6 +1414,13 @@ var verifyNoAppLogicChange = (context, detail) => {
|
|
|
1401
1414
|
if (appLogicPaths.length > 0) return refuted(`app-logic paths changed since ${sha}: ${namePaths(appLogicPaths)}`);
|
|
1402
1415
|
return verified;
|
|
1403
1416
|
};
|
|
1417
|
+
var verifyNotApplicable = (_context, detail) => {
|
|
1418
|
+
const words = detail.trim().split(/\s+/).filter(Boolean).length;
|
|
1419
|
+
if (words >= MIN_NOT_APPLICABLE_REASON_WORDS) return verified;
|
|
1420
|
+
return refuted(
|
|
1421
|
+
`the reason is ${words === 0 ? "missing" : "too short to weigh"} \u2014 cite it as NOT_APPLICABLE: <why a browser run cannot exercise this change>, in at least ${MIN_NOT_APPLICABLE_REASON_WORDS} words`
|
|
1422
|
+
);
|
|
1423
|
+
};
|
|
1404
1424
|
var VERIFIERS = {
|
|
1405
1425
|
["NO_WEB_SURFACE" /* NoWebSurface */]: verifyNoWebSurface,
|
|
1406
1426
|
["DEV_SERVER_UNREACHABLE" /* DevServerUnreachable */]: verifyDevServerUnreachable,
|
|
@@ -1408,7 +1428,8 @@ var VERIFIERS = {
|
|
|
1408
1428
|
["MUGGLE_AUTH_DOWN" /* MuggleAuthDown */]: verifyMuggleAuthDown,
|
|
1409
1429
|
["NO_PR" /* NoPr */]: verifyNoPr,
|
|
1410
1430
|
["USER_WAIVED" /* UserWaived */]: verifyUserWaived,
|
|
1411
|
-
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: verifyNoAppLogicChange
|
|
1431
|
+
["NO_APP_LOGIC_CHANGE" /* NoAppLogicChange */]: verifyNoAppLogicChange,
|
|
1432
|
+
["NOT_APPLICABLE" /* NotApplicable */]: verifyNotApplicable
|
|
1412
1433
|
};
|
|
1413
1434
|
function verifyDeclaredSkip(skip, context) {
|
|
1414
1435
|
return VERIFIERS[skip.code](context, skip.detail);
|
|
@@ -1433,7 +1454,7 @@ function explainRejection(judged) {
|
|
|
1433
1454
|
return `That skip declaration states no code. E2E is skipped only by citing one of: ${codeMenu()}.`;
|
|
1434
1455
|
}
|
|
1435
1456
|
if (judged.rejection === "unknown-code" /* UnknownCode */) {
|
|
1436
|
-
return `"${judged.claimedCode}" is not a skip code, so E2E is still owed.
|
|
1457
|
+
return `"${judged.claimedCode}" is not a skip code, so E2E is still owed. Cite one of: ${codeMenu()}. If none of them is true, the run has to happen.`;
|
|
1437
1458
|
}
|
|
1438
1459
|
return `The skip cited ${judged.claimedCode}, but that could not be verified: ${judged.failure}. E2E is still owed \u2014 cite a code that holds, or run it.`;
|
|
1439
1460
|
}
|
|
@@ -2085,7 +2106,7 @@ function e2eGate() {
|
|
|
2085
2106
|
if (decision.action === "none" /* None */) return "{}";
|
|
2086
2107
|
state.e2eBlockCount = decision.blockCount;
|
|
2087
2108
|
writeState(state);
|
|
2088
|
-
const reason = decision.blockCount === 1 ? `Do not end the turn yet. This session went unit-green or opened a PR, but no E2E acceptance run has happened. Per the autoE2ETest preference (default: always), run change-driven E2E now via ${muggleSkill("/muggle:muggle-test")}, then finish.
|
|
2109
|
+
const reason = decision.blockCount === 1 ? `Do not end the turn yet. This session went unit-green or opened a PR, but no E2E acceptance run has happened. Per the autoE2ETest preference (default: always), run change-driven E2E now via ${muggleSkill("/muggle:muggle-test")}, then finish. To skip, run \`echo "MUGGLE_E2E_SKIP: <CODE>: <detail>"\` citing one of ${E2E_SKIP_CODES.join(", ")}. Muggle verifies each code itself, so one that does not hold leaves this gate blocked. Only when no verifiable code fits and a browser run genuinely cannot exercise the change, cite ${"NOT_APPLICABLE" /* NotApplicable */} with the reason \u2014 the PR shows it as your unverified judgment.` : `E2E acceptance run still owed (reminder ${decision.blockCount}/${MAX_E2E_BLOCKS}): run ${muggleSkill("/muggle:muggle-test")}, or cite a verifiable code via \`echo "MUGGLE_E2E_SKIP: <CODE>: <detail>"\`.`;
|
|
2089
2110
|
return blockStop(reason, host);
|
|
2090
2111
|
}
|
|
2091
2112
|
function watchGate() {
|
|
@@ -23,7 +23,9 @@ This stage is **mode-driven by pre-flight**:
|
|
|
23
23
|
|
|
24
24
|
**Every SKIPPED exit from this stage** (Step 0 poll-only, Step 1 `unit-only`/`skip`, Step 1.5 placeholder branch) also runs `echo "MUGGLE_E2E_SKIP: <CODE>: <detail>"` as a single Bash call before exiting — it records the skip in guardrail session state so the Stop-hook E2E gate releases instead of blocking the turn.
|
|
25
25
|
|
|
26
|
-
`<CODE>` is one of `NO_WEB_SURFACE`, `DEV_SERVER_UNREACHABLE`, `EMPTY_DIFF`, `MUGGLE_AUTH_DOWN`, `NO_PR`, `USER_WAIVED`, `NO_APP_LOGIC_CHANGE` — the one list of
|
|
26
|
+
`<CODE>` is one of `NO_WEB_SURFACE`, `DEV_SERVER_UNREACHABLE`, `EMPTY_DIFF`, `MUGGLE_AUTH_DOWN`, `NO_PR`, `USER_WAIVED`, `NO_APP_LOGIC_CHANGE`, `NOT_APPLICABLE` — the one list of skip codes, which other files reference rather than restate — and the guardrail checks it before the gate releases. Every code but `NOT_APPLICABLE` names a fact the guardrail checks for itself, about the environment or about which paths a commit range touched. "Static page", "layout only", "unit tests cover it" and "verified with another tool" are not reasons E2E cannot apply — cite a code that holds, or run the tests. `USER_WAIVED` needs the user's own literal `SKIP E2E` in the transcript, never an inferred go-ahead. A rejected declaration is answered with the check that failed, and the turn stays blocked.
|
|
27
|
+
|
|
28
|
+
`NOT_APPLICABLE` is the last resort, for a change no browser run can exercise and no verifiable code covers — an email template, a backend path the UI never reaches, a scheduled job. Its detail is the reason, in at least four words, and the PR's walkthrough comment shows that reason as the agent's own judgment, marked unverified, for the reviewer to accept or push back on. Never cite it to avoid a run that could happen.
|
|
27
29
|
|
|
28
30
|
`NO_APP_LOGIC_CHANGE` belongs to a watcher cycle's minor tail ([`cycle-size.md`](cycle-size.md)), never to a Stage 6 exit. Its detail opens with the cycle's starting commit. Muggle diffs that commit against HEAD and accepts only when every changed path is docs (`*.md`, `*.markdown`, `*.rst`), tests (`*.test.*`, `*.spec.*`, `__tests__/`, `__snapshots__/`, `__mocks__/`, `test_*.py`, `*_test.py`, `*_test.go`, a root-level `test/` or `tests/`), lint/format config (ESLint, Prettier, Stylelint and markdownlint config or ignore files, `biome.json`, `.editorconfig`), or CI config (`.github/workflows/`, `.gitlab-ci.yml`). A commit it cannot resolve, an empty diff, or any other path — a comment-only edit in a source file included — fails.
|
|
29
31
|
- `staging-replay` is not executed in this stage path and should be surfaced as `INCONCLUSIVE` unless the caller has already routed to a dedicated staging runner.
|
|
@@ -24,7 +24,9 @@ Forward pipeline's Stage 7. Invoked by `/muggle-do` after stages 1–6 of a fres
|
|
|
24
24
|
|
|
25
25
|
1. **Sync with the base:** run [`../../_shared/sync-branch-with-base.md`](../../_shared/sync-branch-with-base.md) with `base` set to the PR target recorded in `state.md` — gated by [`autoRebase`](../../muggle-preferences/preference-gates/autoRebase.md), fires only when `behind > 0`. The branch is not on the remote yet, so the rebase lands without a force-push. Sync here rather than trusting stage 6: a `unit-only` or `skip` run never reaches the E2E stage's sync at all, and on a run that does, the base moves freely while stages 3–6 build and test. If the sync escalates — conflicts under `autoResolveConflicts=never`, or a resolution that fails the verify-or-rollback gate — stop and report; never open a PR on a tree that did not verify.
|
|
26
26
|
|
|
27
|
-
1.5. **CI check:**
|
|
27
|
+
1.5. **CI check:** GitHub repos only, gated by [`autoInstallCiWorkflow`](../../muggle-preferences/preference-gates/autoInstallCiWorkflow.md).
|
|
28
|
+
- **Tree lacks `.github/workflows/muggle-walkthrough.yml`** — on `always`, or `CI check: add` recorded by pre-flight, run `muggle ci-install` in the working tree and commit the workflow as `ci: add the Muggle E2E walkthrough check`, so it ships in this PR. On `never` or `CI check: skip`, leave CI alone.
|
|
29
|
+
- **Tree has it** — unless the gate resolves to `never`, run `muggle ci-install` without `--force`. It replaces only an unedited copy an earlier release wrote and leaves a current or edited one alone, so nothing needs asking. When it reports `Updated`, commit the file as `ci: update the Muggle E2E walkthrough check`.
|
|
28
30
|
|
|
29
31
|
2. **Push:** Execute per [`../../_shared/vcs/common/push-to-branch.md`](../../_shared/vcs/common/push-to-branch.md) — the tool-agnostic instruction for pushing commits (handles the signing gate and directs to provider-specific recipes).
|
|
30
32
|
|
|
@@ -70,7 +70,7 @@ When invoked with the directive (PR URL + slug + review ids), routes to [`../do/
|
|
|
70
70
|
| `autoE2ETest` | Stage 6 — run E2E every cycle (default `always`), or fold into pre-flight |
|
|
71
71
|
| `autoResolveConflicts` | On rebase conflict — `always` resolves autonomously behind a verify-or-rollback gate, `never` aborts + escalates; resolve from the configured preference (don't assume a default) |
|
|
72
72
|
| `autoRouteBuildToMuggleDo` | Front-door guardrail — route build/implement/fix requests through this pipeline (build delegated to superpowers); fired by the UserPromptSubmit guardrail, default `ask` |
|
|
73
|
-
| `autoInstallCiWorkflow` | Stage 7 — add the `muggle-walkthrough` CI check to a GitHub repo that lacks it, shipped in the PR; `ask` folds into pre-flight, default `ask` |
|
|
73
|
+
| `autoInstallCiWorkflow` | Stage 7 — add the `muggle-walkthrough` CI check to a GitHub repo that lacks it, shipped in the PR; `ask` folds into pre-flight, default `ask`. An unedited copy from an earlier release is refreshed unless `never` |
|
|
74
74
|
|
|
75
75
|
`autoUseWorktree`, `autoRebase`, `autoResolveConflicts`, `autoCreatePR`, `autoCleanup`, `postPRVisualWalkthrough` fire from per-stage files.
|
|
76
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `autoInstallCiWorkflow`
|
|
2
2
|
|
|
3
|
-
Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the workflow already exists
|
|
3
|
+
Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the repository is not on GitHub. Where the workflow already exists only `never` counts: any other value lets `muggle ci-install` replace an unedited copy an earlier release wrote, without asking, and an edited copy is never touched. Substitute `{repo}`.
|
|
4
4
|
|
|
5
5
|
**Picker 1** — header `CI check`, question `"Add the Muggle E2E check to {repo}'s CI? Pull requests then fail while their walkthrough is missing or reports a failed test."`
|
|
6
6
|
- `Add it` — `Run muggle ci-install and ship the workflow with this change.` → `always`
|