Repository navigation
spark-server: accept write paths with spaces and parentheses - #323
Merged
Merged
Conversation
The write-family path check rejected any path containing a space, parenthesis, `&`, `$`, `*` or `?` as a leaked shell command. Real paths carry these: a ZCode Edit under "/Volumes/JMac Overflow/..." was refused with "[atlas] Tool call rejected" and the agent's turn ended, and every write under "/Volumes/JMac External" failed the same way. Keep rejecting what marks a command rather than a name: control characters, `|`, `;`, backticks, redirections, `&&` and `$(`. Paths are never run by a shell here; the check only catches a model that pasted a command into the path argument. Co-Authored-By: Claude Opus 5.5 <[email protected]>
data-angel
added a commit
to Enntity/atlas
that referenced
this pull request
Nov 3, 2026
The fixture path '/tmp/a b' was rejected only because it holds a space. Atlas-Inf#323 accepts spaces in write paths, so with both changes the call reaches the client and the finish-reason test fails. '/tmp/a; b' carries a command separator, which the check rejects before and after Atlas-Inf#323. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Gated this head (
Merging on green CI. The main sentinel checks the merged main afterwards. |
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.
Summary
The write-family path check rejected any path containing a space,
(,),&,$,*or?, treating it as a shell command the model had leaked into the path argument. Real paths carry these characters. A ZCodeEditunder/Volumes/JMac Overflow/…was refused with[atlas] Tool call rejected, and the agent's turn ended; every write under a volume like/Volumes/JMac Externalfails the same way.The check now rejects only what marks a command rather than a name: tabs, newlines,
|,;, backticks,<,>,&&and$(.created && ls -Ris still refused. Atlas never runs these paths through a shell; the check exists to catch a model that pasted a command into the path.Test plan
cargo fmt --all -- --checkATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --locked -p spark-server --tests(pinned 1.93.1 toolchain): cleancargo test -p spark-server: 3,043 passed. 3 fail identically without a git checkout (bench_selfstartserve pin, twotui::bench_variants): they callrepo_root().validate_write_paths_reject_commands_not_ordinary_names, failing first on main with the production error. It accepts 4 real paths (/Volumes/JMac External/…,/tmp/My Files (2)/notes.md,docs/R&D plan.md,src/main.rs) and rejects 8 values (7 command-shaped, one too short).Editwithfile_path"/Volumes/JMac External/software/notes (draft).md" now goes out as a tool call.Notes for reviewers
$($HOME/x),*and?are now accepted. They are legal in file names and do not run anything here; the client writes the path as given.validation.rsis on the file-size allow-list; it ends one line shorter.🤖 Generated with Claude Code