Revert "Revert "Overhaul shell detection and centralize command generation for unified exec"" (#6607)

Reverts openai/codex#6606
This commit is contained in:
pakrym-oai
2025-11-13 16:45:17 -08:00
committed by GitHub
parent db2aa57d73
commit 7b027e7536
11 changed files with 300 additions and 412 deletions

View File

@@ -214,7 +214,11 @@ async fn unified_exec_emits_exec_command_begin_event() -> Result<()> {
assert_eq!(
begin_event.command,
vec!["/bin/echo hello unified exec".to_string()]
vec![
"/bin/bash".to_string(),
"-lc".to_string(),
"/bin/echo hello unified exec".to_string()
]
);
assert_eq!(begin_event.cwd, cwd.path());
@@ -654,7 +658,14 @@ async fn unified_exec_skips_begin_event_for_empty_input() -> Result<()> {
"expected only the initial command to emit begin event"
);
assert_eq!(begin_events[0].call_id, open_call_id);
assert_eq!(begin_events[0].command[0], "/bin/sh -c echo ready");
assert_eq!(
begin_events[0].command,
vec![
"/bin/bash".to_string(),
"-lc".to_string(),
"/bin/sh -c echo ready".to_string()
]
);
Ok(())
}