Keep local primary in remote routing tests

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-05-08 21:28:54 -07:00
parent 9ed7969add
commit 6cdec2bdd3
4 changed files with 2 additions and 14 deletions

View File

@@ -346,13 +346,6 @@ impl Session {
*guard = cancel_token;
}
if let Some(startup_prewarm) = self.take_session_startup_prewarm().await {
// The prewarm was built with the stale manager and can hold a read
// lock while resolving tools. Abort it before swapping managers so
// an MCP refresh cannot block turn startup behind stale work.
startup_prewarm.abort_and_wait().await;
}
let mut old_manager = {
let mut manager = self.services.mcp_connection_manager.write().await;
std::mem::replace(&mut *manager, refreshed_manager)

View File

@@ -47,11 +47,6 @@ impl SessionStartupPrewarmHandle {
}
}
pub(crate) async fn abort_and_wait(self) {
self.task.abort();
let _ = self.task.await;
}
async fn resolve(
self,
session_telemetry: &SessionTelemetry,

View File

@@ -234,7 +234,7 @@ async fn exec_command_routes_to_selected_remote_environment() -> Result<()> {
"yield_time_ms": 1_000,
"environment_id": REMOTE_ENVIRONMENT_ID,
}),
Some(vec![remote_selection, local_selection]),
Some(vec![local_selection, remote_selection]),
)
.await?;
assert!(

View File

@@ -538,7 +538,7 @@ async fn view_image_routes_to_selected_remote_environment() -> anyhow::Result<()
test.submit_turn_with_environments(
"route view image",
Some(vec![remote_selection, local_selection]),
Some(vec![local_selection, remote_selection]),
)
.await?;