Merge 6c75720022 into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2026-04-25 19:40:05 -07:00
committed by GitHub
2 changed files with 15 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ use std::process::Command;
const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(60);
#[cfg(not(any(target_os = "macos", windows)))]
const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(10);
const OPTIONAL_FS_CHANGE_TIMEOUT: Duration = Duration::from_secs(2);
async fn initialized_mcp(codex_home: &TempDir) -> Result<McpProcess> {
let mut mcp = McpProcess::new(codex_home.path()).await?;
@@ -832,7 +833,7 @@ async fn maybe_fs_changed_notification(
mcp: &mut McpProcess,
) -> Result<Option<FsChangedNotification>> {
match timeout(
DEFAULT_READ_TIMEOUT,
OPTIONAL_FS_CHANGE_TIMEOUT,
mcp.read_stream_until_notification_message("fs/changed"),
)
.await

View File

@@ -672,12 +672,24 @@ async fn steered_user_input_follows_compact_when_only_the_steer_needs_follow_up(
async fn steered_user_input_waits_when_tool_output_triggers_compact_before_next_request() {
let (gate_first_completed_tx, gate_first_completed_rx) = oneshot::channel();
let large_output_command = if cfg!(windows) {
"[Console]::Out.Write(('0' * 4000))"
} else {
"printf '%04000d' 0"
};
let large_output_args = json!({
"command": large_output_command,
"login": false,
"timeout_ms": 2000,
})
.to_string();
let first_chunks = vec![
chunk(ev_response_created("resp-1")),
chunk(ev_function_call(
"call-1",
"shell_command",
r#"{"command":"printf '%04000d' 0","login":false,"timeout_ms":2000}"#,
&large_output_args,
)),
gated_chunk(
gate_first_completed_rx,