release: 0.11.2#357
Merged
declan-scale merged 2 commits intoMay 13, 2026
Merged
Conversation
declan-scale
approved these changes
May 13, 2026
Contributor
Author
|
🤖 Release is at https://github.com/scaleapi/scale-agentex-python/releases/tag/v0.11.2 🌻 |
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.11.2 (2026-05-13)
Full Changelog: v0.11.1...v0.11.2
Bug Fixes
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 (v0.11.2) fixes a message-ordering bug by stamping agent messages with
workflow.now()when created inside a Temporal workflow, ensuring monotonically increasingcreated_atvalues even when twomessages.createcalls are awaited in quick succession from the same workflow turn. Thecreated_atis captured at the workflow layer before activity dispatch and threaded through the entire stack — activity params, services, streaming contexts, and the SDK client — using anomitsentinel when no explicit timestamp is needed.Confidence Score: 4/5
Safe to merge — only P2 findings, no logic errors or security concerns.
The core bug fix is well-structured and correctly captures
workflow.now()at the workflow layer before activity dispatch. The_make_created_at_dispenserpattern inopenai.pycorrectly limits the workflow timestamp to the first message per turn. Tests adequately cover the new behaviour. The only concern is theasyncio.sleep(1)in the integration test, which is a P2 style issue.examples/tutorials/10_async/00_base/010_multiturn/tests/test_agent.py — brittle sleep-based synchronization worth revisiting.
Important Files Changed
workflow_now_if_in_workflow()— returns deterministicworkflow.now()inside a Temporal workflow,Noneotherwise. Clean implementation.workflow_now_if_in_workflow()ascreated_atdefault increate()andcreate_batch(), threading the timestamp through both the activity-dispatch and direct-service paths._make_created_at_dispenserto stamp only the first streaming context opened per turn with the workflow timestamp; subsequent messages fall back to server wall-clock. Implementation is correct and well-commented.created_atthroughStreamingTaskMessageContextand usesomitsentinel whenNoneto let the server apply its own clock. Mostly formatting-only changes otherwise.asyncio.sleep(1)to work around a race between task creation and state initialization; brittle in slow CI environments.created_atinjection forMessagesModule.createandcreate_batch. Patch targets are correct.created_atto SDK client andomitsentinel whenNone. Covers both single-message and batch paths.Sequence Diagram
sequenceDiagram participant WF as Temporal Workflow participant Mod as MessagesModule / LiteLLMModule / OpenAIModule participant Act as Temporal Activity participant Svc as MessagesService / OpenAIService participant SDK as AgentEx SDK Client WF->>Mod: messages.create(task_id, content) Note over Mod: created_at = workflow_now_if_in_workflow()<br/>(captures deterministic workflow clock) Mod->>Act: "execute_activity(CreateMessageParams{created_at})" Note over Act: Runs outside workflow context Act->>Svc: create_message(task_id, content, created_at) Svc->>SDK: "messages.create(task_id, content, created_at=ts OR omit)" SDK-->>Svc: TaskMessage Svc-->>Act: TaskMessage Act-->>Mod: TaskMessage Mod-->>WF: TaskMessagePrompt To Fix All With AI
Reviews (1): Last reviewed commit: "release: 0.11.2" | Re-trigger Greptile