@mutmutco/codex-plugin 4.5.90 → 4.5.91

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmi",
3
- "version": "4.5.90",
3
+ "version": "4.5.91",
4
4
  "mmiCompat": "4.x",
5
5
  "description": "MMI workflow skills and org gates delivery.",
6
6
  "author": {
package/cli/dist/main.cjs CHANGED
@@ -5794,7 +5794,14 @@ function decidePrMergeCleanupGate(input) {
5794
5794
  message: `could not read the PR's state after the merge attempt${input.stateError ? `: ${input.stateError}` : ""} \u2014 cleanup skipped because the merge is unproven`
5795
5795
  };
5796
5796
  }
5797
- if (input.autoRequested) return { action: "enqueued" };
5797
+ if (input.autoRequested && state === "OPEN" && (input.autoMergeRequest ?? "").trim()) return { action: "enqueued" };
5798
+ if (input.autoRequested && state === "OPEN") {
5799
+ return {
5800
+ action: "refuse",
5801
+ reason: "not-merged",
5802
+ message: "the PR is OPEN and GitHub shows no queued auto-merge (or it could not be read) \u2014 the merge is neither done nor proven enqueued, so the branch and worktree were left untouched"
5803
+ };
5804
+ }
5798
5805
  return {
5799
5806
  action: "refuse",
5800
5807
  reason: "not-merged",
@@ -17245,10 +17252,10 @@ var rollout_plan_default = {
17245
17252
  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)."
17246
17253
  },
17247
17254
  baseline: {
17248
- version: "4.5.90",
17249
- tag: "v4.5.90",
17250
- commit: "f096038f4a17",
17251
- npm: "@mutmutco/cli@4.5.90"
17255
+ version: "4.5.91",
17256
+ tag: "v4.5.91",
17257
+ commit: "086f604f627d",
17258
+ npm: "@mutmutco/cli@4.5.91"
17252
17259
  },
17253
17260
  exitCriterion: "fleet-n-of-n",
17254
17261
  hubOnlyShortcut: "forbidden",
@@ -17265,14 +17272,14 @@ var rollout_plan_default = {
17265
17272
  repo: "mutmutco/mmi-hub",
17266
17273
  role: "canary",
17267
17274
  schedule: "train",
17268
- v3Target: "v4.5.90"
17275
+ v3Target: "v4.5.91"
17269
17276
  }
17270
17277
  ],
17271
17278
  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.",
17272
17279
  rollback: {
17273
17280
  independent: true,
17274
- mechanism: "npm dist-tag latest -> 4.5.90 and redeploy the Hub Lambda from tag v4.5.90 (f096038f4a17); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
17275
- v3Target: "v4.5.90 (@mutmutco/cli@4.5.90, tag commit f096038f4a17 \u2014 last known-good release carrying the repo-index v4-only contract)"
17281
+ mechanism: "npm dist-tag latest -> 4.5.91 and redeploy the Hub Lambda from tag v4.5.91 (086f604f627d); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
17282
+ v3Target: "v4.5.91 (@mutmutco/cli@4.5.91, tag commit 086f604f627d \u2014 last known-good release carrying the repo-index v4-only contract)"
17276
17283
  }
17277
17284
  },
17278
17285
  {
@@ -39561,6 +39568,11 @@ function basePolicyBlocksImmediateMerge(message2) {
39561
39568
  return /base branch policy prohibits|protected branch|required status check|merge queue/i.test(message2);
39562
39569
  }
39563
39570
  var PR_MERGE_ENQUEUED_EXIT_CODE = 2;
39571
+ function prMergeGateExitCode(gate, explicitAuto) {
39572
+ if (gate.action === "cleanup") return void 0;
39573
+ if (gate.action === "enqueued") return explicitAuto ? void 0 : PR_MERGE_ENQUEUED_EXIT_CODE;
39574
+ return 1;
39575
+ }
39564
39576
  function ghPrMergeLocalBranchDeleteWarning(message2) {
39565
39577
  return /used by worktree|cannot delete branch/i.test(message2);
39566
39578
  }
@@ -45758,19 +45770,23 @@ ${list}`);
45758
45770
  return snapshot.merged ? "MERGED" : snapshot.state.toUpperCase();
45759
45771
  })
45760
45772
  );
45773
+ const autoRequested = Boolean(o.auto || upgradedToAuto);
45774
+ const autoMergeRequest = autoRequested && stateRead.ok && stateRead.state.trim().toUpperCase() === "OPEN" ? (await execFileP("gh", ["pr", "view", number, ...repoArgs, "--json", "autoMergeRequest", "--jq", '.autoMergeRequest // ""'], { timeout: GC_GH_TIMEOUT_MS }).catch(() => ({ stdout: "" }))).stdout.trim() : void 0;
45761
45775
  const gate = decidePrMergeCleanupGate({
45762
45776
  state: stateRead.ok ? stateRead.state : void 0,
45763
45777
  stateError: stateRead.ok ? void 0 : stateRead.error,
45764
- autoRequested: Boolean(o.auto || upgradedToAuto)
45778
+ autoRequested,
45779
+ autoMergeRequest
45765
45780
  });
45781
+ const gateExitCode = prMergeGateExitCode(gate, Boolean(o.auto));
45766
45782
  if (gate.action === "enqueued") {
45767
45783
  const state = stateRead.ok ? stateRead.state : "";
45768
45784
  const enqueued = describePrMergeEnqueuedReason(await pollGhPrChecks(number, repoArgs).catch(() => void 0));
45769
45785
  console.log(JSON.stringify({ mergeStatus: "auto-merge-enqueued", enqueuedReason: enqueued.reason, pr: number, branch: headRef, state: state || "unknown", upgradedToAuto: upgradedToAuto || void 0 }));
45770
45786
  console.warn(`pr merge: PR #${number} is ENQUEUED, not merged \u2014 ${enqueued.message}.`);
45771
- if (upgradedToAuto && !o.auto) {
45772
- console.warn(`pr merge: exiting ${PR_MERGE_ENQUEUED_EXIT_CODE} so a chained command does not treat this as a completed merge.`);
45773
- process.exitCode = PR_MERGE_ENQUEUED_EXIT_CODE;
45787
+ if (gateExitCode !== void 0) {
45788
+ console.warn(`pr merge: exiting ${gateExitCode} so a chained command does not treat this as a completed merge.`);
45789
+ process.exitCode = gateExitCode;
45774
45790
  }
45775
45791
  return;
45776
45792
  }
@@ -45785,7 +45801,7 @@ ${list}`);
45785
45801
  ...branchUpdated ? { branchUpdated } : {}
45786
45802
  }));
45787
45803
  console.error(`pr merge: ${gate.message}. Nothing was deleted \u2014 re-check the PR and retry.`);
45788
- process.exitCode = 1;
45804
+ process.exitCode = gateExitCode;
45789
45805
  return;
45790
45806
  }
45791
45807
  const primaryRoot = beforeWorktrees[0]?.path ?? (startingPath || process.cwd());
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.90",
3
+ "version": "4.5.91",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/codex-plugin",
3
- "version": "4.5.90",
3
+ "version": "4.5.91",
4
4
  "description": "MMI workflow skills and org gates delivery.",
5
5
  "author": {
6
6
  "name": "MMI Future",