Skip to content

Add client settings for application-supplied transports - #9

Merged
kdubb merged 3 commits into
mainfrom
codex/server-client-config
Oct 6, 2026
Merged

kdubb merged 3 commits into
mainfrom
codex/server-client-config

Conversation

@kdubb

@kdubb kdubb commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Generated client factories need transport-independent settings while the application chooses its installed HTTP transport. This adds narrow runtime credential families and immutable resolved settings, including operation bindings and a prepared token manager. OAuth provider construction remains application-selected; construction does not acquire tokens. Existing transport constructors remain available, and applications retain lifecycle ownership.

The settings resolver preserves complete security alternatives, rejects incompatible credentials, resolves relative endpoint metadata, and isolates managers between configurations.

Adds HttpxTransport.from_settings for caller-owned clients and keeps core imports independent of HTTPX. Validation: Ruff formatting/lint, strict mypy across source/tests/tools, and 479 tests passed; coverage is 92.19%.

This is the runtime prerequisite for generated server configuration factories. A runtime release must be published and verified before the generator updates its dependency pin.

kdubb added 2 commits October 5, 2026 20:02
Prepare immutable endpoint and operation security settings before application transport factories. Add narrow credential families, the HTTPX adapter, and lifecycle and isolation regression coverage.
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Adds new client configuration and credential types to the public API.

The PR appears safe to merge; both previous findings are fixed and no new blocking issue was found.

What we checked:

  • Selected scopes stay separate: resolve keeps the complete selected binding. TokenManager includes the requested scopes in its cache key, so different scopes use separate entries.

Summary

Adds transport-independent credentials and immutable ClientSettings for application-supplied transports.

  • Resolves complete security alternatives and prepares a token manager without acquiring tokens.
  • Adds HttpxTransport.from_settings for caller-owned HTTPX clients.
  • The follow-up fixes both previous unnumbered findings: URL comparison now uses HTTPX normalization, and AuthorizationGrant again documents the application's checks and one-time use.
  • No new actionable issues were found in the changes since the previous review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Application credentials and endpoint] --> B[ClientSettings.resolve]
  B --> C[Selected bindings]
  B --> D[Prepared TokenManager]
  E[Caller-owned HTTPX client] --> F[HttpxTransport.from_settings]
  D --> F
  C --> G[Generated operations]
  G --> F
Loading

Reviews (2) · Last reviewed commit: "Validate complete settings selections an..."

Comment thread src/sunday/httpx/_transport.py Outdated
Comment thread src/sunday/credentials.py Outdated
@kdubb
kdubb merged commit 19d76ed into main Oct 6, 2026
6 checks passed
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