mirror of
https://github.com/openai/codex.git
synced 2026-11-02 16:20:35 +00:00
Require filesystem backends to implement directory walks (#39749)
## What changed - Make `ExecutorFileSystem::walk` a required backend operation instead of providing a fallback built from directory reads and metadata requests. - Implement bounded local walks on a blocking task with cancellation, symlink cycle detection, deterministic ordering, error collection, and response-size limits. - Have remote filesystems use the server's walk operation directly. ## Testing - Cover local and remote handling of invalid roots and limits, directory symlinks, non-UTF-8 names, cancellation, sandbox contexts, and response budgets. GitOrigin-RevId: 7499bf05080c3f9965a5eb7ffd593de604d62c2a
This commit is contained in:
1 parent
2e1f18e0db
commit
a26d50852a
11 files changed
+668
-271
No files matched your search
@@ -10,6 +10,8 @@ use codex_file_system::GetMetadataOptions;
|
||||
use codex_file_system::ReadDirectoryEntry;
|
||||
use codex_file_system::ReadFileOptions;
|
||||
use codex_file_system::RemoveOptions;
|
||||
use codex_file_system::WalkOptions;
|
||||
use codex_file_system::WalkOutcome;
|
||||
use codex_file_system::WriteFileOptions;
|
||||
use codex_utils_path_uri::PathUri;
|
||||
use pretty_assertions::assert_eq;
|
||||
@@ -140,6 +142,15 @@ impl ExecutorFileSystem for TestFileSystem {
|
||||
Box::pin(async move { unimplemented!("test filesystem only supports reads") })
|
||||
}
|
||||
|
||||
fn walk<'a>(
|
||||
&'a self,
|
||||
_path: &'a PathUri,
|
||||
_options: WalkOptions,
|
||||
_sandbox: Option<&'a FileSystemSandboxContext>,
|
||||
) -> ExecutorFileSystemFuture<'a, WalkOutcome> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn remove<'a>(
|
||||
&'a self,
|
||||
_path: &'a PathUri,
|
||||
|
||||
Reference in new issue
Block a user