Lightweight coding agent that runs in your terminal
Rust
app-server: fix Bazel clippy in tracing tests (#18872)
Ruslan Nigmatullin56375712e3bb
diff --git a/codex-rs/app-server/src/message_processor/tracing_tests.rs b/codex-rs/app-server/src/message_processor/tracing_tests.rsindex 83f8bc98d7..46df356b32 100644--- a/codex-rs/app-server/src/message_processor/tracing_tests.rs+++ b/codex-rs/app-server/src/message_processor/tracing_tests.rs@@ -40,6 +40,7 @@ use opentelemetry_sdk::trace::InMemorySpanExporter;use opentelemetry_sdk::trace::SdkTracerProvider;use opentelemetry_sdk::trace::SpanData;use pretty_assertions::assert_eq;+use serial_test::serial;use std::collections::BTreeMap;use std::path::Path;use std::sync::Arc;@@ -101,11 +102,6 @@ fn request_from_client_request(request: ClientRequest) -> JSONRPCRequest {.expect("client request should convert to JSON-RPC")}-fn tracing_test_guard() -> &'static tokio::sync::Mutex<()> {- static GUARD: OnceLock<tokio::sync::Mutex<()>> = OnceLock::new();- GUARD.get_or_init(|| tokio::sync::Mutex::new(()))-}-struct TracingHarness {_server: MockServer,_codex_home: TempDir,@@ -505,12 +501,8 @@ where}#[tokio::test(flavor = "current_thread")]-#[expect(- clippy::await_holding_invalid_type,- reason = "test serializes access to global tracing state for its full duration"-)]+#[serial(app_server_tracing)]async fn thread_start_jsonrpc_span_exports_server_span_and_parents_children() -> Result<()> {- let _guard = tracing_test_guard().lock().await;let mut harness = TracingHarness::new().await?;let RemoteTrace {@@ -588,12 +580,8 @@ async fn thread_start_jsonrpc_span_exports_server_span_and_parents_children() ->}#[tokio::test(flavor = "current_thread")]-#[expect(- clippy::await_holding_invalid_type,- reason = "test serializes access to global tracing state for its full duration"-)]+#[serial(app_server_tracing)]async fn turn_start_jsonrpc_span_parents_core_turn_spans() -> Result<()> {- let _guard = tracing_test_guard().lock().await;let mut harness = TracingHarness::new().await?;let thread_start_response = harness.start_thread(/*request_id*/ 2, /*trace*/ None).await;let thread_id = thread_start_response.thread.id.clone();