Skip to content

TX-N7B — Add concrete HTTP client package - #2

Draft
coenttb wants to merge 9 commits into
mainfrom
feature/tx-n7b-http-client
Draft

coenttb wants to merge 9 commits into
mainfrom
feature/tx-n7b-http-client

Conversation

@coenttb

@coenttb coenttb commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the source-only concrete HTTP client on the public checked-out bounded-pool owner.

Related to #1.

Current source head

HTTP Client 710ecba54f5e2e315faad4e563a9aea40b30497d is the current pre-launch source head.

Per the 2026-08-11 principal ruling, every Package.swift dependency follows branch: "main" until tag launch on 14 September. Exact SHAs belong only in the frozen graph receipt.

Requirement map:

  • swift-http-body: revision: "0f670ceb05701fbaaea9141342ba295d20ca4ee8"branch: "main"
  • swift-pool-primitives: revision: "b7c710c945b7c8467b4521c3a2d5b00539275593"branch: "main"
  • swift-io: revision: "271da4dee53063379776337a6a3b1be21751babb"branch: "main"
  • swift-sockets: revision: "74a57fa388e07e09f985fee89075577993c75c5b"branch: "main"
  • swift-tls: revision: "e27e99f5c841170593dde7b0396e9090a7515f62"branch: "main"

The corrective successor changes only Package.swift. All N5 source, products, targets, and settings remain unchanged; Package.resolved remains untouched.

Pool and exchange ownership

The private swift-pools / Pool.Lease facade and now-unused Either dependency are removed. HTTP.Client stores Pool.Bounded<Connection> directly and checks out the deliberately non-Sendable handle by sending. Connection, its nominal operation, and its result are move-only. One attempt consumes one move-only request and returns a sending move-only response. Every checked-out handle is consumed by resolve: reusable and invalid success carry the response through terminal pool cleanup, while failure carries the typed client error through invalidation. Concurrent shutdown therefore cannot erase an already-produced response.

The connection operation is not @Sendable: it belongs to the exclusively checked-out move-only connection and is never independently shared. Retry policy remains @Sendable because it is reusable immutable policy over copyable request-head/error state.

Retry disposition

Only .none is replayable: HTTP Client retains the copyable request head and reconstructs one fresh body-free request for each eligible idempotent attempt. .bytes and .stream are consumed by exactly one attempt because HTTP Body exposes no producer-owned replay factory. No request is copied, retained after consumption, captured by a reusable closure, or hidden in a box.

Architecture constraints

TLS.Peer.Identity remains the sole DNS-query/hostname relation. No private pool facade, compatibility lease, SPI, trait, public with* API, unchecked conformance, request box, or local stream wrapper was added.

UNVERIFIED — full source-only moratorium: no build, test, resolve, update, clean, run, compose, verify, typecheck, lint, compiler probe, CI read/watch/poll, or Package.resolved operation was performed.

@coenttb

coenttb commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Sockets exact-pin successor

Head ddb8569d42868c7be43c138981ad1e75328e8140 changes only Package.swift, pinning Sockets 74a57fa388e07e09f985fee89075577993c75c5b exactly. Static producer/client inspection found no HTTP Client dependency on the changed Listener/Accepted/listener-capability lifecycle, so no source adaptation is owned here. The direct Pool.Bounded checked-out-handle work from 5e298615b24fa7a61d9fe96c800be19a563eba78 is preserved unchanged.

UNVERIFIED - full source-only moratorium remained in force; Package.resolved was untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant