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 mirror archiveUrl dropped on berry restore (#1465) by mikolalysenko · Pull Request #1466 · SocketDev/socket-patch Conversation
|
| Issue case | Test | Without fix | With fix |
|---|---|---|---|
#1465 berry rollback + remove, top-level npmRegistryServer mirror |
in_process_redirect::yarn_berry_unwind_keeps_a_default_registry_url_behind_a_mirror |
FAIL (binding dropped) | pass |
#1465 real yarn 4 behind a pass-through mirror: rollback restores yarn's own locator, cold --immutable --check-cache install succeeds |
e2e_redirect_yarn_berry_build::berry_hosted_rollback_keeps_archive_url_behind_passthrough_mirror |
FAIL (bare locator) | pass on yarn 4.18.0 and 4.0.2 |
#1465 npmScopes form / scoped name |
npm::tests::project_registry_decides_a_mirrors_tarball_urls (scoped @s/p behind a mirror), with scope-registry lookup already covered by #1017 tests |
FAIL | pass |
pnpm sibling (npm.rs:1846) |
in_process_redirect::pnpm_rollback_keeps_a_default_registry_tarball_behind_a_mirror |
FAIL (tarball: dropped) |
pass |
pnpm lock evidence (npm.rs:1484) |
npm::tests::npmjs_tarballs_behind_a_mirror_are_no_tarball_setting_evidence |
Some(true) | None |
| berry locator | npm::tests::berry_locator_binds_only_an_underived_tarball |
FAIL | pass |
Commands run locally:
cargo fmt --all -- --check: okcargo clippy --workspace --all-features -- -D warnings: okcargo test -p socket-patch-core --all-features --lib: 6407 pass. 4 fail only as root (chmod-based write-failure tests) and pass as an unprivileged user.in_process_redirect: 142 pass. 3 fail only as root, same as above, and pass as non-root. in_process_rollback_hosted 38/38, hosted_memory_engine 39/39.SOCKET_PATCH_YARN_E2E_REQUIRED=1, yarn 4.18.0): e2e_redirect_yarn_berry_build 35/35, e2e_vendor_yarn_berry_build 39/39, e2e_yarn4_pnpm_linker_build 38/38, e2e_yarn4_workspaces_build 37/37.cargo test --workspace doesn't fit this sandbox's disk, so CI covers the rest. mode_migration_npm's two berry tests can't reach npmjs through the sandbox proxy's CA from their test-side reqwest::Client. That is unrelated to this change.No npm/pypi/gem wrapper changes are needed: the wrappers only dispatch to the binary.
From /code-review high:
upstream_registry_fallback already warns, and the Hosted pnpm rollback/remove restores pnpm-lock.yaml from npmjs's version document instead of the project's .npmrc registry, so a mirror project loses its tarball: URL (cold frozen install 404s) or is moved to npmjs #919 fallback test pins this behaviour.SOCKET_NPM_REGISTRY counted on the evidence path. It stands in for npmjs throughout this module (non_default_registry, fetch_dists_on). The behaviour is unchanged from main.ProjectDist instead of a bool. It's a reasonable refactor, but it's wider than this fix.curl. The test-side reqwest client uses webpki roots only, so it fails behind TLS-intercepting proxies. curl ships on every CI runner OS..yarnrc.yml. The new rc repeats every key the fixture writes.🤖 Generated with Claude Code
https://claude.ai/code/session_01QT2WDJPU22ezCv8jCEUNSP
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
Behind a registry mirror that passes npmjs metadata through, tarball URLs still point at registry.npmjs.org. Yarn berry binds those with ::__archiveUrl= and pnpm records them as tarball:, because each compares only against the package's own registry. Hosted rollback and remove treated an npmjs-conventional URL as derived whatever the project's registry, so they dropped the binding and the next cold install fetched a path the mirror 404s. The derived check now compares only against the project's registry when the version document came from it. The default registry still counts when the project resolves from it, or when the mirror could not be read and its document was a fallback guess. Fixes #1465 Assisted-by: Claude Code:claude-opus-5-5
Real yarn 4 behind a mirror that passes npmjs packuments through binds the dependency to its npmjs tarball with ::__archiveUrl=. The new e2e pins it hosted, rolls back, checks the restored lock carries yarn's own binding, and runs a cold immutable install behind the mirror, which 404s on the conventional mirror path if the binding is lost. Refs #1465 Assisted-by: Claude Code:claude-opus-5-5
Skip the default-registry lookup when the document came from the project's registry, read the dist once in the berry restore, and add a unit test that npmjs tarballs recorded behind a mirror are no longer read as proof that lockfile-include-tarball-url is on. Refs #1465 Assisted-by: Claude Code:claude-opus-5-5
|
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 bbc9ccf. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Labeled Ready for review by the burn-down agent.
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does. Behind a registry mirror that passes npmjs metadata through unchanged (tarball URLs still on registry.npmjs.org), hosted Risk: low. One predicate in Look here
Verified
Changes I made: none. Open questions: none blocking. The author lists declined Auto-merge is armed, so approving sends this straight to the merge queue. 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.
Hosted yarn berry rollback/remove drop the::__archiveUrl= binding when the project's mirror serves npmjs tarball URLs, so cold installs fetch a mirror path that 404s
There was an error while loading. Please reload this page.