[codex] add sync Python HTTP client - #14
Merged
Merged
Conversation
|
✅ Clean PR, @calvin-archastro! No blocking findings on
Reply |
calvin-archastro
force-pushed
the
ci/publish-release-regen-workflows
branch
3 times, most recently
from
June 12, 2026 17:51
db2ff3f to
ff1daac
Compare
calvin-archastro
force-pushed
the
ci/publish-release-regen-workflows
branch
from
June 12, 2026 18:35
ff1daac to
4d83d2e
Compare
calvin-archastro
marked this pull request as ready for review
June 12, 2026 18:42
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.
What changed
This adds only the hand-maintained synchronous HTTP runtime support needed by regenerated Python SDK output.
SyncHttpClientbeside the existing asyncHttpClient.tests/test_http_client.pywith focused sync HTTP coverage.No generated SDK files, demos, README usage changes, or generated contract tests are included in this PR.
Diagrams
sequenceDiagram participant Resource as Generated sync resource participant Runtime as SyncHttpClient participant API as Platform API Resource->>Runtime: request path method body query Runtime->>API: HTTP request with bearer token alt token expired API-->>Runtime: HTTP 401 Runtime->>Runtime: call refresh handler Runtime->>API: retry request else success API-->>Runtime: JSON response end Runtime-->>Resource: parsed valueclassDiagram class SyncHttpClient { request(path, method, body, headers, query) request_raw(path, method, body, headers, query) set_access_token(token) set_refresh_handler(handler) close() } class HttpClient { async request(path, method, body, headers, query) async request_raw(path, method, body, headers, query) set_access_token(token) set_refresh_handler(handler) async close() } class GeneratedResource { method() } GeneratedResource ..> SyncHttpClient : usesScope
Python SDK runtime only.
Risk assessment
Medium. This adds a new runtime path for generated sync resources, but it is isolated from the existing async
HttpClientand covered with focused unit tests.User impact
No immediate public API change in this PR alone. Once generator output is regenerated, sync
PlatformClientresources can call this runtime directly.Testing
Passed locally:
PYTHONDONTWRITEBYTECODE=1 uv run pytest tests/test_http_client.py -p no:cacheprovideruv run ruff check src/archastro/platform/runtime/http_client.py tests/test_http_client.pyuv run ruff format --check src/archastro/platform/runtime/http_client.py tests/test_http_client.pygit diff --checkFollow-ups and known issues