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 gem pair model ignoring custom lockfile and Bundler 1 twins (#749, #751) by mikolalysenko · Pull Request #768 · SocketDev/socket-patch Conversation
|
| Issue | Test | Without fix | With fix |
|---|---|---|---|
| #749 | hosted_memory_engine::a_bundler4_custom_lockfile_is_refused |
FAILED (rewrote the leftover lock) | ok |
| #749 | e2e_redirect_gem_build::gem_hosted_bundler4_custom_lockfile_redirects_nothing (real Bundler 4.0.17) |
FAILED: redirected: 1, rewrittenFiles: [Gemfile, Gemfile.lock], vex statements: 1 |
ok; frozen bundle install of the untouched project succeeds |
| #749 | ruby_crawler::loaded_manifest_reads_the_lockfile_setting (disk, no leftover lock; env vs config priority; BUNDLE_IGNORE_CONFIG) |
new API | ok |
| #749 × #577 | manifest::with_lockfile_accepts_only_the_pairs_own_lock (global tier, shadowed by the app config) and ruby_crawler::loaded_manifest_reads_the_global_config_below_local_and_env (bundle config set --global lockfile) |
new (merge) | ok |
| #749 | vendor::gem::a_bundler4_custom_lockfile_is_refused |
new | ok |
| #749 | hosted_memory_engine::a_lockfile_setting_naming_the_default_lock_is_wired (control) |
ok | ok |
| #751 | hosted_memory_engine::a_gemfile_gems_rb_twin_is_refused (1.x, 2.x and mixed stamps) |
FAILED (wired gems.rb) | ok |
| #751 | engine::twin_redirects_nothing_whatever_the_locks_say |
FAILED | ok |
| #751 | engine::twin_with_an_unreadable_spelling_redirects_nothing (memory symlink / non-UTF-8 spelling) |
FAILED | ok |
| #751 | engine::twin_with_an_unreadable_disk_spelling_redirects_nothing (mode-000 gems.rb, non-root) |
FAILED | ok |
| #751 | lock_inventory::tests::gem_inventory_diagnoses_a_lock_it_cannot_read (symlinked twin spellings) |
FAILED | ok |
| #751 | engine::default_discovery_wires_a_lone_gems_rb (control) |
ok | ok |
| #751 | e2e_redirect_gem_build::gem_hosted_twin_redirects_nothing (every Bundler line; checks the untouched twin still installs frozen) |
FAILED (wired gems.rb, attested) | ok (Bundler 4.0.17) |
| both | manifest.rs unit tests (with_lockfile_*, config_lockfile_*) |
new | ok |
cargo clippy --workspace --all-features -- -D warnings: clean.cargo fmt --all -- --check is not clean on main itself (≈500 diffs, and CI has no fmt gate), so I formatted only the hunks I touched.cargo test --workspace --all-features --lib --bins: the core lib has 4848 passed and 4 failed. All four (copy_tree::relax_loop_must_not_traverse_symlinked_root, vlt_heal::an_unremovable_hidden_lock_keeps_every_store_entry, pypi_poetry::wire_write_failure_*, pypi_requirements::wire_failure_rolls_back_*) are chmod-based write-failure tests that can't fail writes when run as root (uid 0) in this sandbox. They don't touch gem code.hosted_memory_engine 33/33, hosted_memory_parity, in_process_vendor and e2e_redirect_gem_stale_install all ok. in_process_redirect has 104 passed and 3 failed, again only the chmod-based write-failure tests (root sandbox).e2e_redirect_gem_build --ignored (real Bundler 4.0.17): new custom-lockfile, dual-boot and gems.rb arms pass.cargo test --workspace locally because the sandbox's disk allowance runs out building every integration-test binary. CI runs the full suite.main (d502a07)main gained #577 (Bundler's global config, #621) while this PR was open, and the two overlapped in LoadedManifest. The conflicts are resolved by keeping both. Because Bundler 4 reads lockfile through Bundler.settings, which includes the global file, with_lockfile now takes the global tier too. Without that, bundle config set --global lockfile custom.lock would have slipped past the #749 guard. BundlerEnv carries the global config path, and #621's call sites use it. After the merge: cargo clippy --workspace --all-features -- -D warnings is clean; the gem/ruby core lib tests (253), crawler_ruby_e2e (26), hosted_memory_engine (34), hosted_memory_parity, in_process_vendor (106), e2e_redirect_gem_stale_install, and real-Bundler e2e_redirect_gem_build --ignored (17) all pass. The full core lib has 5010 passing and the same 4 chmod-based failures from running as root here.
9e7af6e)BUNDLE_LOCKFILE, an unsupported BUNDLE_GEMFILE, or a diverging twin) left lock inventory empty with no warning. Inventory now adds a gem_lock_unsupported diagnosis, which scan and the in-memory engine report as a run-level warnings[] entry (documented in CLI_CONTRACT.md). Test: lock_inventory::tests::gem_inventory_diagnoses_a_lock_it_cannot_read (red→green). The hosted_memory_engine refusal tests assert the warning again.BUNDLE_LOCKFILE shadows the tiers below it, as Settings#[] does, so an empty env or app-config value now clears a global custom lock.a3d31b9, d44c4fb)BUNDLE_LOCKFILE on a memory view (a3d31b9). The in-memory engine compared the lockfile against /, so BUNDLE_LOCKFILE: "/Gemfile.lock" passed as the project's own lock and the pair was rewritten. An absolute value there is now UnsupportedLockfile. Test: engine::absolute_bundle_lockfile_redirects_nothing (red→green).BUNDLED WITH (d44c4fb). Every default twin is refused, as described under Fix.lockfile "custom.lock" DSL (issue matrix row 4) is Ruby code the model can't read. Bundler 4.0.17 itself fails frozen installs on that shape before any scan.BUNDLE_LOCKFILE setting is refused even on Bundler < 4 (which ignores it). That's a conservative, fail-closed choice.2cb153f: merges main. Resolved the CLI_CONTRACT.md conflict by keeping main's redirect.patches[] text plus this PR's two gem codes.42657c6: setup-php pin comment # v2 → # 2.37.2 (zizmor ref-version-mismatch, the same as Label the setup-php pin in ci.yml with its real tag #1118) for the red Audit GitHub Actions check.95f1894 (Bugbot): the hosted twin refusal also counts a spelling that's symlinked, unreadable or not UTF-8.d00e81f (Bugbot): the same check also asks view.is_file, so an on-disk spelling with a permission-denied read still counts.2ec14fc (security review): lock inventory's twin check (bundler_loaded_lock_diagnosed_in) fails closed on a memory-view symlinked spelling.completed/success), and every review thread is resolved. The only checks still running are the two non-required Windows gradle hosted cells.🤖 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
Hosted mode wired the wrong gem files in two Bundler layouts, so the scan reported success (and its VEX attested a patch) while Bundler installed the unpatched gem or frozen installs failed: - Bundler 4's custom lockfile (BUNDLE_LOCKFILE, env or .bundle/config) was ignored, so the lock Bundler reads was never pinned (#749). A lockfile naming anything but the pair's own default lock is now refused in hosted (redirect_gem_bundle_lockfile_unsupported) and vendored (gemfile_not_loaded) mode before any write. - A Gemfile + gems.rb twin always followed Bundler >= 2 and wired gems.rb, but Bundler 1.x loads the Gemfile (#751). A twin whose locks say BUNDLED WITH 1.x is now wired through the Gemfile pair, and twin locks that disagree on the major are refused (redirect_gem_twin_bundler_versions_diverge). Assisted-by: Claude Code:claude-opus-5-5
Two host capstones in e2e_redirect_gem_build: a Bundler 4 project with `lockfile custom.lock` (and a leftover Gemfile.lock) redirects and attests nothing and still installs frozen (#749), and a Bundler 1.x Gemfile + gems.rb twin is wired through the Gemfile and a fresh checkout installs the patched gem (#751). Each skips on the Bundler line it does not apply to. 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.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Release notes are written when a release is cut, from the merged PR log and the code, so PRs no longer edit CHANGELOG.md. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Resolve the overlap with #577 (Bundler global config, #621): classify gained the global tier, so with_lockfile takes it too. Bundler 4 reads `lockfile` through Bundler.settings, which includes ~/.bundle/config, so `bundle config set --global lockfile custom.lock` is now refused like the env and app-config spellings instead of slipping past #749's guard. BundlerEnv carries the global config path; main's positional bundler_loaded_manifest_with_env call sites move to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018ULgrJMQMWEBAsiuprY449
|
I can't see which test failed yet. The job log's download URL ( What I checked locally on
Next: the macOS and Windows Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Found it, and this PR doesn't cause it:
Cause: the two tests came in with #738 (#356) and assume the name-keyed resolver
So the behaviour is right and only the tests' premise is stale. Proposed patch (for
I'm not adding this to #768. It's in code unrelated to the gem change, and no fix for it is open yet. Once Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
#605 taught the name-keyed npm resolver to probe bundled store trees, so it now finds aliased copies (node_modules/lp) and a nested host's store peers itself. Two vex_consumed tests from #738 assumed that set never held aliases, so main's CI went red after both merged. The tests now feed the alias-free set explicitly to keep covering alias expansion, and also check the resolver's own set reaches the same copies with no duplicates. No production code changes. Assisted-by: Claude Code:claude-opus-5-5 (cherry picked from commit 40dac07)
|
Burn-down agent: pushed
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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.
|
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.
Conflicts resolved: - ruby_crawler.rs: kept this branch's BundlerEnv and main's (#736) bundler_loaded_manifest_in / bundler_loaded_lock_in. The memory branch of bundler_loaded_manifest_in now also layers BUNDLE_LOCKFILE (with_lockfile), and bundler_loaded_lock_in follows the #751 twin rule (Gemfile.lock for a bundler-1.x twin, no lock for a twin whose locks disagree on the major), so the lock readers main routed through it (inventory, ledger recovery, VEX) agree with the pair the rewriter wires. - hosted/engine.rs: keep_bundler_loaded_gem_files uses main's shared resolver plus this branch's twin/lockfile handling. - vex/discover/gem.rs: the "no loaded lock" diagnostic no longer blames only BUNDLE_GEMFILE. - CLI_CONTRACT.md: both texts (main's Gradle confirmation sentence and this branch's new gem refusal codes). - e2e_redirect_gem_build.rs: both sets of Driver variants. - hosted_memory_engine.rs: both sets of tests. Since #736 the memory engine finds gem candidates only through the lock bundler loads, so a custom BUNDLE_LOCKFILE or a twin with diverging bundler majors yields no gem candidate (same as an unsupported BUNDLE_GEMFILE on main); those two tests now assert nothing is redirected/written, and the refusal warnings are covered by new engine unit tests. 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.
|
The same failure appeared at the same time on unrelated branches ( I found no fix PR. The proposed one-line patch matches the comment - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 I'm not re-running the check, because it will fail the same way until that line changes on main. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Resolves the CLI_CONTRACT.md conflict by keeping main's new redirect.patches[] text and this branch's two gem warning codes. Assisted-by: Claude Code:claude-opus-5-5
Upstream moved setup-php's v2 tag, so the "# v2" comment on the 2.37.2 commit pin now fails the Audit GitHub Actions check (ref-version-mismatch). Same change as #1118. 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.
|
[agent] Took this PR over because its heartbeat was stale (03:28Z), the head conflicted with
Local checks: 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.
A Gemfile + gems.rb twin whose other spelling is a symlink, an unreadable file or not UTF-8 was not seen as a twin by hosted mode, so the readable pair was still pinned although Bundler 2+ loads gems.rb. Lock inventory already counted such a twin and warned gem_lock_unsupported, so the scan both warned and rewrote. The twin check now counts every spelling Bundler sees, readable or not. Found by Bugbot on #768. 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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
A Gemfile + gems.rb twin whose second spelling is a regular file the scan cannot read (permission denied, I/O error) left no trace in the read lists, so hosted mode still pinned the readable pair. The twin check now also asks the project view whether the file exists, the same File.file? test lock inventory uses. Found by Bugbot on #768. Assisted-by: Claude Code:claude-opus-5-5
Hosted file-set scans see a git symlink Gemfile or gems.rb as a symlink marker with no target. Lock inventory took that as absent, so a Gemfile + gems.rb twin was inventoried from the regular spelling's lock with no gem_lock_unsupported warning, although Bundler follows the link and may load the other pair. The twin check now fails closed on a symlinked spelling. Found by the security review on #768. 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.
✅ 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 2ec14fc. Configure here.
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.
Resolve two CLI_CONTRACT.md conflicts by keeping main's new text (the atomic vendored-to-hosted takeover wording from #1039 and the gem_lock_unsupported warning from #768) while re-applying this PR's migration away from the removed spellings: `scan --apply` becomes `scan --mode agent`, and `--apply`/`--vendor` in the lockfile supplement become agent mode / vendored mode. Co-Authored-By: Claude <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Hosted gem redirect wiresgems.rb in a Gemfile/gems.rb twin locked by Bundler 1.17, which loads Gemfile, so the install stays unpatched while the in-run VEX attests it
Hosted gem redirect ignores Bundler 4's custom lockfile (lockfile setting / BUNDLE_LOCKFILE), so it never pins the lock Bundler uses and frozen installs fail with no warning
There was an error while loading. Please reload this page.