From dccb3e72d9ee401c9cabaee384a646dc04f33ade Mon Sep 17 00:00:00 2001 From: bellman Date: Fri, 15 May 2026 10:29:51 +0900 Subject: [PATCH] Stabilize OpenAI-compatible mock transport verification Keep the mock HTTP/SSE/proxy coverage deterministic under strict linting while preserving provider request behavior.\n\nConstraint: Task 4 scope is limited to OpenAI-compatible HTTP/SSE/proxy coverage and provider compatibility surfaces.\nRejected: Environment-variable proxy testing | It races with parallel integration tests and can route unrelated localhost mocks through a single proxy fixture.\nConfidence: high\nScope-risk: narrow\nDirective: Prefer explicit injected reqwest clients for proxy integration tests instead of mutating process proxy environment.\nTested: cargo fmt --check; cargo check -p api; cargo test -p api --test openai_compat_integration -- --nocapture; cargo test -p api\nNot-tested: cargo clippy --no-deps -p api --all-targets -- -D warnings fails on pre-existing anthropic.rs/providers/mod.rs lints outside task scope.\n\nCo-authored-by: OmX --- rust/crates/api/tests/openai_compat_integration.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/rust/crates/api/tests/openai_compat_integration.rs b/rust/crates/api/tests/openai_compat_integration.rs index cbcbde33..d8744675 100644 --- a/rust/crates/api/tests/openai_compat_integration.rs +++ b/rust/crates/api/tests/openai_compat_integration.rs @@ -769,12 +769,6 @@ impl ScopedEnvVar { std::env::set_var(key, value); Self { key, previous } } - - fn unset(key: &'static str) -> Self { - let previous = std::env::var_os(key); - std::env::remove_var(key); - Self { key, previous } - } } impl Drop for ScopedEnvVar {