fix(vfs): provision /home/<username> for configured username#2133
Open
chaliy wants to merge 1 commit into
Open
fix(vfs): provision /home/<username> for configured username#2133chaliy wants to merge 1 commit into
chaliy wants to merge 1 commit into
Conversation
The interpreter sets HOME and ~ to /home/<username>, but the in-memory VFS only pre-created /home/user, so a configured username had no usable home directory and writes to $HOME / ~ failed with 'parent directory not found'. The default VFS now creates /home/<username> at build time via a new sync InMemoryFs::add_dir helper. Closes #2128
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 58c66ff | Commit Preview URL Branch Preview URL |
Jun 28 2026, 01:41 AM |
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.
What
When
Bash::builder().username("eval")is configured, the default in-memory VFS now provisions/home/evalso scripts that write to$HOME/~succeed.Why
Fixes #2128. The interpreter already sets
HOME(and~) to/home/<username>(Interpreter::with_config), butInMemoryFsonly pre-creates/home/user. With a non-default username, the home directory did not exist, so:This surfaced in an LLM eval run where
file_path_organizerfailed across all five models — each wrote its script under/home/eval/…and hit "parent directory not found".How
InMemoryFs::add_dir(path, mode)(mirrorsadd_file's parent-creation; leaves existing entries untouched; respects VFS path limits).BashBuilder::build()now creates/home/<username>(mode0o755, matching/home/user) on the default VFS when a username is configured. Custom filesystems remain responsible for their own layout.Tests
test_username_provisions_home_dir—echo hi > /home/eval/x.shsucceedstest_username_home_tilde_write—~/$HOMEwrites land in the provisioned hometest_default_username_home_still_present— default/home/userunaffectedadd_dirdoctestcargo fmt --checkandcargo clippyclean. Specvfs.mdupdated.Generated by Claude Code