release: 0.12.0#382
Open
stainless-app[bot] wants to merge 10 commits into
Open
Conversation
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Declan Brady <declan.brady@scale.com> Co-authored-by: Michael Chou <michael.chou@scale.com>
…ts adapter (#375) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…test + debugpy) (#379)
…nc + temporal) (#377) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Automated Release PR
0.12.0 (2026-05-30)
Full Changelog: v0.11.5...v0.12.0
Features
Bug Fixes
Performance Improvements
Chores
Refactors
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Greptile Summary
This release PR (0.12.0) bundles several independent improvements: per-event-loop httpx keepalive in the tracing layer (replacing the previous "disable keepalive entirely" workaround), a new
data_converterkwarg threaded through the Temporal client/worker/ACP stack for OpenAI-Agents-plugin compatibility, promotion of protocol types toagentex.protocol.*, and new OpenAI Agents SDK local-sandbox tutorial examples.span_queue.py, processors): the drain loop now lingers up to 100 ms to coalesce spans into larger batches; httpx keepalive is re-enabled via per-event-loopWeakKeyDictionarycaches in bothAgentexAsyncTracingProcessorandSGPAsyncTracingProcessor, eliminating the TLS-handshake-per-span overhead while preserving cross-loop safety.data_converterkwarg (worker.py,temporal_client.py,fastacp.py): callers can now pass a fully assembledDataConverter(e.g. one that composesOpenAIPayloadConverterwith a custom codec); mutual exclusion withpayload_codecis validated at both the config layer (TemporalACPConfig) andget_temporal_client.agentex.protocol.*):RPCMethod,CreateTaskParams, etc. are moved to a slim pydantic-only package; old import paths are kept as back-compat shims;cleaned_atis added to all task response types.Confidence Score: 4/5
Safe to merge; the core tracing and Temporal changes are well-tested and logically sound.
The keepalive-with-id() approach in TracingModule works correctly in the primary Temporal-worker deployment (long-lived loop, id never changes), but the safety comment overstates the guarantee for sync-ACP contexts where loop identity can recycle — the processors were correctly updated to WeakKeyDictionary while this path was not. All other changes (retry logic, data_converter plumbing, protocol promotion, lazy debugpy) are straightforward and fully tested.
src/agentex/lib/adk/_modules/tracing.py — the id(loop)-based cross-loop guard is inconsistent with the WeakKeyDictionary approach adopted in the processors and may not hold if the module is ever used outside long-lived Temporal workers.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph Tracing["Tracing (per-event-loop keepalive)"] SP[Span enqueued] --> SQ[AsyncSpanQueue\nlinger_ms=100] SQ --> DL{Drain loop\nbatch coalesce} DL -->|START batch| PAR[asyncio.gather] DL -->|END batch| PAR PAR --> AGX[AgentexAsyncTracingProcessor\nWeakKeyDict loop→client] PAR --> SGP[SGPAsyncTracingProcessor\nWeakKeyDict loop→client] AGX -->|transient 429/5xx| RE[_reenqueue\nattempts+1] SGP -->|transient 429/5xx| RE RE --> SQ end subgraph Temporal["Temporal data_converter plumbing"] WC[TemporalACPConfig\ndata_converter OR payload_codec] --> FA[FastACP.create] FA --> TA[TemporalACP] TA --> TC[TemporalClient.create] TC --> GTC[get_temporal_client] GTC -->|data_converter set| CC[Client.connect\ndata_converter=dc] GTC -->|no openai plugin| PD[pydantic_data_converter\n+ optional codec] GTC -->|openai plugin + data_converter| CC AW[AgentexWorker\ndata_converter] --> GTC endComments Outside Diff (1)
src/agentex/lib/adk/_modules/tracing.py, line 67-81 (link)The comment here claims "Cross-loop safety is preserved by rebuilding the client whenever loop_id changes", but it uses
id(loop)rather than aWeakKeyDictionary. CPython recycles freed object memory, so after a loop is GC'd, a new loop can be allocated at the same address andid(loop) == self._bound_loop_id— causing the old, dead loop's keepalive connection pool to be reused in the new loop, which is exactly the "bound to a different event loop" error the change is meant to prevent.Both
AgentexAsyncTracingProcessorandSGPAsyncTracingProcessorwere updated in this PR to useWeakKeyDictionaryprecisely to avoid this;TracingModulestill uses the id-based approach. In practice the risk is lower here becauseTracingModuleis used inside long-lived Temporal workers (one loop per process), but the safety guarantee stated in the comment is incomplete for sync-ACP/streaming scenarios.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "release: 0.12.0" | Re-trigger Greptile