Upgrade httpx after the TCP_NODELAY fixes - #8418
Merged
Amaury Chamayou (achamayou) merged 1 commit intoSep 23, 2026
Merged
Conversation
Eddy Ashton (eddyashton)
added this pull request to stack #8417
September 22, 2026 15:20
Base automatically changed from
agents/tcp-nodelay-client-optimization
to
main
September 22, 2026 17:15
Amaury Chamayou (achamayou)
force-pushed
the
agents/httpx-update-tcp-nodelay-fix
branch
from
September 22, 2026 17:16
81523f4 to
5ed12e1
Compare
Copilot started reviewing on behalf of
Eddy Ashton (eddyashton)
September 22, 2026 17:16
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Restrict the regression to HttpxClient or update alternate transports to honor disabled verification.
Review effort: Lite
Findings: None
What changed in this PR
Upgrades the e2e HTTP client stack to httpx 0.28.x while updating TLS handling and query-encoding tests.
Changes:
- Removes private httpcore integration and updates dependency constraints.
- Builds TLS contexts with client-certificate support.
- Adds TLS regression coverage and reserved-character query tests.
| File | Summary |
|---|---|
tests/requirements.txt |
Updates httpx constraints and removes the httpcore pin. |
tests/infra/clients.py |
Reworks TLS setup and client-certificate loading. |
tests/e2e_logging.py |
Adds TLS/query coverage. Moderate finding (1 vote): the TLS regression may fail for alternate clients before reaching the assertion when verification is disabled. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Amaury Chamayou (achamayou)
approved these changes
Sep 22, 2026
Use explicit SSL contexts to retain client authentication and optional server verification. Encode query test data explicitly rather than relying on old httpx URL normalization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Amaury Chamayou (achamayou)
force-pushed
the
agents/httpx-update-tcp-nodelay-fix
branch
from
September 22, 2026 19:31
5ed12e1 to
3db5e8a
Compare
Amaury Chamayou (achamayou)
deleted the
agents/httpx-update-tcp-nodelay-fix
branch
September 23, 2026 08:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack and intent
Stacked on #8410, targeting
agents/tcp-nodelay-client-optimization, notmain. This is proposed as a later, separate upgrade: #8410 removes Nagle-related delays and fixes tests exposed by faster requests; this PR removes the old httpx pin and addresses additional upgrade compatibility issues. Further upgrade-specific fixes may be needed as CI exercises the wider suite. Retarget tomainafter #8410 merges.Changes
httpx[http2]from 0.23.* to>=0.28.1, <0.29(latest stable). Remove the private httpcore backend injection and its new 0.16.3 pin. Resolved httpcore 1.0.9 sets TCP_NODELAY by default, confirmed in source and on a live httpx socket. Keep RawSocketClient's explicit setting.verify=<CA filename>path returns before loadingcert=, otherwise causing authenticated requests to return 401. Preserveca=None/verify_ca=Falseand add an e2e regression proving client authentication still works with server verification disabled.%20text in our awkward sample. The test now encodes parameter values explicitly, as its exhaustive character cases and curl path already did. Add reserved-character coverage; retain the existing assertions.Long-lived forwarding passes with the inherited #8410 fixes, without further timing changes. JWT tests needed no JWT-specific changes. The query failure was an encoding assumption, not a timing race.
TLS behavior to review
There is no higher-level SSL context being replaced: callers supply certificate filenames and identities, and the transport constructs the context. This follows our raw-socket and Locust patterns. httpcore still configures ALPN.
The upgrade follows Python/new-httpx defaults rather than reproducing every old httpx TLS setting: Common Name fallback is enabled, TLS 1.3 post-handshake authentication is disabled, and cipher selection uses Python/OpenSSL defaults. Minimum TLS remains 1.2 in the tested environment. These client policy differences are distinct from the unchanged server TLS offerings.
Validation
On the rebased branch (base a5850d1):
scripts/ci-checks.shand diff whitespace checks: passed.e2e_logging_http2andprogrammability_and_jwt: passed.e2e_logging: initial run had commit/connection timeouts; three consecutive full reruns passed unchanged. Cause not established; not claiming the initial failure was unrelated.Earlier investigation on the original #8410 head:
client_protocolsTLS scan: old and new clients produced byte-for-byte identical normalized reports. Both fail the golden comparison only on missing ML-KEM groups with local OpenSSL 3.3.7; golden file unchanged.Full repository runtime suite not run; broader CI remains necessary. Test infrastructure only, no product changelog entry.