Stabilize remote full-ci turn startup waits

Honor pre-cancelled delegate spawns before starting work, wait for TurnStarted in the remote no-wait helper, and give serialized rollback integration tests matching nextest headroom.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-05-08 18:25:34 -07:00
parent aeaf7ee3ad
commit ff27de53ba
3 changed files with 11 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ slow-timeout = { period = "30s", terminate-after = 3 }
# other while waiting for append-only history rewrites on saturated CI runners.
filter = 'package(codex-core) & kind(test) & (test(snapshot_rollback_followup_turn_trims_context_updates) | test(snapshot_rollback_past_compaction_replays_append_only_history) | test(thread_rollback_after_generated_image_drops_entire_image_turn_history))'
test-group = 'core_thread_rollback_integration'
slow-timeout = { period = "30s", terminate-after = 3 }
[[profile.default.overrides]]
# These tests create restricted-token Windows child processes and private desktops.

View File

@@ -72,6 +72,10 @@ pub(crate) async fn run_codex_thread_interactive(
subagent_source: SubAgentSource,
initial_history: Option<InitialHistory>,
) -> Result<Codex, CodexErr> {
if cancel_token.is_cancelled() {
return Err(CodexErr::TurnAborted);
}
let (tx_sub, rx_sub) = async_channel::bounded(SUBMISSION_CHANNEL_CAPACITY);
let (tx_ops, rx_ops) = async_channel::bounded(SUBMISSION_CHANNEL_CAPACITY);
let CodexSpawnOk { codex, .. } = Box::pin(Codex::spawn(CodexSpawnArgs {

View File

@@ -722,6 +722,12 @@ impl TestCodex {
personality: None,
})
.await?;
wait_for_event_with_timeout(
&self.codex,
|event| matches!(event, EventMsg::TurnStarted(_)),
SUBMIT_TURN_COMPLETE_TIMEOUT,
)
.await;
Ok(())
}