@mutmutco/pi-plugin 4.2.5 → 4.2.7
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/package.json
CHANGED
|
@@ -97,10 +97,14 @@ jobs:
|
|
|
97
97
|
# cache policy is declared on runner-node-toolchain (cache + cache-restore-max-mb). Per-job
|
|
98
98
|
# NPM_CONFIG_CACHE above is the org default; unbounded Actions cache blobs can exhaust mmi-live
|
|
99
99
|
# disks mid-extract before the real check runs (Jerv-Hub SQLCipher gate, ~4.3GB restore).
|
|
100
|
+
# MMI-Hub#5871: declare the npm MAJOR rather than inheriting whatever the runner's node bundles.
|
|
101
|
+
# A bare major, never an exact patch (it goes stale and then prescribes downgrading operator
|
|
102
|
+
# hosts toward it, #5862) and never `latest` (it takes the next major silently, #4782).
|
|
100
103
|
- if: ${{ '{{GATE_RUNTIME}}' == 'node' }}
|
|
101
104
|
uses: mutmutco/MMI-Hub/.github/actions/runner-node-toolchain@{{GATE_RUNNER_SHA}}
|
|
102
105
|
with:
|
|
103
106
|
node-version: 24
|
|
107
|
+
npm-version: '12'
|
|
104
108
|
- if: ${{ '{{GATE_RUNTIME}}' == 'python' }}
|
|
105
109
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
106
110
|
with: { python-version: '{{GATE_PY_VERSION}}' }
|
package/skills/release/SKILL.md
CHANGED
|
@@ -187,13 +187,49 @@ Treating doctor's exit code as the gate halts a healthy train on cosmetic drift
|
|
|
187
187
|
operator to ignore doctor's exit code entirely.
|
|
188
188
|
|
|
189
189
|
**`mmi-cli devops release --apply` and `mmi-cli devops rcand --apply` now run an active npm-major preflight
|
|
190
|
-
before any branch/tag mutation (#5666).** They read the repo's expected CI npm
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
before any branch/tag mutation (#5666).** They read the repo's expected CI npm, in this order (#5866,
|
|
191
|
+
#5893): an explicit `npm-version:` on the gate's `runner-node-toolchain` step; else an explicit
|
|
192
|
+
`npm install -g npm@<major>` step in gate.yml; else the infra gate's exact node pin through the
|
|
193
|
+
bundled-npm map (only for an estate that still carries a retired pre-#5870 pin); else the publish
|
|
194
|
+
workflow's own npm pin (`npm install -g npm@12`, the #5870 retirement shape). Local `npm -v`
|
|
195
|
+
must match that npm **major**; a
|
|
196
|
+
mismatch refuses `--apply` before any repository write.
|
|
197
|
+
|
|
198
|
+
**Both gate shapes are a declaration; only a gate that declares NEITHER falls through (#5893).** A lane
|
|
199
|
+
that installs its own npm has stated its npm as plainly as an `npm-version:` input — the shape differs, the
|
|
200
|
+
intent does not. Reading only `npm-version:` skipped Jerv-JervCode's gate (floating `node-version: 24`
|
|
201
|
+
plus `npm install -g npm@12`), fell through to publish.yml's stale npm 11, and prescribed a downgrade the
|
|
202
|
+
repo had already retired (#2845, MMI-Hub#5871); the publish smoke then failed under npm 11 (`Cannot find
|
|
203
|
+
module jiti/package.json` — a packed global install materializes no dependency closure under npm 11 once
|
|
204
|
+
the root declares `bundleDependencies`), shipping v1.57.7 to main with a Release but no npm publish.
|
|
205
|
+
**When gate.yml and publish.yml disagree on the npm major, that is a repo defect** — one lane will run the
|
|
206
|
+
wrong toolchain whichever the preflight believes. The preflight names it and proceeds; fix it with a PR
|
|
207
|
+
moving both pins together, never by silently trusting publish.yml.
|
|
208
|
+
|
|
209
|
+
**Check which side is wrong before repairing (#5862).** The receipt names one direction — move the machine
|
|
210
|
+
to the pin — and that is only right when the pin is current. Compare it against the registry first:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
npm view npm version # what npm is actually at
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
A pin **behind** latest is fixed by a PR moving the pin, not by a machine-global downgrade that every
|
|
217
|
+
release host then inherits. The pin is coordinated, so move all of it together: on Jerv-Hub the same
|
|
218
|
+
version lives in `publish.yml`, `DISTRIBUTION_NPM_VERSION`, `package.json` `packageManager`, and a
|
|
219
|
+
workflow-contract test. Prefer declaring a bare **major** (`npm@12`) over an exact patch — an exact pin
|
|
220
|
+
goes stale and then prescribes downgrades, and `latest` silently takes the next major.
|
|
221
|
+
|
|
222
|
+
**Bumping the pin can break workflow code that reads npm output (#5862).** `npm pack --json` changed shape
|
|
223
|
+
between majors (npm ≤10 a top-level array, npm ≥11 a name-keyed object) and npm 12 prints the `prepare`
|
|
224
|
+
lifecycle script's stdout ahead of the document, so `JSON.parse(stdout)` throws. An inline
|
|
225
|
+
`const [entry] = JSON.parse(pack.json)` in a workflow step is the hazard — on Jerv-Hub it failed **after**
|
|
226
|
+
`npm publish` had already succeeded, leaving the GitHub Release assets and the Gateway deploy undone. Repo
|
|
227
|
+
scripts that already tolerate both shapes (`scripts/distribution-assembly.mjs`, #4741) are the fix; audit
|
|
228
|
+
inline workflow parsing before bumping.
|
|
229
|
+
|
|
230
|
+
When the machine genuinely is the wrong side, the receipt's repair (`npm install -g npm@<CI major>`, then
|
|
231
|
+
`node -v && npm -v`, then rerun the same release command) preserves Node and avoids routing a
|
|
232
|
+
machine-global mutation through the train.
|
|
197
233
|
|
|
198
234
|
**A local `npm ci` failure during the fold on a lockfile CI already accepted is an npm-major mismatch, not a
|
|
199
235
|
bad lockfile (#4578).** Before touching the lockfile, compare toolchains:
|
|
@@ -201,7 +237,8 @@ bad lockfile (#4578).** Before touching the lockfile, compare toolchains:
|
|
|
201
237
|
npm -v
|
|
202
238
|
gh api repos/{owner}/{repo}/actions/runs --jq '.workflow_runs[0].id' # or read the gate log's
|
|
203
239
|
# `node -v && npm -v` toolchain-preflight line (#3446) for the npm major CI ran with
|
|
204
|
-
#
|
|
240
|
+
# Read the gate's OWN declared npm first — `npm-version:` or `npm install -g npm@X` (#5893);
|
|
241
|
+
# only a gate that declares neither falls back to the publish workflow npm pin (#5666).
|
|
205
242
|
```
|
|
206
243
|
A different npm MAJOR (e.g. local 12 vs. CI's 11) resolves the same lockfile differently and throws `Missing:
|
|
207
244
|
<pkg> from lock file` on a lockfile that is not actually broken. Align the local npm major
|
|
@@ -214,10 +251,11 @@ BEFORE inspecting package contents (deleted dir, malformed `package.json`, missi
|
|
|
214
251
|
```bash
|
|
215
252
|
npm -v
|
|
216
253
|
# green gate npm from the gate log's `node -v && npm -v` toolchain-preflight line (#3446),
|
|
217
|
-
# the
|
|
218
|
-
# or the publish workflow npm pin when gate
|
|
254
|
+
# the gate's declared `npm-version:` or its `npm install -g npm@X` step (#5893), or an exact
|
|
255
|
+
# node pin that maps to a bundled npm, or the publish workflow npm pin when the gate declares
|
|
256
|
+
# no npm of its own (#5666)
|
|
219
257
|
```
|
|
220
|
-
When local npm differs from the green gate (e.g. local npm
|
|
258
|
+
When local npm differs from the green gate (e.g. local npm 11 vs CI's 12), align local npm
|
|
221
259
|
(`npm install -g npm@<gate npm>`) and rerun the train — do not rewrite the publish surface for an
|
|
222
260
|
npm-internal missing module.
|
|
223
261
|
|
|
@@ -539,6 +577,20 @@ The one remaining caveat: `--watch` blocks only on deploy-model-named runs, not
|
|
|
539
577
|
deploys — those you conclude from the `workflowRuns` list yourself. Any `failure` there is a failed release
|
|
540
578
|
deploy even when the train reported success — flag it loudly and fix it before calling the release healthy.
|
|
541
579
|
|
|
580
|
+
**Identify WHICH run is red before believing the wording (#5872).** The release pushes the tag and the
|
|
581
|
+
branch seconds apart, so an ordinary repo CI gate lands on the release SHA too — it is enumerated
|
|
582
|
+
alongside the deploy and publish runs, and a red one reads out as
|
|
583
|
+
`deploy/publish on the release SHA FAILED`. On Jerv-Hub v3.4.4 that sentence appeared while `publish.yml`
|
|
584
|
+
was green and npm was already serving 3.4.4: the red entry was a `gate` push run that had raced the
|
|
585
|
+
shared runner's npm cache (the same SHA's tag-push gate passed, and a re-run passed). A red build gate
|
|
586
|
+
**holds the release unverified but is not a publish failure** — and on Jerv-Hub it defers the fail-closed
|
|
587
|
+
Gateway phase (#5699) until the gate is green, so it must be re-run and the release resumed, not
|
|
588
|
+
re-tagged. Read the run NAMES in `workflowRuns` first:
|
|
589
|
+
|
|
590
|
+
- `deploy.yml` / `publish.yml` / `tenant-deploy.yml` / `jerv-gateway` — a real deploy or publish verdict.
|
|
591
|
+
- `gate` (or any repo CI workflow) on a `push` event — ordinary CI that happens to share the SHA. Re-run
|
|
592
|
+
it; nothing about the published artifact is in question.
|
|
593
|
+
|
|
542
594
|
**Hub releases announce to Slack (#883).** Hub scope is **only** `mutmutco/MMI-Hub`: the commits/PRs on
|
|
543
595
|
`origin/main..origin/development`, this repo's `deploy.yml` + `publish.yml`, and Hub tooling (`mmi-cli`,
|
|
544
596
|
skills, plugin, registry, central workflows). Do **not** read another repo's board (`mmi-cli oracle board` / `/mmi`
|
|
@@ -655,6 +707,14 @@ Collect the backgrounded prod-deploy watch from Step 4 (it has typically finishe
|
|
|
655
707
|
healthy (the central deploy workflow smoke step / a health check); **red** → report the failure prominently and flag
|
|
656
708
|
that the release shipped on a failed deploy (re-run just the deploy — `main` is already correct).
|
|
657
709
|
|
|
710
|
+
**Say which run is red, never just "deploy/publish failed" (#5872).** `--resume` reports a single
|
|
711
|
+
`deployStatus` for every run on the release SHA, so a flaky repo CI gate that shares that SHA is reported
|
|
712
|
+
in the language of a failed publication — the operator is told publication failed while npm is serving
|
|
713
|
+
the version. Before writing that into a report, name the workflow: a red `deploy.yml` / `publish.yml` /
|
|
714
|
+
`tenant-deploy.yml` / `jerv-gateway` is a real deploy or publish failure; a red `gate` on a `push` event
|
|
715
|
+
is ordinary CI. Both hold the release unverified and both are fixed by re-running that run and resuming —
|
|
716
|
+
neither is ever fixed by re-tagging — but only the first means anything about the artifact.
|
|
717
|
+
|
|
658
718
|
**This distribution verifier is Hub-only.** It assumes the Hub release fold has already committed its
|
|
659
719
|
generated artifacts. Non-Hub `registry-publish` repositories must not run `release-distribution.mjs
|
|
660
720
|
verify`: use their own release-workflow evidence and the publish-visibility contract below.
|