@mutmutco/cli 4.5.51 → 4.5.53
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 +43 -13
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -17043,10 +17043,10 @@ var rollout_plan_default = {
|
|
|
17043
17043
|
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)."
|
|
17044
17044
|
},
|
|
17045
17045
|
baseline: {
|
|
17046
|
-
version: "4.5.
|
|
17047
|
-
tag: "v4.5.
|
|
17048
|
-
commit: "
|
|
17049
|
-
npm: "@mutmutco/cli@4.5.
|
|
17046
|
+
version: "4.5.53",
|
|
17047
|
+
tag: "v4.5.53",
|
|
17048
|
+
commit: "f646601aa04c",
|
|
17049
|
+
npm: "@mutmutco/cli@4.5.53"
|
|
17050
17050
|
},
|
|
17051
17051
|
exitCriterion: "fleet-n-of-n",
|
|
17052
17052
|
hubOnlyShortcut: "forbidden",
|
|
@@ -17063,14 +17063,14 @@ var rollout_plan_default = {
|
|
|
17063
17063
|
repo: "mutmutco/mmi-hub",
|
|
17064
17064
|
role: "canary",
|
|
17065
17065
|
schedule: "train",
|
|
17066
|
-
v3Target: "v4.5.
|
|
17066
|
+
v3Target: "v4.5.53"
|
|
17067
17067
|
}
|
|
17068
17068
|
],
|
|
17069
17069
|
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.",
|
|
17070
17070
|
rollback: {
|
|
17071
17071
|
independent: true,
|
|
17072
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
17073
|
-
v3Target: "v4.5.
|
|
17072
|
+
mechanism: "npm dist-tag latest -> 4.5.53 and redeploy the Hub Lambda from tag v4.5.53 (f646601aa04c); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
17073
|
+
v3Target: "v4.5.53 (@mutmutco/cli@4.5.53, tag commit f646601aa04c \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
17074
17074
|
}
|
|
17075
17075
|
},
|
|
17076
17076
|
{
|
|
@@ -20675,9 +20675,10 @@ async function appendServedChannelLegs(deps, input, dispatch) {
|
|
|
20675
20675
|
const publishStatus = input.publish?.state === "complete" ? "success" : "failure";
|
|
20676
20676
|
const prepared = await (input.prepared ?? prepareServedChannel(deps, input));
|
|
20677
20677
|
if (!isHubControlRepo(input.repo)) {
|
|
20678
|
+
const bundleOnly = validSuiteCutContext(input.repo, deps.suiteCut) && input.repo.split("/")[1]?.toLowerCase() !== "mmi-katip";
|
|
20678
20679
|
const [home2, proof2] = await Promise.all([
|
|
20679
20680
|
appendInstallHomePublish(deps, { repo: input.repo, installer: input.installer, publishStatus, watch: input.watch }, dispatch),
|
|
20680
|
-
appendServedChannelProof(deps, { repo: input.repo, tag: input.tag, shipped: shipLegsGreen(input.deploy, input.publish), installer: input.installer }, dispatch)
|
|
20681
|
+
bundleOnly && servedChannelFor(input.repo, input.installer) ? Promise.resolve({ ...dispatch, note: `${dispatch.note}; served channel not probed: a suite bundle-only release does not deploy the backend that serves it (#7468)` }) : appendServedChannelProof(deps, { repo: input.repo, tag: input.tag, shipped: shipLegsGreen(input.deploy, input.publish), installer: input.installer }, dispatch)
|
|
20681
20682
|
]);
|
|
20682
20683
|
return mergeServedLegs(dispatch, home2, proof2);
|
|
20683
20684
|
}
|
|
@@ -35266,8 +35267,12 @@ async function suiteRelease(deps, ownerGo) {
|
|
|
35266
35267
|
continue;
|
|
35267
35268
|
}
|
|
35268
35269
|
const [sha, live, rcHead] = await Promise.all([deps.tagSha(member.repo, member.tag), deps.backend({ repo: member.repo, id: member.id, bundles: {} }), deps.head(member.repo, "rc")]);
|
|
35269
|
-
if (!
|
|
35270
|
-
|
|
35270
|
+
if (!member.released && !member.releasedAs && rcHead?.toLowerCase() !== member.sha?.toLowerCase()) {
|
|
35271
|
+
const shipped = await deps.shippedTag(member.repo, member.sha);
|
|
35272
|
+
if (shipped) member.releasedAs = shipped;
|
|
35273
|
+
}
|
|
35274
|
+
if (!sha || sha.toLowerCase() !== member.sha?.toLowerCase() || !member.released && !member.releasedAs && rcHead?.toLowerCase() !== member.sha?.toLowerCase()) throw new Error(`${member.repo}: rc tag/branch ${member.tag} changed after the cut; release refused`);
|
|
35275
|
+
const katipReleaseSha = member.id === "katip" ? await deps.tagSha(member.repo, member.releasedAs ?? suiteReleaseTag(member.tag)) : void 0;
|
|
35271
35276
|
const expectedBackend = member.id === "katip" && member.released ? member.backendAfterRelease ?? katipReleaseSha : member.backend;
|
|
35272
35277
|
if (live.version !== expectedBackend && !(member.id === "katip" && !member.released && katipReleaseSha && live.version === katipReleaseSha))
|
|
35273
35278
|
throw new Error(`${member.repo}: live backend changed after the cut (${expectedBackend} \u2192 ${live.version}); release refused`);
|
|
@@ -35275,9 +35280,10 @@ async function suiteRelease(deps, ownerGo) {
|
|
|
35275
35280
|
if ((await deps.tagSha(SUITE_REPO, record.leadRcTag))?.toLowerCase() !== record.leadRcSha?.toLowerCase()) throw new Error("MM-Work rc tag changed after the cut; release refused");
|
|
35276
35281
|
for (const member of record.members) {
|
|
35277
35282
|
if (member.released || member.carried) continue;
|
|
35278
|
-
|
|
35283
|
+
if (member.releasedAs) console.warn(`${member.repo}: its rc already shipped as ${member.releasedAs}, not ${suiteReleaseTag(member.tag)}; finishing that release (#7464)`);
|
|
35284
|
+
await deps.release(member.repo, member.releasedAs ?? suiteReleaseTag(member.tag), member.sha);
|
|
35279
35285
|
if (member.id === "katip") {
|
|
35280
|
-
const expected = await deps.tagSha(member.repo, suiteReleaseTag(member.tag));
|
|
35286
|
+
const expected = await deps.tagSha(member.repo, member.releasedAs ?? suiteReleaseTag(member.tag));
|
|
35281
35287
|
const live = await deps.backend({ repo: member.repo, id: member.id, bundles: {} });
|
|
35282
35288
|
if (!expected || live.version !== expected) throw new Error(`${member.repo}: normal main deploy not stamped at released tag SHA; resume after verifying live backend`);
|
|
35283
35289
|
member.backendAfterRelease = live.version;
|
|
@@ -45191,6 +45197,24 @@ async function gh(args) {
|
|
|
45191
45197
|
function isMissingRef(message2) {
|
|
45192
45198
|
return /404|Not Found|No commit found for SHA/.test(message2);
|
|
45193
45199
|
}
|
|
45200
|
+
function releaseTagsFrom(out) {
|
|
45201
|
+
const parse = (t) => t.slice(1).split(".").map(Number);
|
|
45202
|
+
return out.split(/\s+/).filter((t) => /^v\d+\.\d+\.\d+$/.test(t)).sort((a, b) => {
|
|
45203
|
+
const [x, y] = [parse(a), parse(b)];
|
|
45204
|
+
return x[0] - y[0] || x[1] - y[1] || x[2] - y[2];
|
|
45205
|
+
});
|
|
45206
|
+
}
|
|
45207
|
+
async function withEnv(name, value, fn) {
|
|
45208
|
+
const had = Object.prototype.hasOwnProperty.call(process.env, name);
|
|
45209
|
+
const before = process.env[name];
|
|
45210
|
+
process.env[name] = value;
|
|
45211
|
+
try {
|
|
45212
|
+
return await fn();
|
|
45213
|
+
} finally {
|
|
45214
|
+
if (had) process.env[name] = before;
|
|
45215
|
+
else delete process.env[name];
|
|
45216
|
+
}
|
|
45217
|
+
}
|
|
45194
45218
|
async function prepareRcCheckout(git3, repo) {
|
|
45195
45219
|
if ((await git3(["status", "--porcelain"])).trim()) throw new Error(`${repo}: checkout has uncommitted changes; refuse to switch it to rc for release`);
|
|
45196
45220
|
await git3(["fetch", "origin", "--tags"]);
|
|
@@ -45313,10 +45337,15 @@ function suiteTrainIo(root, summaryFile) {
|
|
|
45313
45337
|
const result = await runReleaseResume(deps, { watch: true });
|
|
45314
45338
|
if (result.tag !== expected || result.state !== "aligned") throw new Error(`${repo}: release resume not complete at ${expected} (${result.tag}/${result.state})`);
|
|
45315
45339
|
} else {
|
|
45316
|
-
const result = await runTrainApply("release", deps, { watch: true });
|
|
45340
|
+
const result = await withEnv("MMI_RELEASE_VERSION", expected.replace(/^v/, ""), () => runTrainApply("release", deps, { watch: true }));
|
|
45317
45341
|
if (result.tag !== expected || result.deployStatus !== "success") throw new Error(`${repo}: release is not green at expected ${expected} (${result.tag}/${result.deployStatus})`);
|
|
45318
45342
|
}
|
|
45319
45343
|
});
|
|
45344
|
+
const shippedTag = async (repo, rcSha) => {
|
|
45345
|
+
const target = await checkout(repo);
|
|
45346
|
+
await exec("git", ["fetch", "origin", "--tags"], target);
|
|
45347
|
+
return releaseTagsFrom(await exec("git", ["tag", "--contains", rcSha, "--list", "v*"], target))[0];
|
|
45348
|
+
};
|
|
45320
45349
|
const rcRuns = async () => JSON.parse(await gh(["run", "list", "--repo", "mutmutco/MMI-Hub", "--workflow", "module-rc-publish.yml", "--event", "workflow_dispatch", "--limit", "100", "--json", "databaseId,displayTitle,conclusion,status,createdAt"]));
|
|
45321
45350
|
const watchRcRun = async (title, fields, reuse) => {
|
|
45322
45351
|
const since = Date.now() - 1e4;
|
|
@@ -45403,6 +45432,7 @@ function suiteTrainIo(root, summaryFile) {
|
|
|
45403
45432
|
}
|
|
45404
45433
|
},
|
|
45405
45434
|
release,
|
|
45435
|
+
shippedTag,
|
|
45406
45436
|
announce: async (record) => {
|
|
45407
45437
|
if (!summaryFile) throw new Error("suite announcement requires --announce-summary-file; outcome was not posted");
|
|
45408
45438
|
const result = await trainApplyDeps().announce?.({ repo: SUITE_REPO, tag: record.leadRcTag.replace(/-rc\.\d+$/, ""), summaryFile });
|
package/package.json
CHANGED