@mutmutco/cli 4.5.79 → 4.5.81
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 +48 -33
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -17249,10 +17249,10 @@ var rollout_plan_default = {
|
|
|
17249
17249
|
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)."
|
|
17250
17250
|
},
|
|
17251
17251
|
baseline: {
|
|
17252
|
-
version: "4.5.
|
|
17253
|
-
tag: "v4.5.
|
|
17254
|
-
commit: "
|
|
17255
|
-
npm: "@mutmutco/cli@4.5.
|
|
17252
|
+
version: "4.5.81",
|
|
17253
|
+
tag: "v4.5.81",
|
|
17254
|
+
commit: "0c3a49536686",
|
|
17255
|
+
npm: "@mutmutco/cli@4.5.81"
|
|
17256
17256
|
},
|
|
17257
17257
|
exitCriterion: "fleet-n-of-n",
|
|
17258
17258
|
hubOnlyShortcut: "forbidden",
|
|
@@ -17269,14 +17269,14 @@ var rollout_plan_default = {
|
|
|
17269
17269
|
repo: "mutmutco/mmi-hub",
|
|
17270
17270
|
role: "canary",
|
|
17271
17271
|
schedule: "train",
|
|
17272
|
-
v3Target: "v4.5.
|
|
17272
|
+
v3Target: "v4.5.81"
|
|
17273
17273
|
}
|
|
17274
17274
|
],
|
|
17275
17275
|
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.",
|
|
17276
17276
|
rollback: {
|
|
17277
17277
|
independent: true,
|
|
17278
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
17279
|
-
v3Target: "v4.5.
|
|
17278
|
+
mechanism: "npm dist-tag latest -> 4.5.81 and redeploy the Hub Lambda from tag v4.5.81 (0c3a49536686); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
17279
|
+
v3Target: "v4.5.81 (@mutmutco/cli@4.5.81, tag commit 0c3a49536686 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
17280
17280
|
}
|
|
17281
17281
|
},
|
|
17282
17282
|
{
|
|
@@ -39718,42 +39718,57 @@ async function openSuitePinPr(deps, input) {
|
|
|
39718
39718
|
const url = new URL(old);
|
|
39719
39719
|
url.searchParams.set("v", tag);
|
|
39720
39720
|
const pin = url.toString();
|
|
39721
|
-
const branch = `suite-pin/${stage}-${member.id}
|
|
39721
|
+
const branch = `suite-pin/${stage}-${member.id}`;
|
|
39722
|
+
const legacy = `${branch}-${tag}`;
|
|
39723
|
+
const title = `Pin ${member.id} ${stage} at ${tag}`;
|
|
39724
|
+
const tagOf = (t) => t.startsWith(`Pin ${member.id} ${stage} at `) ? t.slice(`Pin ${member.id} ${stage} at `.length) : void 0;
|
|
39725
|
+
const list = async (head) => JSON.parse(await deps.run("gh", ["pr", "list", "--repo", SUITE_REPO, "--head", head, "--state", "all", "--json", "url,state,title"], scratch || void 0));
|
|
39726
|
+
const onBranch = await list(branch);
|
|
39727
|
+
const legacyOpen = JSON.parse(await deps.run("gh", ["pr", "list", "--repo", SUITE_REPO, "--state", "open", "--limit", "200", "--json", "url,headRefName"])).flatMap((p) => {
|
|
39728
|
+
const t = p.headRefName.startsWith(`${branch}-v`) ? p.headRefName.slice(branch.length + 1) : void 0;
|
|
39729
|
+
return t ? [{ url: p.url, tag: t }] : [];
|
|
39730
|
+
});
|
|
39731
|
+
const newer = [
|
|
39732
|
+
...onBranch.filter((p) => p.state !== "CLOSED").flatMap((p) => {
|
|
39733
|
+
const t = tagOf(p.title ?? "");
|
|
39734
|
+
return t && compareVersions(t, tag) > 0 ? [p] : [];
|
|
39735
|
+
}),
|
|
39736
|
+
...legacyOpen.filter((p) => compareVersions(p.tag, tag) > 0).map((p) => ({ url: p.url, state: "OPEN" }))
|
|
39737
|
+
];
|
|
39738
|
+
const exact = [...onBranch.filter((p) => tagOf(p.title ?? "") === tag), ...await list(legacy)];
|
|
39739
|
+
if (exact.some((p) => p.state === "CLOSED")) {
|
|
39740
|
+
if (newer.length) return { status: "superseded", pr: newer[0].url, url: pin };
|
|
39741
|
+
throw new Error(`${branch} for ${tag} was closed without landing`);
|
|
39742
|
+
}
|
|
39743
|
+
if (exact.some((p) => p.state === "MERGED")) {
|
|
39744
|
+
if (old !== pin) throw new Error(`${branch} merged but development still carries ${old}`);
|
|
39745
|
+
return { status: "merged", pr: exact[0].url, url: pin };
|
|
39746
|
+
}
|
|
39747
|
+
if (old === pin) return { status: "merged", pr: exact[0]?.url ?? `${SUITE_REPO} development already pinned`, url: pin };
|
|
39748
|
+
if (newer.length) return { status: "superseded", pr: newer[0].url, url: pin };
|
|
39749
|
+
const open2 = onBranch.find((p) => p.state === "OPEN");
|
|
39750
|
+
if (open2 && tagOf(open2.title ?? "") === tag) return { status: "pending", pr: open2.url, url: pin };
|
|
39722
39751
|
await (0, import_promises6.mkdir)((0, import_node_path34.join)(deps.root, "tmp"), { recursive: true });
|
|
39723
39752
|
scratch = await (0, import_promises6.mkdtemp)((0, import_node_path34.join)(deps.root, "tmp", "suite-pin-"));
|
|
39724
39753
|
const run = (file, args) => deps.run(file, args, scratch);
|
|
39725
39754
|
await run("git", ["clone", "--quiet", "--branch", "development", "--single-branch", `https://github.com/${SUITE_REPO}.git`, "."]);
|
|
39726
|
-
const existing = JSON.parse(await run("gh", ["pr", "list", "--repo", SUITE_REPO, "--head", branch, "--state", "all", "--json", "url,state"]));
|
|
39727
|
-
if (existing.some((pr2) => pr2.state === "CLOSED")) throw new Error(`${branch} was closed without landing`);
|
|
39728
|
-
if (existing.some((pr2) => pr2.state === "MERGED")) {
|
|
39729
|
-
if (old !== pin) throw new Error(`${branch} merged but development still carries ${old}`);
|
|
39730
|
-
return { status: "merged", pr: existing[0].url, url: pin };
|
|
39731
|
-
}
|
|
39732
|
-
if (old === pin) return { status: "merged", pr: existing[0]?.url ?? `${SUITE_REPO} development already pinned`, url: pin };
|
|
39733
|
-
if (existing.length) {
|
|
39734
|
-
return { status: "pending", pr: existing[0].url, url: pin };
|
|
39735
|
-
}
|
|
39736
39755
|
await run("git", ["switch", "-c", branch]);
|
|
39737
39756
|
await run("node", ["scripts/pin-modules.mjs", "--stage", stage, "--module", member.id, "--url", pin]);
|
|
39738
39757
|
await run("git", ["add", "seed/modules.json"]);
|
|
39739
39758
|
await run("git", ["commit", "-m", `Pin ${member.id} ${stage} at ${tag} (#7266)`]);
|
|
39740
|
-
await run("git", ["push", "origin", branch]);
|
|
39741
|
-
const
|
|
39742
|
-
|
|
39743
|
-
|
|
39744
|
-
|
|
39745
|
-
SUITE_REPO,
|
|
39746
|
-
|
|
39747
|
-
"development",
|
|
39748
|
-
|
|
39749
|
-
branch,
|
|
39750
|
-
"--title",
|
|
39751
|
-
`Pin ${member.id} ${stage} at ${tag}`,
|
|
39752
|
-
"--body",
|
|
39753
|
-
`Solo ${repo} release ${tag} (#7266). Pin ${stage} to the released bundle.`
|
|
39754
|
-
])).trim();
|
|
39759
|
+
await run("git", ["push", "--force", "origin", branch]);
|
|
39760
|
+
const body = `Solo ${repo} release ${tag} (#7266, #7714). Pin ${stage} to the released bundle.`;
|
|
39761
|
+
let pr;
|
|
39762
|
+
if (open2) {
|
|
39763
|
+
pr = open2.url;
|
|
39764
|
+
await run("gh", ["pr", "edit", pr, "--repo", SUITE_REPO, "--title", title, "--body", body]);
|
|
39765
|
+
} else {
|
|
39766
|
+
pr = (await run("gh", ["pr", "create", "--repo", SUITE_REPO, "--base", "development", "--head", branch, "--title", title, "--body", body])).trim();
|
|
39767
|
+
}
|
|
39755
39768
|
if (!pr.includes("/pull/")) throw new Error(`gh pr create returned no PR URL: ${pr}`);
|
|
39756
39769
|
await run("gh", ["pr", "merge", pr, "--repo", SUITE_REPO, "--auto", "--squash"]);
|
|
39770
|
+
for (const old2 of legacyOpen.filter((p) => compareVersions(p.tag, tag) < 0))
|
|
39771
|
+
await run("gh", ["pr", "close", old2.url, "--repo", SUITE_REPO, "--comment", `Superseded by ${pr} (${member.id} ${stage} at ${tag}).`]);
|
|
39757
39772
|
return { status: "pending", pr, url: pin };
|
|
39758
39773
|
} catch (e) {
|
|
39759
39774
|
throw new Error(`suite pin PR FAILED for ${repo} ${tag}: ${e.message}; remedy: ${remedy}`);
|
package/package.json
CHANGED