@mutmutco/cli 4.5.215 → 4.5.217

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 +36 -12
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -16148,6 +16148,32 @@ async function readRestPrSnapshotWithRetry(prNumber, repo, gh2 = defaultGhApi, o
16148
16148
  }
16149
16149
  }
16150
16150
  }
16151
+ var PR_LAND_PINNED_HEAD_READ_BUDGET_MS = 6e4;
16152
+ var PR_LAND_PINNED_HEAD_READ_404_ATTEMPTS = 3;
16153
+ async function readPrLandPinnedHeadSha(prNumber, repo, gh2 = defaultGhApi, options) {
16154
+ const delayMs = options?.delayMs ?? PR_SNAPSHOT_READ_DELAY_MS;
16155
+ const sleep2 = options?.sleep ?? ((ms) => new Promise((resolve7) => setTimeout(resolve7, ms)));
16156
+ let notFound = 0;
16157
+ for (; ; ) {
16158
+ const read = await readRestPrSnapshotWithRetry(prNumber, repo, gh2, {
16159
+ retryTransientUntilMs: Date.now() + PR_LAND_PINNED_HEAD_READ_BUDGET_MS,
16160
+ delayMs,
16161
+ sleep: sleep2,
16162
+ onTransientRetry: (error, attempt) => console.warn(`pr land: transient GitHub read (${error}) \u2014 retrying pinned-head read (attempt ${attempt}) within the ${PR_LAND_PINNED_HEAD_READ_BUDGET_MS / 1e3}s budget (#8957)`)
16163
+ });
16164
+ if (read.state === "ok") {
16165
+ const sha = read.snapshot.headSha;
16166
+ if (!sha) throw new Error(`pr land: could not read the head SHA of PR #${prNumber}`);
16167
+ return sha.toLowerCase();
16168
+ }
16169
+ notFound += 1;
16170
+ if (!/\b404\b/.test(read.error) || notFound >= PR_LAND_PINNED_HEAD_READ_404_ATTEMPTS) {
16171
+ throw new Error(`pr land: pinned-head read of PR #${prNumber} failed: ${read.error}`);
16172
+ }
16173
+ console.warn(`pr land: transient GitHub read (HTTP 404) \u2014 retrying pinned-head read (attempt ${notFound} of ${PR_LAND_PINNED_HEAD_READ_404_ATTEMPTS}) (#8957)`);
16174
+ await sleep2(delayMs);
16175
+ }
16176
+ }
16151
16177
  async function fetchRestClosingGuardPayload(prNumber, repo, gh2 = defaultGhApi) {
16152
16178
  const pr = JSON.parse(await gh2([`repos/${repo}/pulls/${prNumber}`]));
16153
16179
  const commits = await gh2([`repos/${repo}/pulls/${prNumber}/commits?per_page=100`]).then((out) => JSON.parse(out)).catch(() => void 0);
@@ -27030,10 +27056,10 @@ var rollout_plan_default = {
27030
27056
  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)."
27031
27057
  },
27032
27058
  baseline: {
27033
- version: "4.5.215",
27034
- tag: "v4.5.215",
27035
- commit: "9e1bef2d6b0c",
27036
- npm: "@mutmutco/cli@4.5.215"
27059
+ version: "4.5.217",
27060
+ tag: "v4.5.217",
27061
+ commit: "6888824b66e5",
27062
+ npm: "@mutmutco/cli@4.5.217"
27037
27063
  },
27038
27064
  exitCriterion: "fleet-n-of-n",
27039
27065
  hubOnlyShortcut: "forbidden",
@@ -27050,14 +27076,14 @@ var rollout_plan_default = {
27050
27076
  repo: "mutmutco/mmi-hub",
27051
27077
  role: "canary",
27052
27078
  schedule: "train",
27053
- v3Target: "v4.5.215"
27079
+ v3Target: "v4.5.217"
27054
27080
  }
27055
27081
  ],
27056
27082
  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.",
27057
27083
  rollback: {
27058
27084
  independent: true,
27059
- mechanism: "npm dist-tag latest -> 4.5.215 and redeploy the Hub Lambda from tag v4.5.215 (9e1bef2d6b0c); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
27060
- v3Target: "v4.5.215 (@mutmutco/cli@4.5.215, tag commit 9e1bef2d6b0c \u2014 last known-good release carrying the repo-index v4-only contract)"
27085
+ mechanism: "npm dist-tag latest -> 4.5.217 and redeploy the Hub Lambda from tag v4.5.217 (6888824b66e5); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
27086
+ v3Target: "v4.5.217 (@mutmutco/cli@4.5.217, tag commit 6888824b66e5 \u2014 last known-good release carrying the repo-index v4-only contract)"
27061
27087
  }
27062
27088
  },
27063
27089
  {
@@ -56665,11 +56691,9 @@ ${list}`);
56665
56691
  if (landClosingGuardVerdict.message) console.warn(landClosingGuardVerdict.message);
56666
56692
  let mergeQueueEnabled = false;
56667
56693
  const result = await runPrLand(number, { repo: o.repo, requireTrain: o.requireTrain !== false, enqueueOnly: o.enqueueOnly, queueTimeoutMs, expectHead: o.expectHead }, {
56668
- readHeadSha: async (prNumber, repo) => {
56669
- const sha = (await fetchRestPrSnapshot(prNumber, repo)).headSha;
56670
- if (!sha) throw new Error(`pr land: could not read the head SHA of PR #${prNumber}`);
56671
- return sha.toLowerCase();
56672
- },
56694
+ // #8957: the pinned-head read re-reads a PR this run already read successfully — survive its
56695
+ // transient GitHub faults (and a lone 404) caller-scoped instead of dying on one blip.
56696
+ readHeadSha: (prNumber, repo) => readPrLandPinnedHeadSha(prNumber, repo),
56673
56697
  pollDelayMs: (attempt) => prLandPollDelayMs(attempt, inFlight),
56674
56698
  hasMergeQueue: async (repo, base) => mergeQueueEnabled = await hasPrMergeQueue(repo, base),
56675
56699
  readMergeQueue: readPrMergeQueue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.215",
3
+ "version": "4.5.217",
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",