mirror of
https://github.com/openai/codex.git
synced 2026-11-18 15:01:48 +00:00
Preserve target-native cwd in permission approval requests (#42314)
## Why Permission requests can originate in an environment whose path convention differs from the Codex host. Requiring the request working directory to be host-native prevents those requests from reaching interactive approval. ## What changed - Carry the request `cwd` as a `LegacyAppPathString` through core events and the app-server protocol so the target environment's native representation is preserved. - Convert the preserved value back to a `PathUri` when materializing permission grants. - Regenerate the JSON and TypeScript protocol schemas for the updated `cwd` type. ## Testing - Exercise the app-server permission request round trip with a target-native working directory across host path conventions. - Verify remote permission requests retain their environment working directory and granted access still unblocks later execution. GitOrigin-RevId: 97dc9707d9048883d20bab1b69c93871039f3188
This commit is contained in:
1 parent
1bc8fb16ae
commit
eb078b4f44
18 files changed
+44
-50
No files matched your search
@@ -335,7 +335,7 @@ fn app_server_request_permissions_preserves_file_system_permissions() {
|
||||
item_id: "item-1".to_string(),
|
||||
environment_id: Some("remote".to_string()),
|
||||
started_at_ms: 0,
|
||||
cwd: cwd.clone(),
|
||||
cwd: cwd.clone().into(),
|
||||
reason: Some("Select a workspace root".to_string()),
|
||||
permissions: codex_app_server_protocol::RequestPermissionProfile {
|
||||
network: Some(AppServerAdditionalNetworkPermissions {
|
||||
@@ -363,7 +363,7 @@ fn app_server_request_permissions_preserves_file_system_permissions() {
|
||||
)),
|
||||
}
|
||||
);
|
||||
assert_eq!(request.cwd, Some(cwd));
|
||||
assert_eq!(request.cwd, Some(cwd.into()));
|
||||
assert_eq!(request.environment_id.as_deref(), Some("remote"));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user