GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — Fix pnpm vendored refusal missing quoted scoped aliases (#957) by mikolalysenko · Pull Request #986 · SocketDev/socket-patch Conversation
|
| Issue | Test | Without fix | With fix |
|---|---|---|---|
| #957 importer shape (+ peer-suffixed, scan & indexed) | vendor::pnpm_lock::tests::quoted_scoped_alias_references_refuse |
FAILED ("an aliased importer version must refuse (scan)") | ok |
| #957 snapshot shape (bug-hunt follow-up comment) | same unit test, snapshot cases | FAILED | ok |
| #957 importer, real pnpm 10 | e2e_vendor_pnpm_build::pnpm_vendor_refuses_quoted_scoped_alias_references (importer leg) |
FAILED: status: success, applied: 1 |
ok: vendor_lock_entry_unsupported, lock/package.json byte-identical, no artifact, untouched lock frozen-installs |
#957 snapshot via a file: tarball dep, real pnpm 10 |
same e2e (snapshot leg) |
FAILED: status: success, applied: 1 |
ok |
Commands run locally on a406a10:
cargo clippy --workspace --all-features -- -D warnings: clean. rustfmt --check on every touched file: clean. CI runs no fmt check, and main itself is not cargo fmt-clean, so a whole-workspace cargo fmt is not part of this PR.cargo test --workspace --all-features --no-fail-fast: 10,820 passed, 340 ignored, 12 failed. All 12 failures are failure-injection tests that make paths read-only or unremovable, and the sandbox runs as root, which bypasses those permissions. Re-run as an unprivileged user (setpriv --reuid=65534), all 12 pass.cargo test -p socket-patch-core --lib vendor::pnpm: 211 passed, including the 600-seed index oracle.🤖 Generated with Claude Code
https://claude.ai/code/session_018PuTamr8nmfojGXJ7zn9Xc
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
|
[agent] Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
pnpm 9+ quotes a lock value that starts with `@`, so a scoped npm alias (`sl: npm:@scope/[email protected]`) is written as `'@scope/[email protected]'` in the importer or a dependent's snapshot. The vendored "aliased reference" refusal compared that raw value with the unquoted `name@version`, never matched, and vendoring reported success over a lock that every frozen install rejects (ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY) while VEX attested the package. Unquote importer versions and snapshot dependency values once, both in the scan and where the lock index keys them, so scoped aliases (and their peer-suffixed spellings) are refused like unscoped ones. The index-vs-scan oracle now generates the quoted spelling too. Fixes #957 Assisted-by: Claude Code:claude-opus-5-5
main has failed socket-patch-core's lib tests since Gradle support (#646) and the digest helpers (#865) both landed. The guard test production_digests_go_through_the_helpers flags three files #646 added that still hash inline: crawlers/gradle_cache.rs, patch/jvm_jar.rs and patch/sidecars/maven.rs. That breaks test, test-release and coverage on every open PR. Each inline sha1/sha256 call now goes through sha1_hex_of or sha256_hex_of, which compute the same lowercase hex. Behaviour is unchanged. Assisted-by: Claude Code:claude-opus-5-5 (cherry picked from commit 659ac2c)
fa2202a to
a406a10
Compare
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a406a10. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review — head
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Vendored pnpm 9+ misses the aliased-importer refusal for a scoped npm alias (sl: npm:@scope/pkg@x), so it leaves a dangling quoted importer reference: scan says success, frozen installs fail, and VEX attests not_affected
There was an error while loading. Please reload this page.