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 — Gem `BUNDLE_GEMFILE` check compares paths lexically, so a symlinked spelling of the project's own Gemfile (e.g. macOS `/tmp/app/Gemfile`) is refused, and `vex` / `rollback` reject the hosted patch Bundler is loading · Issue #896 · SocketDev/socket-patch Closed Labels agent:triagedbugSomething isn't workingSomething isn't workingbughuntFound by a scheduled package-manager bug-hunt agentFound by a scheduled package-manager bug-hunt agentpm:bundlerBundler (RubyGems)Bundler (RubyGems)priority:p2 Description[agent] Found by the scheduled Bundler (RubyGems) bug-hunt routine (ledger #316). Summary
On macOS this is the default for anything under ImpactAll of these fail closed, but each one stops socket-patch from working on a correctly configured project, with a message that's factually wrong:
The same function backs Repro (Linux; the
|
| OS | Setup | Unset | BUNDLE_GEMFILE=$PWD/Gemfile (logical) |
BUNDLE_GEMFILE=$(pwd -P)/Gemfile |
|---|---|---|---|---|
| macos-latest, Ruby 3.4.9 | project in /tmp/bh-app (physical /private/tmp/bh-app) |
redirected 1 | refused | redirected 1 |
| ubuntu-latest, Ruby 3.4 | project via symlinked dir | redirected 1 | refused | redirected 1 |
| Linux sandbox, Ruby 3.3.6 | same, plus vex / rollback after a real redirect + install (2/2) |
vex ok | vex exit 2, rollback error (installed gem is patched) | — |
| Linux sandbox | --cwd <link> + env <real> / config abs <link> path |
— | refused / refused | — |
Probe run: https://github.com/SocketDev/socket-patch/actions/runs/37382646373 (the probe's own vex/rollback cells hit a stale vendor/bundle harness artifact; the Linux sandbox rows cover them).
9d718cf5 (#431, the fix for #341 / #390), which introduced the BUNDLE_GEMFILE classification with a lexical compare; cbf1f748 (#532) kept it. The v4.0.0 release binary ignores BUNDLE_GEMFILE and redirects this project (it predates the classification), so this hasn't shipped in a release yet.
crates/socket-patch-core/src/formats/gem/manifest.rs:138-147 (resolve_against: absolute + normalize_lexically only) and :183-189 (target == root.join(manifest)).env_keeps_root (manifest.rs:163-166), which decides whether the env var moves Bundler's root.Comparing canonicalized paths (or file identity, same_file-style) whenever both exist would match what Bundler does. A lexical match could stay as the fast path, falling back to canonicalization only when it fails, so a symlinked Gemfile file (already refused elsewhere) keeps its own handling.
Priority: P1 → P2. Lexically different spellings of the same Gemfile cause a refusal; canonical path spelling works.
[agent] Triaged as priority:p1 (Bundler). Not a duplicate: #507 and #390 were about which source of BUNDLE_GEMFILE wins, while this is the lexical, symlink-blind path comparison in formats::gem::manifest::classify. No open PR covers it yet.
Generated by Claude Code
[agent] Claiming this issue (shared root cause: formats::gem::manifest compares BUNDLE_GEMFILE / BUNDLE_LOCKFILE paths lexically, so a symlinked spelling of the project directory reads as another manifest). Branch: agent/fix-gem-manifest-symlinked-root. Claim-ID: 2026-10-11T21:20:37Z-8ad772
Generated by Claude Code