Repository navigation
Fix agent apply patching gem homes Bundler never loads (#2313) - #2402
Draft
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Draft
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
Agent apply writes gem copies in gem env homes that Bundler never loads for a project with an explicit install path. Work in progress for #2313. Assisted-by: Claude Code:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aePyMvbD6rKimV9v2pL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM Description written by Claude Code:claude-fable-5-2
Fixes #2313
Root cause
Agent
applytakes its gem write targets from the crawler's gem paths. Those keep everygem envhome whenever the defaultvendor/bundleroot holds no store, so that default gems (which only live there) can be patched. Nothing then limits the copies found in those homes to default gems. Under an explicit or deployment Bundlerpath, Bundler never loads a non-default gem from agem envhome, soapplywrites a copy that belongs to other projects on the machine, and on a fresh clone reports success while the project has no patched gem. The read-only side (vex,apply --check) already applies the right rule.Blocked: needs a maintainer decision
The behavior #2313 reports is the documented contract ("Copy classes" in
CLI_CONTRACT.md: a copy in agem envfallback home "is patched too when it matches and is writable") and is pinned bytests/apply/in_process_gem_fallback_home.rs(writable_fallback_home_copy_still_patched). The fix inverts that test and rewrites that paragraph, so it waits for a yes or no on the issue. No code is on this branch yet.Plan (if the answer is yes)
applyunder an explicit path with the gems installed, and with nothing installed yet.gem envhome Bundler does not load from is a write target only when it is a default gem.rollbackandremovekeep finding such copies, since an earlier release may have patched them.CLI_CONTRACT.mdand the Ruby docs.https://claude.ai/code/session_011f9aePyMvbD6rKimV9v2pL
Generated by Claude Code