From d27e7c1a8d1b10fa9db9d83afb51f277ff6002f9 Mon Sep 17 00:00:00 2001 From: Benjamin Carlsson Date: Wed, 11 Nov 2026 22:32:31 +0000 Subject: [PATCH] Stabilize tracing in the cancellation timing test (#60882) Keep a `NoSubscriber` dispatch alive while the cancellation-before-admission test runs so untraced parallel workers registering the callsite do not interfere with timing log capture. GitOrigin-RevId: 11bc60e3e4633d3ccf426823aeb271875affa39a --- codex-rs/core/src/tools/parallel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codex-rs/core/src/tools/parallel.rs b/codex-rs/core/src/tools/parallel.rs index 0af29fc333..ea467edd89 100644 --- a/codex-rs/core/src/tools/parallel.rs +++ b/codex-rs/core/src/tools/parallel.rs @@ -784,6 +784,8 @@ mod tests { .with_max_level(tracing::Level::INFO) .with_writer(MockWriter::new(buffer)) .finish(); + // An untraced parallel worker can register this callsite before the test does. + let _untraced = tracing::Dispatch::new(tracing::subscriber::NoSubscriber::default()); let _subscriber_guard = tracing::subscriber::set_default(subscriber); let (session, mut turn_context) = crate::session::tests::make_session_and_context().await;