From 6851fae57cf7306e1d7a093d334b1116d33ce5ad Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Thu, 13 Aug 2026 15:59:09 +0000 Subject: [PATCH] Refresh tracing interest in the token estimate test (#38400) ## What changed Rebuild the tracing callsite interest cache after installing the test-local subscriber so the `event_enabled!` assertion uses that subscriber's filters. GitOrigin-RevId: d221dca4d7e7cb2ddd492a46f7a9d5c977088593 --- codex-rs/core/src/session/turn_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/codex-rs/core/src/session/turn_tests.rs b/codex-rs/core/src/session/turn_tests.rs index 10043b0dc7..d628f601f8 100644 --- a/codex-rs/core/src/session/turn_tests.rs +++ b/codex-rs/core/src/session/turn_tests.rs @@ -47,6 +47,7 @@ fn post_sampling_token_estimate_is_disabled_by_always_on_sinks() { .with(tracing_subscriber::fmt::layer().with_filter(codex_state::log_db::default_filter())); tracing::subscriber::with_default(subscriber, || { + tracing::callsite::rebuild_interest_cache(); assert!(!tracing::event_enabled!( target: POST_SAMPLING_TOKEN_ESTIMATE_TARGET, tracing::Level::TRACE,