fix(tool-sandbox): skip missing fs_read/fs_write dirs instead of erroring#1253
fix(tool-sandbox): skip missing fs_read/fs_write dirs instead of erroring#1253kipz wants to merge 3 commits into
Conversation
…ring fs_read_file already used add_optional_read_file to silently skip missing paths. fs_read and fs_write directory entries used FsCapability::new_dir()? which propagated PathNotFound as a hard error, preventing the tool-sandbox from starting when a profile grants a directory that doesn't exist on that machine. Add add_optional_dir with the same warn-and-skip pattern and use it for both fs_read and fs_write entries in add_policy_fs on macOS and Linux. Signed-off-by: James Carnegie <me@kipz.org>
PR Review SummarySize
Affected crates
Blast radius — ModerateThis PR touches: source code,documentation Updated automatically on each push to this PR. |
There was a problem hiding this comment.
Code Review
This pull request updates the tool-sandbox platform implementations for Linux and macOS to skip missing fs_read and fs_write directories during startup instead of throwing an error. This is implemented via a new helper function add_optional_dir which handles NonoError::PathNotFound gracefully, matching the existing behavior for files. There are no review comments to evaluate, and the changes look correct and consistent.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: James Carnegie <me@kipz.org>
d30f610 to
c21f530
Compare
Signed-off-by: James Carnegie <me@kipz.org>
Linked Issue
Closes #1252
Summary
fs_read_fileentries inadd_policy_fsalready silently skip missing paths viaadd_optional_read_file.fs_readandfs_writedirectory entries usedFsCapability::new_dir(...)?which propagatedPathNotFoundas a hard error, preventing the tool-sandbox from starting when a profile grants a directory thatdoesn't exist on that machine.
Add
add_optional_dirwith the same warn-and-skip pattern and use it for bothfs_readandfs_writeinadd_policy_fson macOS and Linux.Test Plan
Existing
nono-clitest suite passes. Manual verification: profile with a non-existentfs_readdirectory no longer errors on tool-sandbox startup.Checklist
CHANGELOG.mdif needed