@mutmutco/cli 4.6.15 → 4.6.16

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 (2) hide show
  1. package/dist/main.cjs +51 -11
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -25523,6 +25523,7 @@ __export(gate_budget_exports, {
25523
25523
  BLESSED_JEV_FAILURES_SHA: () => BLESSED_JEV_FAILURES_SHA,
25524
25524
  BLESSED_KIT_AGENT_FILES_SHA: () => BLESSED_KIT_AGENT_FILES_SHA,
25525
25525
  BLESSED_RUNBOOK_GUARD_SHA: () => BLESSED_RUNBOOK_GUARD_SHA,
25526
+ BLESSED_RUNNER_CHECK_POLICY_SHA: () => BLESSED_RUNNER_CHECK_POLICY_SHA,
25526
25527
  BLESSED_RUNNER_CHOICE_SHA: () => BLESSED_RUNNER_CHOICE_SHA,
25527
25528
  BLESSED_RUNNER_GATE_SHA: () => BLESSED_RUNNER_GATE_SHA,
25528
25529
  BLESSED_RUN_WITH_BUDGET_SHA: () => BLESSED_RUN_WITH_BUDGET_SHA,
@@ -25533,6 +25534,7 @@ __export(gate_budget_exports, {
25533
25534
  });
25534
25535
  var BLESSED_RUN_WITH_BUDGET_SHA = "cb31a94c89729beac83500ad4d301132dcfe2e4c";
25535
25536
  var BLESSED_RUNNER_GATE_SHA = "a19e9392e5ad9b0675f02e4304d68dd933fad60f";
25537
+ var BLESSED_RUNNER_CHECK_POLICY_SHA = "67bb2012710a96d21be825c29a5d5c2b4b8001e2";
25536
25538
  var BLESSED_KIT_AGENT_FILES_SHA = "e976df208d891b215844386c1cac0f161946b6fa";
25537
25539
  var BLESSED_JEV_FAILURES_SHA = "d5278c6133318b33727483ddfdfddc8f841e3ef6";
25538
25540
  var BLESSED_VERDICT_RECEIPT_SHA = "";
@@ -25912,6 +25914,11 @@ function gateSeedVars(cls, releaseTrack, runtime = "node", requiredCheckBranches
25912
25914
  // The pin is the CLI's blessed SHA, not an operator knob — one central place to bump (#3178).
25913
25915
  GATE_BUDGET_SHA: BLESSED_RUN_WITH_BUDGET_SHA,
25914
25916
  GATE_RUNNER_SHA: BLESSED_RUNNER_GATE_SHA,
25917
+ GATE_CHECK_POLICY_SHA: BLESSED_RUNNER_CHECK_POLICY_SHA,
25918
+ // No shared threshold: only a caller's matched complete-check experiment may enable concurrency.
25919
+ GATE_CHECK_PARALLEL_MIN_FREE_MB: "0",
25920
+ GATE_CHECK_POLICY_STEP_YAML: "",
25921
+ GATE_CHECK_POLICY_ENV_YAML: "",
25915
25922
  // #9161: the suite-only kit-file drift action arrived after the shared runner pin, so it carries its own
25916
25923
  // blessed revision — bumping GATE_RUNNER_SHA for it would move every generic repo's toolchain too.
25917
25924
  KIT_AGENT_FILES_SHA: BLESSED_KIT_AGENT_FILES_SHA,
@@ -25979,6 +25986,7 @@ function withDerivedRepoVars(vars, parsed, cls, releaseTrack, requiredCheckBranc
25979
25986
  for (const [key, value] of Object.entries(gateSeedVars(cls, track, runtime, requiredCheckBranches, requiredChecks))) {
25980
25987
  out[key] ??= value;
25981
25988
  }
25989
+ Object.assign(out, gateCheckPolicyYaml(out.GATE_CHECK_POLICY_SHA, out.GATE_CHECK_PARALLEL_MIN_FREE_MB, runtime));
25982
25990
  if (!out.GATE_AFFECTED_CMD.trim()) out.GATE_AFFECTED_CMD = out.GATE_CMD;
25983
25991
  return out;
25984
25992
  }
@@ -26147,6 +26155,26 @@ function gateJevStepsYaml(sha, runtime = "node") {
26147
26155
  GATE_JEV_REPORT_YAML: step("Report test outcomes to Jev", "always() && ", "outcomes")
26148
26156
  };
26149
26157
  }
26158
+ function gateCheckPolicyYaml(sha, minFreeMb, runtime) {
26159
+ if (runtime !== "node" || !/^[0-9a-f]{40}$/.test(sha) || !/^0*[1-9][0-9]*$/.test(minFreeMb)) {
26160
+ return { GATE_CHECK_POLICY_STEP_YAML: "", GATE_CHECK_POLICY_ENV_YAML: "" };
26161
+ }
26162
+ return {
26163
+ GATE_CHECK_POLICY_STEP_YAML: [
26164
+ "\n - name: Choose check scheduling",
26165
+ "\n id: check-policy",
26166
+ "\n if: ${{ steps.development-gate.outputs.reuse != 'true' }}",
26167
+ "\n continue-on-error: true",
26168
+ "\n timeout-minutes: 1",
26169
+ `
26170
+ uses: mutmutco/MMI-Hub/.github/actions/runner-check-policy@${sha}`,
26171
+ "\n with:",
26172
+ `
26173
+ min-free-mb: ${yamlScalar(minFreeMb)}`
26174
+ ].join(""),
26175
+ GATE_CHECK_POLICY_ENV_YAML: "\n RUN_CHECK_SERIAL: ${{ steps.check-policy.outputs.serial || '1' }}"
26176
+ };
26177
+ }
26150
26178
  function gateExtraStepsYaml(steps) {
26151
26179
  return steps.map((step) => [
26152
26180
  `
@@ -27186,7 +27214,16 @@ async function auditRepoCollaborators(repo, owners, deps, projectAdmins = /* @__
27186
27214
  }
27187
27215
  return findings;
27188
27216
  }
27189
- async function auditTrainBranch(repo, branch, owners, deps, projectAdmins = /* @__PURE__ */ new Set()) {
27217
+ async function directWriters(deps, repo) {
27218
+ const collabs = await restPagedJson(deps, `repos/${repo}/collaborators?affiliation=direct`, []);
27219
+ const writers = /* @__PURE__ */ new Set();
27220
+ for (const c of collabs) {
27221
+ const role = collaboratorRole(c);
27222
+ if (role !== null && POWERED_ROLES.has(role)) writers.add(c.login.toLowerCase());
27223
+ }
27224
+ return writers;
27225
+ }
27226
+ async function auditTrainBranch(repo, branch, owners, deps, projectAdmins = /* @__PURE__ */ new Set(), writers = /* @__PURE__ */ new Set()) {
27190
27227
  let restrictions = null;
27191
27228
  try {
27192
27229
  restrictions = await deps.client.rest("GET", `repos/${repo}/branches/${branch}/protection/restrictions`) ?? null;
@@ -27221,15 +27258,16 @@ async function auditTrainBranch(repo, branch, owners, deps, projectAdmins = /* @
27221
27258
  }
27222
27259
  const findings = [];
27223
27260
  const users = (restrictions.users ?? []).map((u) => u.login);
27261
+ const listed = (logins, login) => [...logins].some((entry) => entry.toLowerCase() === login.toLowerCase());
27224
27262
  for (const login of users) {
27225
- if (!owners.has(login) && !projectAdmins.has(login)) {
27263
+ if (!listed(owners, login) && !listed(projectAdmins, login) && !listed(writers, login)) {
27226
27264
  findings.push({
27227
27265
  repo,
27228
27266
  branch,
27229
27267
  kind: "train-allowlist-extra",
27230
27268
  severity: "medium",
27231
27269
  actor: login,
27232
- detail: `@${login} is on the ${branch} push allowlist \u2014 legitimate only if an intended full-write project-admin; confirm`,
27270
+ detail: `@${login} is on the ${branch} push allowlist \u2014 legitimate only if an intended full-write member (project-admin or direct repo writer); confirm`,
27233
27271
  remediation: `# if NOT an intended full-write member: gh api -X DELETE repos/${repo}/branches/${branch}/protection/restrictions/users -f users[]="${login}"`
27234
27272
  });
27235
27273
  }
@@ -27296,8 +27334,9 @@ async function auditRepoAccess(repo, repoClass, owners, deps, projectAdmins = /*
27296
27334
  findings.push(...await auditRepoCollaborators(repo, owners, deps, projectAdmins, sanctionedAdmins));
27297
27335
  if (dataAccess) findings.push(...auditDataAccessContracts(repo, dataAccess));
27298
27336
  const track = releaseTrack ?? (repoClass === "content" ? "trunk" : void 0);
27337
+ const writers = repo.toLowerCase() === PLUGIN_READ_REPO2.toLowerCase() ? /* @__PURE__ */ new Set() : await directWriters(deps, repo);
27299
27338
  for (const branch of lockedBranches(repoClass, track)) {
27300
- findings.push(...await auditTrainBranch(repo, branch, owners, deps, projectAdmins));
27339
+ findings.push(...await auditTrainBranch(repo, branch, owners, deps, projectAdmins, writers));
27301
27340
  }
27302
27341
  return { repo, class: repoClass, releaseTrack: track, ok: !findings.some((f) => f.severity === "high"), findings };
27303
27342
  }
@@ -27766,10 +27805,10 @@ var rollout_plan_default = {
27766
27805
  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)."
27767
27806
  },
27768
27807
  baseline: {
27769
- version: "4.6.15",
27770
- tag: "v4.6.15",
27771
- commit: "ad44168c2ed4",
27772
- npm: "@mutmutco/cli@4.6.15"
27808
+ version: "4.6.16",
27809
+ tag: "v4.6.16",
27810
+ commit: "4bd6f2423939",
27811
+ npm: "@mutmutco/cli@4.6.16"
27773
27812
  },
27774
27813
  exitCriterion: "fleet-n-of-n",
27775
27814
  hubOnlyShortcut: "forbidden",
@@ -27786,14 +27825,14 @@ var rollout_plan_default = {
27786
27825
  repo: "mutmutco/mmi-hub",
27787
27826
  role: "canary",
27788
27827
  schedule: "train",
27789
- v3Target: "v4.6.15"
27828
+ v3Target: "v4.6.16"
27790
27829
  }
27791
27830
  ],
27792
27831
  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.",
27793
27832
  rollback: {
27794
27833
  independent: true,
27795
- mechanism: "npm dist-tag latest -> 4.6.15 and redeploy the Hub Lambda from tag v4.6.15 (ad44168c2ed4); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
27796
- v3Target: "v4.6.15 (@mutmutco/cli@4.6.15, tag commit ad44168c2ed4 \u2014 last known-good release carrying the repo-index v4-only contract)"
27834
+ mechanism: "npm dist-tag latest -> 4.6.16 and redeploy the Hub Lambda from tag v4.6.16 (4bd6f2423939); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
27835
+ v3Target: "v4.6.16 (@mutmutco/cli@4.6.16, tag commit 4bd6f2423939 \u2014 last known-good release carrying the repo-index v4-only contract)"
27797
27836
  }
27798
27837
  },
27799
27838
  {
@@ -68336,6 +68375,7 @@ function registerSchedulesCommands(program3) {
68336
68375
  var company_emails_default = {
68337
68376
  _comment: "Org-level, NON-secret GitHub login -> company email map (#7678). `mmi-cli oracle org access sync <repo>` maps a repo's current developer/admin collaborators through it to rebuild the stage allowlist a project opts into with the registry field `stageAllowlist` (e.g. MM-Work's MMW_STAGE_ALLOWLIST). Bundled into mmi-cli at build time (cli/src/stage-allowlist.ts) \u2014 one source of truth, edited here in a PR. Keys are lowercase GitHub logins; a collaborator missing here is reported loudly by the sync, never silently dropped.",
68338
68377
  emails: {
68378
+ guzelt: "guzel@mutatismutandis.co",
68339
68379
  jervaise: "suphi@mutatismutandis.co",
68340
68380
  sezenlerinadil: "adil@mutatismutandis.co"
68341
68381
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.6.15",
3
+ "version": "4.6.16",
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",