fix(clients): resolve Node client lock platform entries - #794
Merged
Conversation
The three Node client lockfiles carry their platform binding packages as
bare `{"optional": true}` stubs, with no version, resolved URL, or
integrity hash. npm tolerates that only while the declared version is
unpublished, so `npm ci` passed throughout the v0.23.0 candidate window
and started failing the moment the release published the packages:
npm error `npm ci` can only install packages when your package.json
and package-lock.json are in sync ... lock file's
@registrystack/evidence-client-darwin-arm64@ does not satisfy
@registrystack/evidence-client-darwin-arm64@0.23.0
Regenerate the three locks against the published registry so each
platform entry carries its version, resolved URL, and integrity hash
again. Only those nine entries change; no other dependency moves.
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41bd5f13b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
npm cifails on pristinemainfor all three Node clients:This blocks
Native client bindingsand bothRelease Linux Node clientsjobs on every PR that touches paths triggering them, including #792.
It is not only a CI annoyance.
release-candidate.ymlrunsnpm citoo, inthe
Build Node client packagesstep:so re-running the v0.23.0 candidate today fails at that step.
Why
The three lockfiles carry their platform binding packages as bare stubs:
with no
version,resolved, orintegrity. npm accepts a stub like thatonly while the version declared in
package.jsonis unpublished. v0.23.0published at 07:43Z today, and
npm cihas failed since.The stubs were written by
89358a219 chore(release): prepare v0.23.0 beta-34,which regenerated the locks while
@registrystack/*-client-*@0.23.0did notyet exist on the registry.
de1fd31e2did exactly the same for v0.22.0, and9200b8403happened to restore the resolved entries afterwards, so the cyclecompleted by accident last time rather than by design.
That is the shape of the recurrence:
mainis broken from the moment arelease publishes until something regenerates the locks. Release prep itself
hides the breakage, because the version it pins is unpublished again.
The change
Regenerated with
npm install --package-lock-only --ignore-scriptsin each ofthe three client directories, now that 0.23.0 is published. Nine entries gain
their
version,resolved,integrity,cpu,os,libc,license, andenginesfields back. No other dependency in any of the three locks moves:the diff is +144/-9 and every hunk is one of those nine entries.
Review notes (release provenance)
The change adds integrity hashes that bind these locks to published artifacts,
so the hashes were verified against the registry rather than trusted from the
local npm cache. All nine match the registry's
dist.integrityfor 0.23.0:No release artifact, manifest, or signed material is touched.
Verification
npm ci && npm run build:debug && npm test && npm run check:types && cmp ../../LICENSE LICENSE,which is the
Native client bindingsjob body, run locally against all threeclients. All three pass.
Follow-up worth deciding separately
This is structural. The checked-in
package.jsonpinsoptionalDependenciesto the exact release version, so between prep and publish the lockfile
cannot be complete, and after publish it must be regenerated to stay
valid.
validate_client_package_versionsinrelease/scripts/registry-releasechecks only the two root identities, so a lock full of stubs passes release
validation either way.
Options, none applied here:
runbook, which is what this PR does by hand. Keeps the contradiction but
makes the repair deterministic instead of incidental.
optionalDependenciesfrom the checked-in manifests and let napi-rsinject them at publish time, so the checked-in lock never references an
unpublished version. This is the only option that removes the contradiction
rather than scheduling around it.
cannot work, since the stub is unavoidable at prep time; it is only
coherent as a post-publish check paired with option 1.
I did not pick one. It changes the release contract and recurs every cycle.