mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Propagate temporary directories into sandbox policy contexts (#40660)
## Why Filesystem policies containing `:tmpdir` need executor-local directory bindings, including when execution occurs in a remote environment. ## What changed - Cache temporary directories reported by remote executors and discover the equivalent directories for local environments. - Preserve the cached directories across inherited environment selection and include them in `FileSystemSandboxContext`. - Add `FileSystemSandboxPolicyContext` and a context accessor so filesystem policy entries can be resolved with the executor-owned current directory, workspace roots, and temporary directories. ## Testing Extend environment-selection tests to cover local, remote, and inherited temporary-directory policy context. GitOrigin-RevId: 36335af3465c529f024bf69293af288803dd582d
This commit is contained in:
1 parent
2f4b105514
commit
ba9567daf3
10 files changed
+126
-12
No files matched your search
@@ -266,6 +266,17 @@ pub struct RawFileSystemSandboxPolicy {
|
||||
pub entries: Vec<RawFileSystemSandboxEntry>,
|
||||
}
|
||||
|
||||
/// Executor-owned paths needed to interpret filesystem sandbox policy entries.
|
||||
///
|
||||
/// Orchestrator callers keep these as `PathUri` values until execution crosses
|
||||
/// into the executor that owns them.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct FileSystemSandboxPolicyContext<'a> {
|
||||
pub cwd: &'a PathUri,
|
||||
pub workspace_roots: &'a [PathUri],
|
||||
pub temporary_directories: Option<&'a [PathUri]>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
struct ResolvedFileSystemEntry {
|
||||
path: AbsolutePathBuf,
|
||||
|
||||
Reference in new issue
Block a user