Decouple exec-server HTTP from reqwest types (#35059)

## What changed

- Rename `ReqwestHttpClient` to `RouteAwareHttpClient` to reflect that delegated HTTP uses Codex's shared route-aware transport.
- Use `codex_http_client` response and error types plus transport-neutral `http` and `url` types, removing the exec server's direct `reqwest` dependency.

## Testing

- Cover fragment stripping and Unicode hostname normalization for delegated HTTP requests.

GitOrigin-RevId: 8b0fc60a76004feb57198bfb4afb1371c9ceb1bd
This commit is contained in:
Celia Chen authored and copyberry committed 2026-07-24 00:53:05 +00:00
1 parent 94ebae725e
commit 09241ae4db
18 files changed
+175 -64

No files matched your search

@@ -6,7 +6,7 @@ use super::*;
use crate::protocol::ExecOutputStream;
use crate::protocol::ProcessOutputChunk;
fn registry_error(status: reqwest::StatusCode, code: Option<&str>) -> ExecServerError {
fn registry_error(status: http::StatusCode, code: Option<&str>) -> ExecServerError {
ExecServerError::EnvironmentRegistryHttp {
status,
code: code.map(str::to_string),
@@ -37,7 +37,7 @@ fn registry_recovery_retry_delay_exponentially_backs_off_and_caps() {
#[test]
fn recovery_retries_transient_registry_errors() {
let error = registry_error(reqwest::StatusCode::TOO_MANY_REQUESTS, /*code*/ None);
let error = registry_error(http::StatusCode::TOO_MANY_REQUESTS, /*code*/ None);
assert!(is_retryable_registry_error(&error));
assert!(is_retryable_recovery_error(&error));
@@ -45,7 +45,7 @@ fn recovery_retries_transient_registry_errors() {
#[test]
fn recovery_retries_environment_offline_conflicts() {
let error = registry_error(reqwest::StatusCode::CONFLICT, Some("environment_offline"));
let error = registry_error(http::StatusCode::CONFLICT, Some("environment_offline"));
assert!(is_retryable_registry_error(&error));
assert!(is_retryable_recovery_error(&error));
@@ -53,7 +53,7 @@ fn recovery_retries_environment_offline_conflicts() {
#[test]
fn recovery_does_not_retry_other_registry_conflicts() {
let error = registry_error(reqwest::StatusCode::CONFLICT, Some("registration_conflict"));
let error = registry_error(http::StatusCode::CONFLICT, Some("registration_conflict"));
assert!(!is_retryable_registry_error(&error));
assert!(!is_retryable_recovery_error(&error));