Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 554fd38785
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub(crate) fn normalize_additional_permissions( | ||
| additional_permissions: PermissionProfile, | ||
| command_cwd: &Path, | ||
| ) -> Result<PermissionProfile, String> { | ||
| let Some(file_system) = additional_permissions.file_system else { |
There was a problem hiding this comment.
Preserve cwd-relative additional permission paths
This change drops command_cwd from additional-permission normalization and switches the path list to AbsolutePathBuf, but shell/unified-exec tool arguments are still parsed via plain serde_json::from_str (without an AbsolutePathBufGuard). In that flow, relative additional_permissions.file_system entries such as "./output" now fail deserialization (AbsolutePathBuf deserialized without a base path) before the approval flow runs, whereas previously they were resolved against the command cwd. This breaks existing with_additional_permissions requests that rely on relative paths.
Useful? React with 👍 / 👎.
6bbf5b2 to
7c5be39
Compare
Why
PermissionProfileshould describe filesystem roots as absolute paths at the type level. UsingPathBufinFileSystemPermissionsmade the shared type too permissive and blurred together three different deserialization cases:agents/openai.yaml, where relative paths should resolve against the skill directoryshell_commandandexec_command, whereadditional_permissions.file_systemmay legitimately be relative to the commandworkdirThis change tightens the shared model without regressing the existing local command flow.
What Changed
protocol::models::FileSystemPermissionsand the app-serverAdditionalFileSystemPermissionsmirror to useAbsolutePathBufAbsolutePathBufGuard, so relative permission roots inagents/openai.yamlresolve against the containing skill directoryadditionalPermissions.fileSystem.*paths are rejected at the boundaryshell,shell_command, andexec_commandarguments under anAbsolutePathBufGuardrooted at the resolved command working directoryapp-server/README.md, and the affected transport/TUI tests to match the final behavior