fix: save libc field to package-lock.json - #9025
Merged
Merged
Conversation
owlstronaut
force-pushed
the
libc-fix
branch
from
February 24, 2026 19:36
671694b to
8a80a7b
Compare
wraithgar
approved these changes
Feb 24, 2026
Merged
1 task
This was referenced May 11, 2026
nrslib
added a commit
to nrslib/takt
that referenced
this pull request
May 15, 2026
Codex 環境の npm が v11.11.0 未満だったため、@anthropic-ai/claude-agent-sdk-linux-* の libc フィールド (glibc/musl) が package-lock.json から剥がれていた。 npm 11.12.1 で main 同等に手動復元。 これは npm < 11.11.0 の既知バグで、npm/cli#9025 で 2026-02-24 に修正済み。 arborist v9.4.0 を同梱する npm v11.11.0 以降では libc 行を正しく保存する。
nrslib
added a commit
to nrslib/takt
that referenced
this pull request
May 15, 2026
* feat: add opt-in observability foundation * fix: stabilize observability foundation lifecycle * fix: keep observability foundation scoped * fix: preserve workflow errors during observability shutdown * fix(deps): package-lock.json の libc 行を復元 Codex 環境の npm が v11.11.0 未満だったため、@anthropic-ai/claude-agent-sdk-linux-* の libc フィールド (glibc/musl) が package-lock.json から剥がれていた。 npm 11.12.1 で main 同等に手動復元。 これは npm < 11.11.0 の既知バグで、npm/cli#9025 で 2026-02-24 に修正済み。 arborist v9.4.0 を同梱する npm v11.11.0 以降では libc 行を正しく保存する。 --------- Co-authored-by: nrslib <38722970+nrslib@users.noreply.github.com>
1 task
This was referenced Jul 8, 2026
This was referenced Jul 12, 2026
r2cuerdame
pushed a commit
to r2cuerdame/CodeSampleX
that referenced
this pull request
Aug 14, 2026
Both claims were adversarially verified before filing them as upstream bug reports: three independent agents each told to refute them, six out of six refuted. Nothing was filed — and the same evidence showed that the samples already published carried the overstatement. npm-lightningcss-musl-prebuild attributed the lockfile fix to npm 12. It shipped in npm 11.11.0 on 2026-02-24 (npm/cli#9025, closing npm/cli#8514), which added libc to pkgMetaKeys in the shrinkwrap writer. Bisected on the image: 10.9.8 through 11.10.1 omit it, 11.11.0 onward record it. The fix is in the writer alone, so upgrading npm does not help — the lockfile has to be regenerated. Also noted that a plain `npm install` from a libc-less lock installs both variants too, and that rollup behaves identically, so neither `npm ci` nor lightningcss is the boundary. rs-serde-flatten-deny-unknown framed deny_unknown_fields with flatten as a combination the derive lets through unchecked. serde_derive implements it deliberately and serde's own test suite covers it, so the empty stderr means the pair is supported rather than overlooked. The sample's assertions were all correct — the flattened-map and flattened-struct behaviours are exactly what it measured — so only the framing changed: serde's doc note is over-broad, and the two broken shapes are known upstream (#1547, #2384). Every assertion in both files still passes. Also gitignore seeds/*/target: a cargo build directory is never published and is a hundred megabytes of noise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Fixes: #8514
The
libcfield was missing frompkgMetaKeysinshrinkwrap.js, so it was never written topackage-lock.json. This meant that on reinstall from a lockfile,checkPlatformcouldn't distinguish between glibc and musl variants of optional dependencies — both would be installed instead of just the one matching the current platform.The fix adds
libctopkgMetaKeysalongsideosandcpu. This is purely additive — packages withoutlibcare unaffected, and older npm versions will silently ignore the new field in lockfiles.