Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Heap-allocate the resume future in the legacy history test (#43966)

dermanyang-oaidafb6781ee76
diff --git a/codex-rs/tui/src/app_server_session/rollout_history_tests.rs b/codex-rs/tui/src/app_server_session/rollout_history_tests.rs
index e3b5333412..0250b747c7 100644
--- a/codex-rs/tui/src/app_server_session/rollout_history_tests.rs
+++ b/codex-rs/tui/src/app_server_session/rollout_history_tests.rs
@@ -319,13 +319,13 @@ async fn cached_legacy_resume_revalidates_history_across_migration_settings() ->
let local_settings = crate::local_settings::LocalSettings::from(&resume_config);
let next_request_id = app_server.next_request_id;
let legacy = {
- let resume = app_server.resume_thread(
+ // Keep the large resume future off the Windows test thread's stack.
+ let mut resume = Box::pin(app_server.resume_thread(
&local_settings,
resume_config.clone(),
legacy_thread_id,
ResumeModelSettings::RestoreFromThread,
- );
- tokio::pin!(resume);
+ ));
drop(maintenance_guard);
// This current-thread test polls resume before yielding to the startup worker.
// Resume must acquire its guard before waiting for metadata revalidation.