Route environment registry requests through the shared HTTP client (#35034)

## Why

Noise environment registry requests need to follow the exec server's effective
outbound proxy policy without exposing registry URLs or response headers in HTTP
diagnostics.

## What changed

- Build the registry client from the supplied `HttpClientFactory` and use a
  route-aware API client with redirects and request logging disabled.
- Defer construction of the Noise connection provider until the outbound HTTP
  policy is available.
- Map route-aware request failures into registry errors while retaining timeout
  detection across response body reads.

## Testing

Add coverage for system-proxy routing, sensitive registry metadata redaction,
stalled response-body timeouts, and prepared Noise configuration validation.

GitOrigin-RevId: d312dfe037f72732085bf38109af44df76ed0b53
This commit is contained in:
Celia Chen authored and copyberry committed 2026-07-23 23:25:53 +00:00
1 parent 41775559ca
commit d45055ae58
7 files changed
+385 -40

No files matched your search

+3 -3
View File
@@ -597,12 +597,12 @@ fn is_retryable_registry_error(error: &ExecServerError) -> bool {
error,
ExecServerError::EnvironmentRegistryHttp { status, code, .. }
if status.is_server_error()
|| *status == reqwest::StatusCode::REQUEST_TIMEOUT
|| *status == reqwest::StatusCode::TOO_MANY_REQUESTS
|| *status == http::StatusCode::REQUEST_TIMEOUT
|| *status == http::StatusCode::TOO_MANY_REQUESTS
// TODO: Replace this coarse retry with an explicit registry/presence
// recovery FSM so `environment_offline` is retried only while the
// executor is expected to reconnect.
|| (*status == reqwest::StatusCode::CONFLICT
|| (*status == http::StatusCode::CONFLICT
&& code.as_deref() == Some("environment_offline"))
)
}