mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
Stabilize cross-platform tests and directory-change fork permissions (#59369)
## Why Tests need to distinguish slow subprocess startup from operation timeouts and wait for asynchronous work before asserting results or cleaning up fixtures. ## What changed - Synchronize subprocess readiness, queued-turn completion, and matching UI events; allow more time for cold startup and separate startup from shutdown deadlines. - Adapt Windows fixtures and permission expectations, provide the voice-host test runtime DLL path, and normalize platform paths and animated status snapshots. - Use current configuration permissions when changing directories in embedded TUI sessions, while retaining saved permissions for remote sessions. - Allow the release prompt-prefix comparison to accept the exact image-tool description update that removes image detail options, and refresh the corresponding tool snapshot. ## Testing Extend inherited-session metadata coverage to both legacy and paginated thread history, including persisted history mode and revision-aware resume. GitOrigin-RevId: 0afb38403fc0adb0d83175344749584f0cdf9979
This commit is contained in:
committed by
copyberry
parent
71a4c07036
commit
021fccb046
@@ -278,6 +278,8 @@ async fn remote_session_commands_with_workload_identity_use_server_auth() -> Res
|
||||
use codex_app_server_protocol::ThreadListResponse;
|
||||
use codex_app_server_protocol::ThreadQueueListParams;
|
||||
use codex_app_server_protocol::ThreadQueueListResponse;
|
||||
use codex_app_server_protocol::ThreadReadParams;
|
||||
use codex_app_server_protocol::ThreadReadResponse;
|
||||
use codex_app_server_protocol::ThreadSetNameParams;
|
||||
use codex_app_server_protocol::ThreadSetNameResponse;
|
||||
use codex_app_server_protocol::ThreadStartParams;
|
||||
@@ -541,6 +543,34 @@ async fn remote_session_commands_with_workload_identity_use_server_auth() -> Res
|
||||
.to_string()
|
||||
.contains(cold_message)
|
||||
);
|
||||
// The mock receives the request before the resumed turn finishes. Deletion
|
||||
// requires an idle thread, and archiving removed our original subscription.
|
||||
timeout(Duration::from_secs(30), async {
|
||||
loop {
|
||||
let read: ThreadReadResponse = app
|
||||
.request_typed(ClientRequest::ThreadRead {
|
||||
request_id: RequestId::Integer(5),
|
||||
params: ThreadReadParams {
|
||||
thread_id: thread_id.clone(),
|
||||
include_turns: true,
|
||||
},
|
||||
})
|
||||
.await?;
|
||||
if let Some(last) = read.thread.turns.last()
|
||||
&& last.id != completed.turn.id
|
||||
&& last.status == TurnStatus::Completed
|
||||
&& matches!(
|
||||
read.thread.status,
|
||||
ThreadStatus::Idle | ThreadStatus::NotLoaded
|
||||
)
|
||||
{
|
||||
return anyhow::Ok(());
|
||||
}
|
||||
tokio::time::sleep(Duration::from_millis(50)).await;
|
||||
}
|
||||
})
|
||||
.await
|
||||
.context("resumed queued turn did not finish before deletion")??;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user