Honor system proxy settings in the daemon updater (#34495)

## Why

The PID-managed daemon updater downloaded the standalone installer directly,
bypassing Codex's configured outbound proxy policy.

## What changed

- Build the updater's HTTP client from the effective Codex configuration so
  `features.respect_system_proxy` also applies to installer downloads.
- Use the route-aware client pool for the installer request.
- Warn and fall back to the default `reqwest` proxy behavior when configuration
  cannot be loaded, allowing updates to continue.

## Testing

Added tests for proxy-policy selection, configuration-load fallback, exact
installer URL usage, byte preservation, and non-success HTTP responses.

GitOrigin-RevId: 559668eb40314d43afa6512da66e59e32cc1b93c
This commit is contained in:
Michael Bolin authored and copyberry committed 2026-07-21 08:50:21 +00:00
1 parent 0e15c31d91
commit 99eb575649
8 files changed
+191 -19

No files matched your search

+4 -2
View File
@@ -231,9 +231,11 @@ pub async fn set_remote_control(mode: RemoteControlMode) -> Result<RemoteControl
Daemon::from_environment()?.set_remote_control(mode).await
}
pub async fn run_pid_update_loop() -> Result<()> {
pub async fn run_pid_update_loop(
http_client_factory: codex_http_client::HttpClientFactory,
) -> Result<()> {
ensure_supported_platform()?;
update_loop::run().await
update_loop::run(http_client_factory).await
}
#[cfg(unix)]