diff --git a/docs/openai-real-chain-request-test.md b/docs/openai-real-chain-request-test.md index 04c81c396..ef914d196 100644 --- a/docs/openai-real-chain-request-test.md +++ b/docs/openai-real-chain-request-test.md @@ -12,7 +12,7 @@ | 场景 | 状态 | 证据 | | --- | --- | --- | | 本地编译检查 | 通过 | `cargo check` | -| 封禁/禁用亲和剥离集成覆盖 | 通过 | `cargo test --test integration proxy::dispatch::chat_upstream::responses_http:: -- --nocapture`;`responses_websocket::` | +| 封禁/禁用亲和剥离集成覆盖 | 通过 | `cargo test --test main proxy::dispatch::chat_upstream::responses_http:: -- --nocapture`;`responses_websocket::` | | 5xx/429/403/402/Cloudflare 重试集成覆盖 | 通过 | `responses_recovery::` 37 个用例;`chat_routes::` 15 个用例;`responses_websocket::` 30 个用例 | | 真实链路基础健康检查 | 通过 | `/debug/diagnostics`:5 accounts,1 active,3 disabled,1 banned | | 真实 Responses 基线请求 | 通过 | `req_e29e505e-4623-4502-9676-922a27c1d247`,`resp_09b95050e9f8ff4b016a3a703bc2f8819a8e248aa2fc31ff4d` | @@ -27,17 +27,17 @@ ## 本地验证记录 - `cargo check`:通过。 -- `cargo test --test integration proxy::dispatch::chat_upstream::responses_recovery:: -- --nocapture`:37 passed,覆盖 Responses HTTP/SSE 的 401/402/403/429、Cloudflare challenge/path-block、5xx same-account retry、模型不支持 fallback、previous_response_id/函数调用/加密 replay 历史剥离。 -- `cargo test --test integration proxy::dispatch::chat_upstream::responses_websocket:: -- --nocapture`:30 passed,覆盖 WebSocket 连接复用、复用连接断开后 fresh retry、previous_response_id fallback、隐式 banned 亲和剥离、quota/rate limit/path-block 边界。 -- `cargo test --test integration proxy::dispatch::chat_upstream::chat_routes:: -- --nocapture`:15 passed,覆盖 Chat Completions 的 401/402/403/429、Cloudflare、模型不支持和 SSE 翻译。 -- `cargo test --test integration proxy::dispatch::chat_upstream::responses_http:: -- --nocapture`:23 passed,覆盖 HTTP Responses 参数转换、cookie path 作用域、banned 亲和剥离、quota 亲和保留和下游断开。 -- `cargo test --test integration upstream::accounts::token_refresh:: -- --nocapture`:13 passed,覆盖 transient retry、ambiguous transport 不重试、invalid_grant 二次确认、retry exhaustion 延后恢复、stale refresh token 防复用。 -- `cargo test --test integration upstream::accounts::account_pool::quota:: -- --nocapture`:9 passed,覆盖 quota/cooldown 选择边界。 -- `cargo test --test integration upstream::accounts::cloudflare:: -- --nocapture`:2 passed,覆盖 Cloudflare cooldown 升级和过期重置。 -- `cargo test --test integration mark_banned -- --nocapture`:5 passed,覆盖 401 `account_deactivated` 和 403 banned 信号将账号标记为 banned。 -- `cargo test --test integration mark_expired_after_401 -- --nocapture`:3 passed,覆盖普通 401 将账号标记为 expired。 -- `cargo test --test integration runtime_account_pool_should_persist_expired_status_when_jwt_expiry_is_discovered -- --nocapture`:通过,覆盖运行时调度发现 active 账号 token 已过期时持久化为 expired。 -- `cargo test --test integration upstream::accounts::account_pool:: -- --nocapture`:27 passed,覆盖账号池调度、quota/cooldown、运行时状态回写。 +- `cargo test --test main proxy::dispatch::chat_upstream::responses_recovery:: -- --nocapture`:37 passed,覆盖 Responses HTTP/SSE 的 401/402/403/429、Cloudflare challenge/path-block、5xx same-account retry、模型不支持 fallback、previous_response_id/函数调用/加密 replay 历史剥离。 +- `cargo test --test main proxy::dispatch::chat_upstream::responses_websocket:: -- --nocapture`:30 passed,覆盖 WebSocket 连接复用、复用连接断开后 fresh retry、previous_response_id fallback、隐式 banned 亲和剥离、quota/rate limit/path-block 边界。 +- `cargo test --test main proxy::dispatch::chat_upstream::chat_routes:: -- --nocapture`:15 passed,覆盖 Chat Completions 的 401/402/403/429、Cloudflare、模型不支持和 SSE 翻译。 +- `cargo test --test main proxy::dispatch::chat_upstream::responses_http:: -- --nocapture`:23 passed,覆盖 HTTP Responses 参数转换、cookie path 作用域、banned 亲和剥离、quota 亲和保留和下游断开。 +- `cargo test --test main upstream::accounts::token_refresh:: -- --nocapture`:13 passed,覆盖 transient retry、ambiguous transport 不重试、invalid_grant 二次确认、retry exhaustion 延后恢复、stale refresh token 防复用。 +- `cargo test --test main upstream::accounts::account_pool::quota:: -- --nocapture`:9 passed,覆盖 quota/cooldown 选择边界。 +- `cargo test --test main upstream::accounts::cloudflare:: -- --nocapture`:2 passed,覆盖 Cloudflare cooldown 升级和过期重置。 +- `cargo test --test main mark_banned -- --nocapture`:5 passed,覆盖 401 `account_deactivated` 和 403 banned 信号将账号标记为 banned。 +- `cargo test --test main mark_expired_after_401 -- --nocapture`:3 passed,覆盖普通 401 将账号标记为 expired。 +- `cargo test --test main runtime_account_pool_should_persist_expired_status_when_jwt_expiry_is_discovered -- --nocapture`:通过,覆盖运行时调度发现 active 账号 token 已过期时持久化为 expired。 +- `cargo test --test main upstream::accounts::account_pool:: -- --nocapture`:27 passed,覆盖账号池调度、quota/cooldown、运行时状态回写。 ## 真实链路记录 diff --git a/tests/integration/admin/accounts/import_export.rs b/tests/admin/accounts/import_export.rs similarity index 100% rename from tests/integration/admin/accounts/import_export.rs rename to tests/admin/accounts/import_export.rs diff --git a/tests/integration/admin/accounts/lifecycle.rs b/tests/admin/accounts/lifecycle.rs similarity index 100% rename from tests/integration/admin/accounts/lifecycle.rs rename to tests/admin/accounts/lifecycle.rs diff --git a/tests/integration/admin/accounts/list.rs b/tests/admin/accounts/list.rs similarity index 100% rename from tests/integration/admin/accounts/list.rs rename to tests/admin/accounts/list.rs diff --git a/tests/integration/admin/accounts/mod.rs b/tests/admin/accounts/mod.rs similarity index 100% rename from tests/integration/admin/accounts/mod.rs rename to tests/admin/accounts/mod.rs diff --git a/tests/integration/admin/accounts/quota.rs b/tests/admin/accounts/quota.rs similarity index 100% rename from tests/integration/admin/accounts/quota.rs rename to tests/admin/accounts/quota.rs diff --git a/tests/integration/admin/auth/mod.rs b/tests/admin/auth/mod.rs similarity index 100% rename from tests/integration/admin/auth/mod.rs rename to tests/admin/auth/mod.rs diff --git a/tests/integration/admin/auth/password.rs b/tests/admin/auth/password.rs similarity index 100% rename from tests/integration/admin/auth/password.rs rename to tests/admin/auth/password.rs diff --git a/tests/integration/admin/auth/session.rs b/tests/admin/auth/session.rs similarity index 100% rename from tests/integration/admin/auth/session.rs rename to tests/admin/auth/session.rs diff --git a/tests/integration/admin/auth/session_routes.rs b/tests/admin/auth/session_routes.rs similarity index 100% rename from tests/integration/admin/auth/session_routes.rs rename to tests/admin/auth/session_routes.rs diff --git a/tests/integration/admin/auth/session_store.rs b/tests/admin/auth/session_store.rs similarity index 100% rename from tests/integration/admin/auth/session_store.rs rename to tests/admin/auth/session_store.rs diff --git a/tests/integration/admin/keys/authorization.rs b/tests/admin/keys/authorization.rs similarity index 100% rename from tests/integration/admin/keys/authorization.rs rename to tests/admin/keys/authorization.rs diff --git a/tests/integration/admin/keys/import_export.rs b/tests/admin/keys/import_export.rs similarity index 100% rename from tests/integration/admin/keys/import_export.rs rename to tests/admin/keys/import_export.rs diff --git a/tests/integration/admin/keys/lifecycle.rs b/tests/admin/keys/lifecycle.rs similarity index 100% rename from tests/integration/admin/keys/lifecycle.rs rename to tests/admin/keys/lifecycle.rs diff --git a/tests/integration/admin/keys/mod.rs b/tests/admin/keys/mod.rs similarity index 100% rename from tests/integration/admin/keys/mod.rs rename to tests/admin/keys/mod.rs diff --git a/tests/integration/admin/keys/store.rs b/tests/admin/keys/store.rs similarity index 100% rename from tests/integration/admin/keys/store.rs rename to tests/admin/keys/store.rs diff --git a/tests/integration/admin/mod.rs b/tests/admin/mod.rs similarity index 100% rename from tests/integration/admin/mod.rs rename to tests/admin/mod.rs diff --git a/tests/integration/admin/models/mod.rs b/tests/admin/models/mod.rs similarity index 100% rename from tests/integration/admin/models/mod.rs rename to tests/admin/models/mod.rs diff --git a/tests/integration/admin/models/routes.rs b/tests/admin/models/routes.rs similarity index 100% rename from tests/integration/admin/models/routes.rs rename to tests/admin/models/routes.rs diff --git a/tests/integration/admin/monitoring/events_store.rs b/tests/admin/monitoring/events_store.rs similarity index 100% rename from tests/integration/admin/monitoring/events_store.rs rename to tests/admin/monitoring/events_store.rs diff --git a/tests/integration/admin/monitoring/logs_routes.rs b/tests/admin/monitoring/logs_routes.rs similarity index 100% rename from tests/integration/admin/monitoring/logs_routes.rs rename to tests/admin/monitoring/logs_routes.rs diff --git a/tests/integration/admin/monitoring/mod.rs b/tests/admin/monitoring/mod.rs similarity index 100% rename from tests/integration/admin/monitoring/mod.rs rename to tests/admin/monitoring/mod.rs diff --git a/tests/integration/admin/response/mod.rs b/tests/admin/response/mod.rs similarity index 100% rename from tests/integration/admin/response/mod.rs rename to tests/admin/response/mod.rs diff --git a/tests/integration/admin/settings/mod.rs b/tests/admin/settings/mod.rs similarity index 100% rename from tests/integration/admin/settings/mod.rs rename to tests/admin/settings/mod.rs diff --git a/tests/integration/admin/settings/routes.rs b/tests/admin/settings/routes.rs similarity index 100% rename from tests/integration/admin/settings/routes.rs rename to tests/admin/settings/routes.rs diff --git a/tests/integration/config/mod.rs b/tests/config/mod.rs similarity index 100% rename from tests/integration/config/mod.rs rename to tests/config/mod.rs diff --git a/tests/integration/fixtures/chat/success.sse b/tests/fixtures/chat/success.sse similarity index 100% rename from tests/integration/fixtures/chat/success.sse rename to tests/fixtures/chat/success.sse diff --git a/tests/integration/fixtures/responses/golden/reasoning_replay_request.json b/tests/fixtures/responses/golden/reasoning_replay_request.json similarity index 100% rename from tests/integration/fixtures/responses/golden/reasoning_replay_request.json rename to tests/fixtures/responses/golden/reasoning_replay_request.json diff --git a/tests/integration/fixtures/responses/http_sse/after_401.sse b/tests/fixtures/responses/http_sse/after_401.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/after_401.sse rename to tests/fixtures/responses/http_sse/after_401.sse diff --git a/tests/integration/fixtures/responses/http_sse/after_402.sse b/tests/fixtures/responses/http_sse/after_402.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/after_402.sse rename to tests/fixtures/responses/http_sse/after_402.sse diff --git a/tests/integration/fixtures/responses/http_sse/after_403.sse b/tests/fixtures/responses/http_sse/after_403.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/after_403.sse rename to tests/fixtures/responses/http_sse/after_403.sse diff --git a/tests/integration/fixtures/responses/http_sse/after_5xx_retry.sse b/tests/fixtures/responses/http_sse/after_5xx_retry.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/after_5xx_retry.sse rename to tests/fixtures/responses/http_sse/after_5xx_retry.sse diff --git a/tests/integration/fixtures/responses/http_sse/after_cloudflare.sse b/tests/fixtures/responses/http_sse/after_cloudflare.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/after_cloudflare.sse rename to tests/fixtures/responses/http_sse/after_cloudflare.sse diff --git a/tests/integration/fixtures/responses/http_sse/after_model_unsupported.sse b/tests/fixtures/responses/http_sse/after_model_unsupported.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/after_model_unsupported.sse rename to tests/fixtures/responses/http_sse/after_model_unsupported.sse diff --git a/tests/integration/fixtures/responses/http_sse/completed_image_usage.sse b/tests/fixtures/responses/http_sse/completed_image_usage.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/completed_image_usage.sse rename to tests/fixtures/responses/http_sse/completed_image_usage.sse diff --git a/tests/integration/fixtures/responses/http_sse/completed_usage.sse b/tests/fixtures/responses/http_sse/completed_usage.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/completed_usage.sse rename to tests/fixtures/responses/http_sse/completed_usage.sse diff --git a/tests/integration/fixtures/responses/http_sse/done_item_completed.sse b/tests/fixtures/responses/http_sse/done_item_completed.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/done_item_completed.sse rename to tests/fixtures/responses/http_sse/done_item_completed.sse diff --git a/tests/integration/fixtures/responses/http_sse/empty_completed.sse b/tests/fixtures/responses/http_sse/empty_completed.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/empty_completed.sse rename to tests/fixtures/responses/http_sse/empty_completed.sse diff --git a/tests/integration/fixtures/responses/http_sse/failed_auth.sse b/tests/fixtures/responses/http_sse/failed_auth.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/failed_auth.sse rename to tests/fixtures/responses/http_sse/failed_auth.sse diff --git a/tests/integration/fixtures/responses/http_sse/failed_model_unsupported.sse b/tests/fixtures/responses/http_sse/failed_model_unsupported.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/failed_model_unsupported.sse rename to tests/fixtures/responses/http_sse/failed_model_unsupported.sse diff --git a/tests/integration/fixtures/responses/http_sse/failed_quota.sse b/tests/fixtures/responses/http_sse/failed_quota.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/failed_quota.sse rename to tests/fixtures/responses/http_sse/failed_quota.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_401.sse b/tests/fixtures/responses/http_sse/stream_after_401.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_401.sse rename to tests/fixtures/responses/http_sse/stream_after_401.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_402.sse b/tests/fixtures/responses/http_sse/stream_after_402.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_402.sse rename to tests/fixtures/responses/http_sse/stream_after_402.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_403.sse b/tests/fixtures/responses/http_sse/stream_after_403.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_403.sse rename to tests/fixtures/responses/http_sse/stream_after_403.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_429.sse b/tests/fixtures/responses/http_sse/stream_after_429.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_429.sse rename to tests/fixtures/responses/http_sse/stream_after_429.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_5xx_retry.sse b/tests/fixtures/responses/http_sse/stream_after_5xx_retry.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_5xx_retry.sse rename to tests/fixtures/responses/http_sse/stream_after_5xx_retry.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_cloudflare.sse b/tests/fixtures/responses/http_sse/stream_after_cloudflare.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_cloudflare.sse rename to tests/fixtures/responses/http_sse/stream_after_cloudflare.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_after_model_unsupported.sse b/tests/fixtures/responses/http_sse/stream_after_model_unsupported.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_after_model_unsupported.sse rename to tests/fixtures/responses/http_sse/stream_after_model_unsupported.sse diff --git a/tests/integration/fixtures/responses/http_sse/stream_usage.sse b/tests/fixtures/responses/http_sse/stream_usage.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/stream_usage.sse rename to tests/fixtures/responses/http_sse/stream_usage.sse diff --git a/tests/integration/fixtures/responses/http_sse/success.sse b/tests/fixtures/responses/http_sse/success.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/success.sse rename to tests/fixtures/responses/http_sse/success.sse diff --git a/tests/integration/fixtures/responses/http_sse/text_deltas_completed.sse b/tests/fixtures/responses/http_sse/text_deltas_completed.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/text_deltas_completed.sse rename to tests/fixtures/responses/http_sse/text_deltas_completed.sse diff --git a/tests/integration/fixtures/responses/http_sse/tuple_object.sse b/tests/fixtures/responses/http_sse/tuple_object.sse similarity index 100% rename from tests/integration/fixtures/responses/http_sse/tuple_object.sse rename to tests/fixtures/responses/http_sse/tuple_object.sse diff --git a/tests/integration/fixtures/responses/websocket/completed_with_reasoning_replay.json b/tests/fixtures/responses/websocket/completed_with_reasoning_replay.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/completed_with_reasoning_replay.json rename to tests/fixtures/responses/websocket/completed_with_reasoning_replay.json diff --git a/tests/integration/fixtures/responses/websocket/first_account_limited.json b/tests/fixtures/responses/websocket/first_account_limited.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/first_account_limited.json rename to tests/fixtures/responses/websocket/first_account_limited.json diff --git a/tests/integration/fixtures/responses/websocket/history_rate_limited.json b/tests/fixtures/responses/websocket/history_rate_limited.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/history_rate_limited.json rename to tests/fixtures/responses/websocket/history_rate_limited.json diff --git a/tests/integration/fixtures/responses/websocket/invalid_encrypted_content.json b/tests/fixtures/responses/websocket/invalid_encrypted_content.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/invalid_encrypted_content.json rename to tests/fixtures/responses/websocket/invalid_encrypted_content.json diff --git a/tests/integration/fixtures/responses/websocket/previous_response_not_found.json b/tests/fixtures/responses/websocket/previous_response_not_found.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/previous_response_not_found.json rename to tests/fixtures/responses/websocket/previous_response_not_found.json diff --git a/tests/integration/fixtures/responses/websocket/rate_limited.json b/tests/fixtures/responses/websocket/rate_limited.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/rate_limited.json rename to tests/fixtures/responses/websocket/rate_limited.json diff --git a/tests/integration/fixtures/responses/websocket/second_account_limited.json b/tests/fixtures/responses/websocket/second_account_limited.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/second_account_limited.json rename to tests/fixtures/responses/websocket/second_account_limited.json diff --git a/tests/integration/fixtures/responses/websocket/token_revoked.json b/tests/fixtures/responses/websocket/token_revoked.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/token_revoked.json rename to tests/fixtures/responses/websocket/token_revoked.json diff --git a/tests/integration/fixtures/responses/websocket/unanswered_function_call.json b/tests/fixtures/responses/websocket/unanswered_function_call.json similarity index 100% rename from tests/integration/fixtures/responses/websocket/unanswered_function_call.json rename to tests/fixtures/responses/websocket/unanswered_function_call.json diff --git a/tests/integration/http/mod.rs b/tests/http/mod.rs similarity index 100% rename from tests/integration/http/mod.rs rename to tests/http/mod.rs diff --git a/tests/integration/http/trace_middleware/mod.rs b/tests/http/trace_middleware/mod.rs similarity index 100% rename from tests/integration/http/trace_middleware/mod.rs rename to tests/http/trace_middleware/mod.rs diff --git a/tests/integration/http/web_assets/mod.rs b/tests/http/web_assets/mod.rs similarity index 100% rename from tests/integration/http/web_assets/mod.rs rename to tests/http/web_assets/mod.rs diff --git a/tests/integration/infra/crypto/mod.rs b/tests/infra/crypto/mod.rs similarity index 100% rename from tests/integration/infra/crypto/mod.rs rename to tests/infra/crypto/mod.rs diff --git a/tests/integration/infra/log_rotation/mod.rs b/tests/infra/log_rotation/mod.rs similarity index 100% rename from tests/integration/infra/log_rotation/mod.rs rename to tests/infra/log_rotation/mod.rs diff --git a/tests/integration/infra/mod.rs b/tests/infra/mod.rs similarity index 100% rename from tests/integration/infra/mod.rs rename to tests/infra/mod.rs diff --git a/tests/integration/infra/storage_schema/mod.rs b/tests/infra/storage_schema/mod.rs similarity index 100% rename from tests/integration/infra/storage_schema/mod.rs rename to tests/infra/storage_schema/mod.rs diff --git a/tests/integration/main.rs b/tests/main.rs similarity index 100% rename from tests/integration/main.rs rename to tests/main.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/chat_routes.rs b/tests/proxy/dispatch/chat_upstream/chat_routes.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/chat_routes.rs rename to tests/proxy/dispatch/chat_upstream/chat_routes.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/compact_routes.rs b/tests/proxy/dispatch/chat_upstream/compact_routes.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/compact_routes.rs rename to tests/proxy/dispatch/chat_upstream/compact_routes.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/mod.rs b/tests/proxy/dispatch/chat_upstream/mod.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/mod.rs rename to tests/proxy/dispatch/chat_upstream/mod.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/responses_http.rs b/tests/proxy/dispatch/chat_upstream/responses_http.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/responses_http.rs rename to tests/proxy/dispatch/chat_upstream/responses_http.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/responses_recovery.rs b/tests/proxy/dispatch/chat_upstream/responses_recovery.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/responses_recovery.rs rename to tests/proxy/dispatch/chat_upstream/responses_recovery.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/responses_websocket.rs b/tests/proxy/dispatch/chat_upstream/responses_websocket.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/responses_websocket.rs rename to tests/proxy/dispatch/chat_upstream/responses_websocket.rs diff --git a/tests/integration/proxy/dispatch/chat_upstream/usage_logging.rs b/tests/proxy/dispatch/chat_upstream/usage_logging.rs similarity index 100% rename from tests/integration/proxy/dispatch/chat_upstream/usage_logging.rs rename to tests/proxy/dispatch/chat_upstream/usage_logging.rs diff --git a/tests/integration/proxy/dispatch/mod.rs b/tests/proxy/dispatch/mod.rs similarity index 100% rename from tests/integration/proxy/dispatch/mod.rs rename to tests/proxy/dispatch/mod.rs diff --git a/tests/integration/proxy/dispatch/session_affinity.rs b/tests/proxy/dispatch/session_affinity.rs similarity index 100% rename from tests/integration/proxy/dispatch/session_affinity.rs rename to tests/proxy/dispatch/session_affinity.rs diff --git a/tests/integration/proxy/dispatch/session_affinity_integration.rs b/tests/proxy/dispatch/session_affinity_integration.rs similarity index 100% rename from tests/integration/proxy/dispatch/session_affinity_integration.rs rename to tests/proxy/dispatch/session_affinity_integration.rs diff --git a/tests/integration/proxy/keys/auth.rs b/tests/proxy/keys/auth.rs similarity index 100% rename from tests/integration/proxy/keys/auth.rs rename to tests/proxy/keys/auth.rs diff --git a/tests/integration/proxy/keys/mod.rs b/tests/proxy/keys/mod.rs similarity index 100% rename from tests/integration/proxy/keys/mod.rs rename to tests/proxy/keys/mod.rs diff --git a/tests/integration/proxy/mod.rs b/tests/proxy/mod.rs similarity index 100% rename from tests/integration/proxy/mod.rs rename to tests/proxy/mod.rs diff --git a/tests/integration/proxy/openai/diagnostics_routes.rs b/tests/proxy/openai/diagnostics_routes.rs similarity index 100% rename from tests/integration/proxy/openai/diagnostics_routes.rs rename to tests/proxy/openai/diagnostics_routes.rs diff --git a/tests/integration/proxy/openai/mod.rs b/tests/proxy/openai/mod.rs similarity index 100% rename from tests/integration/proxy/openai/mod.rs rename to tests/proxy/openai/mod.rs diff --git a/tests/integration/proxy/openai/models_routes.rs b/tests/proxy/openai/models_routes.rs similarity index 100% rename from tests/integration/proxy/openai/models_routes.rs rename to tests/proxy/openai/models_routes.rs diff --git a/tests/integration/proxy/openai/responses_routes.rs b/tests/proxy/openai/responses_routes.rs similarity index 100% rename from tests/integration/proxy/openai/responses_routes.rs rename to tests/proxy/openai/responses_routes.rs diff --git a/tests/integration/runtime/account_pool_restore/mod.rs b/tests/runtime/account_pool_restore/mod.rs similarity index 100% rename from tests/integration/runtime/account_pool_restore/mod.rs rename to tests/runtime/account_pool_restore/mod.rs diff --git a/tests/integration/runtime/mod.rs b/tests/runtime/mod.rs similarity index 100% rename from tests/integration/runtime/mod.rs rename to tests/runtime/mod.rs diff --git a/tests/integration/runtime/services.rs b/tests/runtime/services.rs similarity index 100% rename from tests/integration/runtime/services.rs rename to tests/runtime/services.rs diff --git a/tests/integration/runtime/tasks/cleanup.rs b/tests/runtime/tasks/cleanup.rs similarity index 100% rename from tests/integration/runtime/tasks/cleanup.rs rename to tests/runtime/tasks/cleanup.rs diff --git a/tests/integration/runtime/tasks/coordinator.rs b/tests/runtime/tasks/coordinator.rs similarity index 100% rename from tests/integration/runtime/tasks/coordinator.rs rename to tests/runtime/tasks/coordinator.rs diff --git a/tests/integration/runtime/tasks/fingerprint.rs b/tests/runtime/tasks/fingerprint.rs similarity index 100% rename from tests/integration/runtime/tasks/fingerprint.rs rename to tests/runtime/tasks/fingerprint.rs diff --git a/tests/integration/runtime/tasks/mod.rs b/tests/runtime/tasks/mod.rs similarity index 100% rename from tests/integration/runtime/tasks/mod.rs rename to tests/runtime/tasks/mod.rs diff --git a/tests/integration/runtime/tasks/model_refresh.rs b/tests/runtime/tasks/model_refresh.rs similarity index 100% rename from tests/integration/runtime/tasks/model_refresh.rs rename to tests/runtime/tasks/model_refresh.rs diff --git a/tests/integration/support/config.rs b/tests/support/config.rs similarity index 100% rename from tests/integration/support/config.rs rename to tests/support/config.rs diff --git a/tests/integration/support/mod.rs b/tests/support/mod.rs similarity index 100% rename from tests/integration/support/mod.rs rename to tests/support/mod.rs diff --git a/tests/integration/support/sqlite.rs b/tests/support/sqlite.rs similarity index 100% rename from tests/integration/support/sqlite.rs rename to tests/support/sqlite.rs diff --git a/tests/integration/upstream/accounts/account_pool/mod.rs b/tests/upstream/accounts/account_pool/mod.rs similarity index 100% rename from tests/integration/upstream/accounts/account_pool/mod.rs rename to tests/upstream/accounts/account_pool/mod.rs diff --git a/tests/integration/upstream/accounts/account_pool/quota.rs b/tests/upstream/accounts/account_pool/quota.rs similarity index 100% rename from tests/integration/upstream/accounts/account_pool/quota.rs rename to tests/upstream/accounts/account_pool/quota.rs diff --git a/tests/integration/upstream/accounts/account_pool/selection.rs b/tests/upstream/accounts/account_pool/selection.rs similarity index 100% rename from tests/integration/upstream/accounts/account_pool/selection.rs rename to tests/upstream/accounts/account_pool/selection.rs diff --git a/tests/integration/upstream/accounts/account_pool/usage_window.rs b/tests/upstream/accounts/account_pool/usage_window.rs similarity index 100% rename from tests/integration/upstream/accounts/account_pool/usage_window.rs rename to tests/upstream/accounts/account_pool/usage_window.rs diff --git a/tests/integration/upstream/accounts/account_repository.rs b/tests/upstream/accounts/account_repository.rs similarity index 100% rename from tests/integration/upstream/accounts/account_repository.rs rename to tests/upstream/accounts/account_repository.rs diff --git a/tests/integration/upstream/accounts/cloudflare.rs b/tests/upstream/accounts/cloudflare.rs similarity index 100% rename from tests/integration/upstream/accounts/cloudflare.rs rename to tests/upstream/accounts/cloudflare.rs diff --git a/tests/integration/upstream/accounts/cookies.rs b/tests/upstream/accounts/cookies.rs similarity index 100% rename from tests/integration/upstream/accounts/cookies.rs rename to tests/upstream/accounts/cookies.rs diff --git a/tests/integration/upstream/accounts/mod.rs b/tests/upstream/accounts/mod.rs similarity index 100% rename from tests/integration/upstream/accounts/mod.rs rename to tests/upstream/accounts/mod.rs diff --git a/tests/integration/upstream/accounts/quota_refresh.rs b/tests/upstream/accounts/quota_refresh.rs similarity index 100% rename from tests/integration/upstream/accounts/quota_refresh.rs rename to tests/upstream/accounts/quota_refresh.rs diff --git a/tests/integration/upstream/accounts/refresh_leases.rs b/tests/upstream/accounts/refresh_leases.rs similarity index 100% rename from tests/integration/upstream/accounts/refresh_leases.rs rename to tests/upstream/accounts/refresh_leases.rs diff --git a/tests/integration/upstream/accounts/token_refresh/failures.rs b/tests/upstream/accounts/token_refresh/failures.rs similarity index 100% rename from tests/integration/upstream/accounts/token_refresh/failures.rs rename to tests/upstream/accounts/token_refresh/failures.rs diff --git a/tests/integration/upstream/accounts/token_refresh/mod.rs b/tests/upstream/accounts/token_refresh/mod.rs similarity index 100% rename from tests/integration/upstream/accounts/token_refresh/mod.rs rename to tests/upstream/accounts/token_refresh/mod.rs diff --git a/tests/integration/upstream/accounts/token_refresh/scheduling.rs b/tests/upstream/accounts/token_refresh/scheduling.rs similarity index 100% rename from tests/integration/upstream/accounts/token_refresh/scheduling.rs rename to tests/upstream/accounts/token_refresh/scheduling.rs diff --git a/tests/integration/upstream/accounts/token_refresh/success.rs b/tests/upstream/accounts/token_refresh/success.rs similarity index 100% rename from tests/integration/upstream/accounts/token_refresh/success.rs rename to tests/upstream/accounts/token_refresh/success.rs diff --git a/tests/integration/upstream/fingerprint/mod.rs b/tests/upstream/fingerprint/mod.rs similarity index 100% rename from tests/integration/upstream/fingerprint/mod.rs rename to tests/upstream/fingerprint/mod.rs diff --git a/tests/integration/upstream/fingerprint_integration/mod.rs b/tests/upstream/fingerprint_integration/mod.rs similarity index 100% rename from tests/integration/upstream/fingerprint_integration/mod.rs rename to tests/upstream/fingerprint_integration/mod.rs diff --git a/tests/integration/upstream/mod.rs b/tests/upstream/mod.rs similarity index 100% rename from tests/integration/upstream/mod.rs rename to tests/upstream/mod.rs diff --git a/tests/integration/upstream/models/catalog.rs b/tests/upstream/models/catalog.rs similarity index 100% rename from tests/integration/upstream/models/catalog.rs rename to tests/upstream/models/catalog.rs diff --git a/tests/integration/upstream/models/mod.rs b/tests/upstream/models/mod.rs similarity index 100% rename from tests/integration/upstream/models/mod.rs rename to tests/upstream/models/mod.rs diff --git a/tests/integration/upstream/models/store.rs b/tests/upstream/models/store.rs similarity index 100% rename from tests/integration/upstream/models/store.rs rename to tests/upstream/models/store.rs diff --git a/tests/integration/upstream/protocol/codex_websocket.rs b/tests/upstream/protocol/codex_websocket.rs similarity index 100% rename from tests/integration/upstream/protocol/codex_websocket.rs rename to tests/upstream/protocol/codex_websocket.rs diff --git a/tests/integration/upstream/protocol/mod.rs b/tests/upstream/protocol/mod.rs similarity index 100% rename from tests/integration/upstream/protocol/mod.rs rename to tests/upstream/protocol/mod.rs diff --git a/tests/integration/upstream/protocol/openai_chat.rs b/tests/upstream/protocol/openai_chat.rs similarity index 100% rename from tests/integration/upstream/protocol/openai_chat.rs rename to tests/upstream/protocol/openai_chat.rs diff --git a/tests/integration/upstream/protocol/openai_responses.rs b/tests/upstream/protocol/openai_responses.rs similarity index 100% rename from tests/integration/upstream/protocol/openai_responses.rs rename to tests/upstream/protocol/openai_responses.rs diff --git a/tests/integration/upstream/protocol/usage_rate_limits.rs b/tests/upstream/protocol/usage_rate_limits.rs similarity index 100% rename from tests/integration/upstream/protocol/usage_rate_limits.rs rename to tests/upstream/protocol/usage_rate_limits.rs diff --git a/tests/integration/upstream/token_client.rs b/tests/upstream/token_client.rs similarity index 100% rename from tests/integration/upstream/token_client.rs rename to tests/upstream/token_client.rs diff --git a/tests/integration/upstream/transport/client.rs b/tests/upstream/transport/client.rs similarity index 100% rename from tests/integration/upstream/transport/client.rs rename to tests/upstream/transport/client.rs diff --git a/tests/integration/upstream/transport/headers.rs b/tests/upstream/transport/headers.rs similarity index 100% rename from tests/integration/upstream/transport/headers.rs rename to tests/upstream/transport/headers.rs diff --git a/tests/integration/upstream/transport/http_client.rs b/tests/upstream/transport/http_client.rs similarity index 100% rename from tests/integration/upstream/transport/http_client.rs rename to tests/upstream/transport/http_client.rs diff --git a/tests/integration/upstream/transport/mod.rs b/tests/upstream/transport/mod.rs similarity index 100% rename from tests/integration/upstream/transport/mod.rs rename to tests/upstream/transport/mod.rs diff --git a/tests/integration/upstream/transport/websocket.rs b/tests/upstream/transport/websocket.rs similarity index 100% rename from tests/integration/upstream/transport/websocket.rs rename to tests/upstream/transport/websocket.rs diff --git a/tests/integration/upstream/transport/websocket_pool.rs b/tests/upstream/transport/websocket_pool.rs similarity index 100% rename from tests/integration/upstream/transport/websocket_pool.rs rename to tests/upstream/transport/websocket_pool.rs