Fix app-server stack pressure in tests

This commit is contained in:
Meta Vens 2026-04-24 20:01:54 +01:00
commit fbd4dc28ff
8 changed files with 25 additions and 0 deletions

View file

@ -384,6 +384,7 @@ use codex_thread_store::ThreadStoreError;
use codex_thread_store::UpdateThreadMetadataParams as StoreUpdateThreadMetadataParams;
use codex_utils_absolute_path::AbsolutePathBuf;
use codex_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
use futures::FutureExt;
use std::collections::HashMap;
use std::collections::HashSet;
use std::io::Error as IoError;
@ -988,6 +989,7 @@ impl CodexMessageProcessor {
}
ClientRequest::ThreadEpiphanyPromote { request_id, params } => {
self.thread_epiphany_promote(to_connection_request_id(request_id), params)
.boxed()
.await;
}
ClientRequest::ThreadEpiphanyUpdate { request_id, params } => {
@ -2463,8 +2465,10 @@ impl CodexMessageProcessor {
experimental_raw_events,
request_trace,
)
.boxed()
.await;
};
let thread_start_task = thread_start_task.boxed();
self.background_tasks
.spawn(thread_start_task.instrument(request_context.span()));
}

View file

@ -86,6 +86,7 @@ use codex_feedback::CodexFeedback;
use codex_login::AuthManager;
use codex_protocol::protocol::SessionSource;
pub use codex_state::log_db::LogDbLayer;
use futures::FutureExt;
use tokio::sync::mpsc;
use tokio::sync::oneshot;
use tokio::time::timeout;
@ -433,6 +434,7 @@ fn start_uninitialized(args: InProcessStartArgs) -> InProcessClientHandle {
Arc::clone(&session),
&outbound_initialized,
)
.boxed()
.await;
let opted_out_notification_methods_snapshot =
session.opted_out_notification_methods();

View file

@ -422,6 +422,7 @@ impl MessageProcessor {
/*outbound_initialized*/ None,
request_context.clone(),
)
.boxed()
.await;
},
)
@ -466,6 +467,7 @@ impl MessageProcessor {
Some(outbound_initialized),
request_context.clone(),
)
.boxed()
.await;
},
)