Fix fs/readDirectory to skip broken symlinks (#17907)

## Summary
- Skip directory entries whose metadata lookup fails during
`fs/readDirectory`
- Add an exec-server regression test covering a broken symlink beside
valid entries

## Testing
- `just fmt`
- `cargo test -p codex-exec-server` (started, but dependency/network
updates stalled before completion in this environment)
This commit is contained in:
willwang-openai
2026-04-15 10:50:22 -07:00
committed by GitHub
parent 8e784bba2f
commit a3d475d33f
2 changed files with 8 additions and 1 deletions

View File

@@ -272,6 +272,11 @@ async fn file_system_methods_cover_surface_area(use_remote: bool) -> Result<()>
"hello from trait"
);
symlink(
source_dir.join("missing-target"),
source_dir.join("broken-link"),
)?;
let mut entries = file_system
.read_directory(&absolute_path(source_dir), /*sandbox*/ None)
.await