[codex] Migrate apply_patch to executor filesystem (#17027)

- Migrate apply-patch verification and application internals to use the
async `ExecutorFileSystem` abstraction from `exec-server`.
- Convert apply-patch `cwd` handling to `AbsolutePathBuf` through the
verifier/parser/handler boundary.

Doesn't change how the tool itself works.
This commit is contained in:
pakrym-oai authored and GitHub committed 2026-04-07 21:20:22 +00:00
1 parent d45513ce5a
commit e9702411ab
22 files changed
+817 -334

No files matched your search

+2 -23
View File
@@ -1,27 +1,6 @@
use codex_utils_absolute_path::AbsolutePathBuf;
pub(crate) use codex_utils_absolute_path::test_support::PathBufExt;
pub(crate) use codex_utils_absolute_path::test_support::PathExt;
use std::path::Path;
use std::path::PathBuf;
pub(crate) trait PathExt {
fn abs(&self) -> AbsolutePathBuf;
}
impl PathExt for Path {
fn abs(&self) -> AbsolutePathBuf {
AbsolutePathBuf::try_from(self.to_path_buf())
.unwrap_or_else(|_| panic!("path should already be absolute"))
}
}
pub(crate) trait PathBufExt {
fn abs(&self) -> AbsolutePathBuf;
}
impl PathBufExt for PathBuf {
fn abs(&self) -> AbsolutePathBuf {
self.as_path().abs()
}
}
pub(crate) fn test_path_display(path: &str) -> String {
Path::new(path).abs().display().to_string()