mirror of
https://github.com/openai/codex.git
synced 2026-11-22 15:15:18 +00:00
core: remove unused permissions cwd plumbing (#29468)
## Why `compile_scoped_filesystem_pattern()` accepted a `_policy_cwd` parameter even though scoped glob compilation no longer uses the policy working directory. Keeping that unused argument forced the surrounding permissions compilation path to keep forwarding `policy_cwd` through call sites that did not need it, making the API look more dependent on cwd resolution than it is. ## What changed Removed the unused cwd parameter from `compile_scoped_filesystem_pattern()` and the callers that only forwarded it: `compile_filesystem_permission()`, `compile_permission_profile()`, and `compile_permission_profile_selection()`. Workspace root resolution still keeps `policy_cwd`, because that path still resolves relative roots against the active policy cwd. Relevant code: [`codex-rs/core/src/config/permissions.rs`](https://github.com/openai/codex/blob/b8b9816102e064dae4488ec130cf560f63c1ab78/codex-rs/core/src/config/permissions.rs#L346). ## Verification - `just test -p codex-core config::permissions` - `just test -p codex-core` was also run after building `test_stdio_server`; it passed the touched permissions coverage but still reported unrelated existing failures in `cli_stream` and shell snapshot tests.
This commit is contained in:
1 parent
15f448d8b0
commit
e48ab86693
3 files changed
+2
-12
No files matched your search
@@ -543,7 +543,6 @@ fn glob_scan_max_depth_must_be_positive() {
|
||||
|
||||
#[test]
|
||||
fn read_write_trailing_glob_suffix_compiles_as_subpath() -> std::io::Result<()> {
|
||||
let cwd = TempDir::new()?;
|
||||
let mut startup_warnings = Vec::new();
|
||||
let (file_system_policy, _) = compile_permission_profile(
|
||||
&PermissionsToml {
|
||||
@@ -568,7 +567,6 @@ fn read_write_trailing_glob_suffix_compiles_as_subpath() -> std::io::Result<()>
|
||||
)]),
|
||||
},
|
||||
"workspace",
|
||||
cwd.path(),
|
||||
&mut startup_warnings,
|
||||
)?;
|
||||
|
||||
|
||||
Reference in new issue
Block a user