Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions codex-rs/code-mode-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ codex-protocol = { workspace = true }
codex-utils-cargo-bin = { workspace = true }
pretty_assertions = { workspace = true }
serde_json = { workspace = true }
tempfile = { workspace = true }
25 changes: 12 additions & 13 deletions codex-rs/code-mode-host/tests/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,17 @@ return;
next_callback_event(&mut events_rx).await,
CallbackEvent::Started("tool_call_slow".to_string())
);
assert_eq!(
let mut closure_events = vec![
next_callback_event(&mut events_rx).await,
CallbackEvent::Cancelled("tool_call_slow".to_string())
);
assert_eq!(
next_callback_event(&mut events_rx).await,
CallbackEvent::CellClosed(running_cell_id.clone())
];
closure_events.sort_by(|left, right| format!("{left:?}").cmp(&format!("{right:?}")));
assert_eq!(
closure_events,
vec![
CallbackEvent::Cancelled("tool_call_slow".to_string()),
CallbackEvent::CellClosed(running_cell_id.clone()),
]
);
assert_eq!(
wait_task
Expand Down Expand Up @@ -677,12 +681,9 @@ async fn oversized_initial_response_does_not_close_the_shared_host() {
async fn child_process_loss_cleans_up_and_rebuilds_the_shared_host() {
let host_program =
codex_utils_cargo_bin::cargo_bin("codex-code-mode-host").expect("host binary");
let proxy_dir =
std::env::temp_dir().join(format!("codex-code-mode-host-loss-{}", std::process::id()));
let proxy_program = proxy_dir.join("host-proxy.sh");
let pid_path = proxy_dir.join("host.pid");
let _ = std::fs::remove_dir_all(&proxy_dir);
std::fs::create_dir_all(&proxy_dir).expect("create host proxy directory");
let proxy_dir = tempfile::tempdir().expect("create host proxy directory");
let proxy_program = proxy_dir.path().join("host-proxy.sh");
let pid_path = proxy_dir.path().join("host.pid");
std::fs::write(
&proxy_program,
format!(
Expand Down Expand Up @@ -869,6 +870,4 @@ async fn child_process_loss_cleans_up_and_rebuilds_the_shared_host() {
events_a.try_recv(),
Err(mpsc::error::TryRecvError::Empty)
));

std::fs::remove_dir_all(proxy_dir).expect("remove host proxy directory");
}
Loading