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 hosted yarn classic with an offline mirror (#364) by mikolalysenko · Pull Request #839 · SocketDev/socket-patch Conversation
|
| Issue | Regression test | Without fix | With fix |
|---|---|---|---|
#364 hosted rewrite (unit; .yarnrc/.npmrc, quoted and unquoted forms, LF and CRLF locks) |
patch::redirect::tests::yarn_classic_offline_mirror_refuses_rewrite |
FAILED | ok |
#364 settings that must not trigger it (none, false, empty, -pruning, [section], .yarnrc false over .npmrc) |
yarn_classic_without_effective_offline_mirror_rewrites, yarn_classic_offline_mirror_preflight_scope |
ok (guards) | ok |
| #364 end to end, real yarn 1.22.22 with a populated mirror | e2e_redirect_yarn_classic_build::classic_offline_mirror_refuses_hosted_and_keeps_installs_working |
FAILED (redirected: 1, VEX statement written) |
ok on yarn 1.0.2, 1.6.0, 1.7.0, 1.22.22: lock untouched, no attestation; on 1.7+ a fresh yarn install --frozen-lockfile passes online and --offline (1.0–1.6 install nothing from a mirror even without socket-patch, as the issue's control shows) |
#364 vendored→hosted takeover (.yarnrc and .npmrc, wet and --dry-run) |
in_process_vendor::classic_vendored_to_hosted_takeover_refuses_with_offline_mirror |
FAILED (takeover reverted the vendored wiring) | ok |
Commands run locally (Linux, as root):
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-core --lib: all pass except 4 tests that also fail on main here (relax_loop_must_not_traverse_symlinked_root, an_unremovable_hidden_lock_keeps_every_store_entry, wire_write_failure_maps_error_and_leaves_lock_untouched, wire_failure_rolls_back_already_written_files). They induce failures with file permissions, which root bypasses.SOCKET_PATCH_YARN_E2E_REQUIRED=1 cargo test -p socket-patch-cli --all-features with --test e2e_redirect_yarn_classic_build (13/13), e2e_vendor_yarn_classic_build (11/11), hosted_memory_engine (28/28), hosted_memory_parity (31/31), in_process_get_hosted_ecosystems (8/8), in_process_redirect (104/107; the 3 failures are permission-induced write-failure tests that pass as non-root in CI), in_process_vendor and mode_migration_npm.node --test npm/socket-patch/bin/socket-patch.test.mjs: 4/4. No wrapper changes were needed, since the wrappers only dispatch the binary.cargo test --workspace locally because building every test binary exceeds this session's disk allowance, so CI covers the rest.cargo fmt --all -- --check reports 498 diffs on unmodified main with the pinned 1.93.1 toolchain, and CI runs no fmt step, so I didn't reformat the touched files. That avoids unrelated churn.CI on head 399b0b1: all 14 workflow runs succeeded (CI went green on attempt 3, after both earlier attempts had their yarn-classic 1.9.4 and yarn-berry 4.1.0 (ubuntu-latest) jobs cancelled in the queue). Bugbot reviewed 399b0b1 and found no issues. mergeable_state: clean.
.yarnrc / .npmrc are read. A mirror configured in ~/.yarnrc or a parent directory's config is not detected.🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
A yarn classic project that sets yarn-offline-mirror (in .yarnrc or .npmrc) had its lock rewired to the hosted tarball. Yarn looks mirror tarballs up by file name, and the hosted one has the same name as the upstream tarball already in the mirror, so every install got the unpatched bytes and failed the integrity check (or, offline, never found the patched tarball) while the scan reported success and VEX attested the patch. The hosted rewrite now leaves yarn.lock untouched in that case, warns with redirect_yarn_classic_offline_mirror and points to vendored mode, which works with a mirror. The dependency is not counted as redirected or attested. Both config files are read only beside a classic lock. Fixes #364 Assisted-by: Claude Code:claude-opus-5-5
A vendored-to-hosted takeover reverted the vendored yarn classic wiring before the hosted rewrite refused the offline mirror, leaving the package patched in neither mode. The takeover now checks the mirror first and keeps the package vendored. Adds a real-yarn e2e (yarn 1.22.22, populated mirror) showing the scan refuses, writes no attestation, and fresh installs still work online and offline. Refs #364 Assisted-by: Claude Code:claude-opus-5-5
Refs #364 Assisted-by: Claude Code:claude-opus-5-5
These goldens hash the Debug text of the whole rewrite result, which now carries the empty refused_yarn_classic_uuids set. With that field stripped from the text, the old goldens still match every case, so only the output digests change; case keys and inputs are identical. Refs #364 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
yarn 1.0 to 1.6 install nothing from an offline mirror even without socket-patch, so the fresh-install leg of the new mirror e2e failed on the yarn-classic 1.0.2 and 1.6.0 matrix legs. Those releases now pin that known limitation; the hosted refusal is still checked on every release. Refs #364 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Resolve the e2e_redirect_yarn_classic_build.rs conflict with #710 by keeping both new tests (offline-mirror refusal and git-sourced block skip). Co-Authored-By: Claude <[email protected]>
|
bugbot run 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
yarn 1's .yarnrc parser ends an unquoted key at ':', so `yarn-offline-mirror: ./mirror` and `yarn-offline-mirror:./mirror` configure the mirror just like `yarn-offline-mirror ./mirror`. The mirror check only split on whitespace, so either spelling slipped through and hosted mode still rewired the lock, reproducing #364. Refs #364 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016uQyhodCtdJGrKaD7AAV1n
|
BugBot review 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I ported #851's test update in 0a2ef31, on top of a merge of current Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
main has been red since #605 taught the name-keyed resolver to return npm-aliased copies, which broke two vex_consumed tests added by #738. Port #851's test update so this PR's CI goes green; it no-ops once #851 lands on main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016uQyhodCtdJGrKaD7AAV1n
|
bugbot run 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Burn-down agent: labeled Ready for review.
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…c-offline-mirror # Conflicts: # crates/socket-patch-core/tests/equivalence/pdm_rewrite_shared_parse.golden # crates/socket-patch-core/tests/equivalence/poetry_rewrite.golden
There was an error while loading. Please reload this page.
|
Four checks failed on ad0db1f for reasons outside this PR:
I'll re-run each failed job once when its run finishes. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
main has been red since #865 added a check that production code computes digests through utils::digest, while #646's Gradle code still hashes inline. Port #878's change so this PR's coverage and test-release go green; it no-ops once #878 lands on main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016uQyhodCtdJGrKaD7AAV1n
|
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.
|
Some checks on 399b0b1 were cancelled or failed for reasons outside this PR:
This PR only changes yarn classic. Once every run on this commit finishes, I'll re-run its failed and cancelled jobs once. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Every workflow on 399b0b1 is green except CI. CI is red only because
CI has already used its one re-run, so I'm not re-running it again. If someone with Actions access re-runs those two jobs, the PR should go fully green. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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 399b0b1. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Head 399b0b1 is now fully green. I re-ran the two CI jobs that the queue had cancelled ( Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5392576
into
main
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 classic redirect breaks every install in projects with a yarn-offline-mirror: the mirror's upstream tarball shares the hosted URL's basename and fails the new integrity pin
There was an error while loading. Please reload this page.