@mutmutco/cli 4.0.11 → 4.0.12

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 +28 -14
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -10827,10 +10827,10 @@ var rollout_plan_default = {
10827
10827
  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)."
10828
10828
  },
10829
10829
  baseline: {
10830
- version: "4.0.11",
10831
- tag: "v4.0.11",
10832
- commit: "5b62441055eb",
10833
- npm: "@mutmutco/cli@4.0.11"
10830
+ version: "4.0.12",
10831
+ tag: "v4.0.12",
10832
+ commit: "0ead67177a73",
10833
+ npm: "@mutmutco/cli@4.0.12"
10834
10834
  },
10835
10835
  exitCriterion: "fleet-n-of-n",
10836
10836
  hubOnlyShortcut: "forbidden",
@@ -10847,14 +10847,14 @@ var rollout_plan_default = {
10847
10847
  repo: "mutmutco/mmi-hub",
10848
10848
  role: "canary",
10849
10849
  schedule: "train",
10850
- v3Target: "v4.0.11"
10850
+ v3Target: "v4.0.12"
10851
10851
  }
10852
10852
  ],
10853
10853
  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.",
10854
10854
  rollback: {
10855
10855
  independent: true,
10856
- mechanism: "npm dist-tag latest -> 4.0.11 and redeploy the Hub Lambda from tag v4.0.11 (5b62441055eb); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
10857
- v3Target: "v4.0.11 (@mutmutco/cli@4.0.11, tag commit 5b62441055eb \u2014 last known-good release carrying the repo-index v4-only contract)"
10856
+ mechanism: "npm dist-tag latest -> 4.0.12 and redeploy the Hub Lambda from tag v4.0.12 (0ead67177a73); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
10857
+ v3Target: "v4.0.12 (@mutmutco/cli@4.0.12, tag commit 0ead67177a73 \u2014 last known-good release carrying the repo-index v4-only contract)"
10858
10858
  }
10859
10859
  },
10860
10860
  {
@@ -23624,6 +23624,7 @@ function shardRepoIndexV4(envelope) {
23624
23624
 
23625
23625
  // src/repo-index-cloud-client.ts
23626
23626
  var RETRY_ATTEMPTS2 = 3;
23627
+ var WARMUP_MAX_PASSES = 3;
23627
23628
  async function probeRepoIndexV4ReadinessCloud(queries, deps) {
23628
23629
  if (!deps.baseUrl) return { ok: false, error: "Hub API URL not configured" };
23629
23630
  const token = await deps.token();
@@ -23631,6 +23632,7 @@ async function probeRepoIndexV4ReadinessCloud(queries, deps) {
23631
23632
  const baseUrl = deps.baseUrl.replace(/\/$/, "");
23632
23633
  const headers = { ...clientVersionHeaders(), Authorization: ["Bearer", token].join(" "), "content-type": "application/json" };
23633
23634
  const shadowPass = async (readinessProbe) => {
23635
+ const ms = {};
23634
23636
  for (const query of queries) {
23635
23637
  const res = await fetchWithRetry(deps.fetch ?? fetch, `${baseUrl}/repo-index/v4/shadow`, {
23636
23638
  method: "POST",
@@ -23639,12 +23641,18 @@ async function probeRepoIndexV4ReadinessCloud(queries, deps) {
23639
23641
  }, { attempts: RETRY_ATTEMPTS2, timeoutMs: 12e4, sleep: deps.retrySleep });
23640
23642
  const body = await res.json().catch(() => ({}));
23641
23643
  if (!res.ok) return { ok: false, error: `${query.id}: ${body.error ?? `v4 readiness probe HTTP ${res.status}`}${body.errorClass ? ` (${body.errorClass})` : ""}`, status: res.status };
23644
+ if (typeof body.v4?.ms === "number") ms[query.id] = body.v4.ms;
23642
23645
  }
23643
- return { ok: true };
23646
+ return { ok: true, ms };
23644
23647
  };
23648
+ const steady = (ms) => queries.every((query) => query.latencyMs === void 0 || ms[query.id] === void 0 || ms[query.id] <= query.latencyMs);
23645
23649
  try {
23646
- const warmup = await shadowPass(false);
23650
+ let warmup = await shadowPass(false);
23647
23651
  if (!warmup.ok) return warmup;
23652
+ for (let pass = 2; pass <= WARMUP_MAX_PASSES && !steady(warmup.ms); pass++) {
23653
+ warmup = await shadowPass(false);
23654
+ if (!warmup.ok) return warmup;
23655
+ }
23648
23656
  const verdict = await shadowPass(true);
23649
23657
  if (!verdict.ok) return verdict;
23650
23658
  const res = await fetchWithRetry(deps.fetch ?? fetch, `${baseUrl}/repo-index/status`, {
@@ -24256,15 +24264,21 @@ function formatRepoIndexCloudStatus(status) {
24256
24264
  return `repo-index: cloud ${repo} v4 ${state}${commit}; ${readiness}`;
24257
24265
  }
24258
24266
  function defaultV4ReadinessSuite() {
24259
- const suite = repo_index_golden_queries_v4_default;
24260
- const modes = new Set(suite.queries?.map((query) => query.mode));
24261
- if (suite.schemaVersion !== 4 || !Array.isArray(suite.queries) || !["lexical", "semantic", "hybrid"].every((mode) => modes.has(mode))) {
24267
+ const raw = repo_index_golden_queries_v4_default;
24268
+ const queries = (raw.queries ?? []).map(({ id, query, mode, latency }) => ({
24269
+ id,
24270
+ query,
24271
+ mode,
24272
+ ...typeof latency?.p95Ms === "number" ? { latencyMs: latency.p95Ms } : {}
24273
+ }));
24274
+ const modes = new Set(queries.map((query) => query.mode));
24275
+ if (raw.schemaVersion !== 4 || !Array.isArray(raw.queries) || !["lexical", "semantic", "hybrid"].every((mode) => modes.has(mode))) {
24262
24276
  throw new Error("invalid bundled repo-index-golden-queries-v4.json");
24263
24277
  }
24264
- return suite;
24278
+ return { schemaVersion: 4, queries };
24265
24279
  }
24266
24280
  async function runRepoIndexV4ReadinessGate(opts) {
24267
- const queries = opts.suite.queries.map(({ id, query, mode }) => ({ id, query, mode }));
24281
+ const queries = opts.suite.queries.map(({ id, query, mode, latencyMs }) => ({ id, query, mode, latencyMs }));
24268
24282
  const probed = await opts.probe(queries);
24269
24283
  if (!probed.ok) return { ok: false, findings: [{ ok: false, code: "v4-probe-error", detail: probed.error }] };
24270
24284
  const ok = probed.readiness.verdict === "ready";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.0.11",
3
+ "version": "4.0.12",
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",