@mutmutco/cli 4.5.233 → 4.5.235

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/dist/main.cjs CHANGED
@@ -25116,6 +25116,7 @@ function createDocsIndexDeps(repoRoot2) {
25116
25116
  var BLESSED_RUN_WITH_BUDGET_SHA = "5ce541add569e54e7ca96de67a768577d3d604e4";
25117
25117
  var BLESSED_RUNNER_GATE_SHA = "a19e9392e5ad9b0675f02e4304d68dd933fad60f";
25118
25118
  var BLESSED_KIT_AGENT_FILES_SHA = "a8b273ed418e703c0aa501a53ea87228ba28b1f0";
25119
+ var BLESSED_JEV_FAILURES_SHA = "0e5b55b9fd45bdf55f791c1f56dafeb42c9fb88c";
25119
25120
  var BLESSED_RUNBOOK_GUARD_SHA = "e661e0aedc0e58b73c738bf6cdfeac65e5914584";
25120
25121
  var REMOTE_USE = /^mutmutco\/MMI-Hub\/\.github\/actions\/run-with-budget@(\S+)$/;
25121
25122
  var LOCAL_USE = "./.github/actions/run-with-budget";
@@ -25498,7 +25499,9 @@ function gateSeedVars(cls, releaseTrack, runtime = "node", requiredCheckBranches
25498
25499
  GATE_RUNBOOK_SHA: BLESSED_RUNBOOK_GUARD_SHA,
25499
25500
  // #7407: repo-declared service containers and extra check steps; empty renders today's gate byte-for-byte.
25500
25501
  GATE_SERVICES_YAML: "",
25501
- GATE_EXTRA_STEPS_YAML: ""
25502
+ GATE_EXTRA_STEPS_YAML: "",
25503
+ // #9293: Jev failure-memory fetch/report steps from the blessed jev-failures pin (an empty pin renders none).
25504
+ ...gateJevStepsYaml(BLESSED_JEV_FAILURES_SHA, runtime)
25502
25505
  };
25503
25506
  const track = releaseTrack ?? (cls === "content" ? "trunk" : "full");
25504
25507
  const trackBranches = track === "trunk" ? ["main"] : track === "single" ? ["development"] : track === "direct" ? ["development", "main"] : ["development", "rc", "main"];
@@ -25647,6 +25650,29 @@ function gateServicesYaml(services) {
25647
25650
  }
25648
25651
  return out;
25649
25652
  }
25653
+ function gateJevStepsYaml(sha, runtime = "node") {
25654
+ if (!/^[0-9a-f]{40}$/.test(sha)) return { GATE_JEV_FETCH_YAML: "", GATE_JEV_REPORT_YAML: "" };
25655
+ const step = (name, cond, mode) => [
25656
+ `
25657
+ - name: ${name}`,
25658
+ `
25659
+ if: \${{ ${cond}steps.development-gate.outputs.reuse != 'true' }}`,
25660
+ "\n continue-on-error: true",
25661
+ "\n timeout-minutes: 1",
25662
+ `
25663
+ uses: mutmutco/MMI-Hub/.github/actions/jev-failures@${sha}`,
25664
+ "\n with:",
25665
+ `
25666
+ mode: ${mode}`,
25667
+ mode === "report" ? `
25668
+ report-format: ${runtime === "python" ? "junit-xml" : "vitest-json"}` : "",
25669
+ "\n token: ${{ github.token }}"
25670
+ ].join("");
25671
+ return {
25672
+ GATE_JEV_FETCH_YAML: step("Fetch Jev recent failures (empty on any fault)", "", "fetch"),
25673
+ GATE_JEV_REPORT_YAML: step("Report failing test files to Jev", "failure() && ", "report")
25674
+ };
25675
+ }
25650
25676
  function gateExtraStepsYaml(steps) {
25651
25677
  return steps.map((step) => [
25652
25678
  `
@@ -27242,10 +27268,10 @@ var rollout_plan_default = {
27242
27268
  note: "The v4.0.0 stamp happens at cut time (D6e #4463); until then the candidate is the origin/development head artifacts (built cli/dist + npm pack), identity proven by dist content hash (D6a)."
27243
27269
  },
27244
27270
  baseline: {
27245
- version: "4.5.233",
27246
- tag: "v4.5.233",
27247
- commit: "5abbe7fd4238",
27248
- npm: "@mutmutco/cli@4.5.233"
27271
+ version: "4.5.235",
27272
+ tag: "v4.5.235",
27273
+ commit: "c92194a19184",
27274
+ npm: "@mutmutco/cli@4.5.235"
27249
27275
  },
27250
27276
  exitCriterion: "fleet-n-of-n",
27251
27277
  hubOnlyShortcut: "forbidden",
@@ -27262,14 +27288,14 @@ var rollout_plan_default = {
27262
27288
  repo: "mutmutco/mmi-hub",
27263
27289
  role: "canary",
27264
27290
  schedule: "train",
27265
- v3Target: "v4.5.233"
27291
+ v3Target: "v4.5.235"
27266
27292
  }
27267
27293
  ],
27268
27294
  rollbackTrigger: "Any red inside the post-contract soak window: `devops train gate` FAIL attributable to the v4 doors, Hub endpoint health probe failure, a pre-v4 client admitted instead of receiving actionable HTTP 426, or npm consumer install/doctor failure on the v4-only dist.",
27269
27295
  rollback: {
27270
27296
  independent: true,
27271
- mechanism: "npm dist-tag latest -> 4.5.233 and redeploy the Hub Lambda from tag v4.5.233 (5abbe7fd4238); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
27272
- v3Target: "v4.5.233 (@mutmutco/cli@4.5.233, tag commit 5abbe7fd4238 \u2014 last known-good release carrying the repo-index v4-only contract)"
27297
+ mechanism: "npm dist-tag latest -> 4.5.235 and redeploy the Hub Lambda from tag v4.5.235 (c92194a19184); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
27298
+ v3Target: "v4.5.235 (@mutmutco/cli@4.5.235, tag commit c92194a19184 \u2014 last known-good release carrying the repo-index v4-only contract)"
27273
27299
  }
27274
27300
  },
27275
27301
  {
@@ -38291,6 +38317,7 @@ function registryRepoKey(repo) {
38291
38317
  }
38292
38318
 
38293
38319
  // src/ci-audit.ts
38320
+ var import_yaml2 = __toESM(require_dist(), 1);
38294
38321
  var HUB_REPO4 = "mutmutco/MMI-Hub";
38295
38322
  var HUB_GATE_CONTEXTS = ["cli", "infra", "docs"];
38296
38323
  var PRODUCT_GATE_PATH = ".github/workflows/gate.yml";
@@ -38357,6 +38384,85 @@ function auditRunnerFallbacks(repo, files, closure) {
38357
38384
  remediation: f.cost === "hosted" || f.cost === "unknown" ? "Resolve source reads and unsupported selectors/callees; preserve checks and artifacts. See gh-runner-runbook.md." : void 0
38358
38385
  }));
38359
38386
  }
38387
+ var LIVE_SELF_HOSTED_LINUX_LABELS = /* @__PURE__ */ new Set([
38388
+ "self-hosted",
38389
+ "linux",
38390
+ "x64",
38391
+ "mmi-live",
38392
+ "mmi-heavy",
38393
+ "mmi-bare-metal",
38394
+ "mmi-journeys",
38395
+ "mmi-deploy",
38396
+ "mmi-browser"
38397
+ ]);
38398
+ var NON_LINUX_RUNNER_LABEL = /^(?:macos|windows|arm64)$/i;
38399
+ var NODE_SETUP_USE = /(?:^|\/)(?:actions\/setup-node|runner-node-toolchain)(?:@|$)/;
38400
+ var RUNS_NODE = /(?:^|[\s;&|(`])(?:node|npm|npx)(?=\s|$)/m;
38401
+ var plainRecord = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
38402
+ function runsOnLabelSets(job) {
38403
+ const toSet = (value) => typeof value === "string" ? [value] : Array.isArray(value) && value.every((l) => typeof l === "string") ? value : void 0;
38404
+ let selector = job["runs-on"];
38405
+ if (plainRecord(selector)) selector = selector.labels;
38406
+ if (typeof selector !== "string" || !selector.includes("${{")) return [toSet(selector)].filter((s) => Boolean(s));
38407
+ const sets = [];
38408
+ for (const m of selector.matchAll(/fromJSON\('([^']+)'\)/g)) {
38409
+ try {
38410
+ const parsed = toSet(JSON.parse(m[1]));
38411
+ if (parsed) sets.push(parsed);
38412
+ } catch {
38413
+ }
38414
+ }
38415
+ const axis = /^\$\{\{\s*matrix\.([\w-]+)\s*\}\}$/.exec(selector.trim())?.[1];
38416
+ const matrix = plainRecord(job.strategy) && plainRecord(job.strategy.matrix) ? job.strategy.matrix : void 0;
38417
+ if (axis && matrix && Array.isArray(matrix[axis])) for (const value of matrix[axis]) {
38418
+ const s = toSet(value);
38419
+ if (s) sets.push(s);
38420
+ }
38421
+ return sets;
38422
+ }
38423
+ function auditSelfHostedRunnerHygiene(files) {
38424
+ const checks = [];
38425
+ for (const { path: path2, body } of files) {
38426
+ let doc;
38427
+ try {
38428
+ doc = (0, import_yaml2.parse)(body);
38429
+ } catch {
38430
+ continue;
38431
+ }
38432
+ const jobs = plainRecord(doc) && plainRecord(doc.jobs) ? doc.jobs : {};
38433
+ for (const [id, job] of Object.entries(jobs)) {
38434
+ if (!plainRecord(job)) continue;
38435
+ const linuxSets = runsOnLabelSets(job).filter((set) => set.some((l) => l.toLowerCase() === "self-hosted") && !set.some((l) => NON_LINUX_RUNNER_LABEL.test(l)));
38436
+ if (!linuxSets.length) continue;
38437
+ const stale = [...new Set(linuxSets.flat().filter((l) => !LIVE_SELF_HOSTED_LINUX_LABELS.has(l.toLowerCase())))];
38438
+ if (stale.length) {
38439
+ checks.push({
38440
+ ok: false,
38441
+ label: `self-hosted job requests only live runner labels (#9293): ${path2}:${id}`,
38442
+ detail: stale.map((l) => /^mmi-runner/i.test(l) ? `'${l}' is a host pin \u2014 route by class label, never hostname` : `'${l}' is carried by no live lane`).join("; "),
38443
+ remediation: `Use ubuntu-latest, or a live class tuple such as [self-hosted, linux, x64, mmi-live]. Live labels: ${[...LIVE_SELF_HOSTED_LINUX_LABELS].join(", ")} (gh-runner-runbook.md \xA7 Lane classes).`
38444
+ });
38445
+ }
38446
+ if (job.container !== void 0 || !Array.isArray(job.steps)) continue;
38447
+ for (const [index, step] of job.steps.entries()) {
38448
+ if (!plainRecord(step)) continue;
38449
+ const uses = typeof step.uses === "string" ? step.uses : "";
38450
+ if (NODE_SETUP_USE.test(uses)) break;
38451
+ const command = typeof step.run === "string" ? step.run : uses.includes("run-with-budget") && plainRecord(step.with) && typeof step.with.command === "string" ? step.with.command : "";
38452
+ if (!RUNS_NODE.test(command)) continue;
38453
+ checks.push({
38454
+ ok: true,
38455
+ severity: "warn",
38456
+ label: `self-hosted job sets up node before running it (#9293): ${path2}:${id}`,
38457
+ detail: `step ${index + 1}${typeof step.name === "string" ? ` ('${step.name}')` : ""} runs node/npm/npx before any actions/setup-node or runner-node-toolchain step \u2014 it gets whatever node the lane's PATH has`,
38458
+ remediation: "Add mutmutco/MMI-Hub/.github/actions/runner-node-toolchain (or actions/setup-node) before the first node command, or run the job on ubuntu-latest."
38459
+ });
38460
+ break;
38461
+ }
38462
+ }
38463
+ }
38464
+ return checks;
38465
+ }
38360
38466
  var PENDING_LANDING_LABEL = "pending PRs landing (#8783)";
38361
38467
  var PENDING_LANDING_LIST_CAP = 50;
38362
38468
  var PENDING_LANDING_STALL_MS = 15 * 60 * 1e3;
@@ -39150,6 +39256,7 @@ async function auditRepoCi(repo, callerDeps) {
39150
39256
  } catch (e) {
39151
39257
  checks.push({ ok: false, label: "runner workflow source is readable (#8958)", detail: e instanceof WorkflowSourceError ? e.message : "workflow source: read-failed" });
39152
39258
  }
39259
+ checks.push(...auditSelfHostedRunnerHygiene(workflows));
39153
39260
  if (repoClass !== "hub") checks.push(...await auditSharedActionPins(workflows, deps));
39154
39261
  } else {
39155
39262
  checks.push({ ok: false, label: "runner workflow source is readable (#8958)", detail: "workflow source inventory unreadable" });
@@ -13168,6 +13168,7 @@ function registryRepoKey(repo) {
13168
13168
  }
13169
13169
 
13170
13170
  // src/ci-audit.ts
13171
+ var import_yaml2 = __toESM(require_dist(), 1);
13171
13172
  var HUB_REPO4 = "mutmutco/MMI-Hub";
13172
13173
  var DEV_STAGE_STALE_TOLERANCE_MS = 30 * 60 * 1e3;
13173
13174
  var PENDING_LANDING_STALL_MS = 15 * 60 * 1e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.233",
3
+ "version": "4.5.235",
4
4
  "description": "MMI Future CLI — the org dev toolbox and shared cross-IDE engine for every registry-declared MMI coding surface.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",