Repository navigation
Python examples: move to SDK 1.44.0 and use the Join helper - #1580
Merged
Merged
Conversation
…pattern Bump examples/python to dex-python-sdk 1.44.0 and migrate the parallel split, synchronizing merge, thread merge, multiple instances, partial join, and cancelling join Flows from hand-counted Channels to Join. The reset Steps are gone: the next round's split waits for the previous round's remaining results and records them in an Attribute.
This was referenced Nov 11, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The Await Join carries each worker's index, unused BRANCH_COUNT is gone, and the final round of each reset Flow notes that its late results stay pending.
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.
Summary
Moves the Python examples to
dex-python-sdk1.44.0 and rewrites the hand-built joins with the Join helper, matching the Java (#1577) and TypeScript (#1579) migrations.examples/python/pyproject.toml:dex-python-sdk==1.44.0,uv.lockregenerated. The publisheddex-agents==0.4.0pinsdex-python-sdk==1.38.0, so[tool.uv] override-dependencies = ["dex-python-sdk==1.44.0"]keeps one SDK; the agents Python core uses none of the APIs removed in 1.43.0.examples/python/agent-harnesses/(separate lock, five adapter packages pinned to 1.38.0) stays on 1.38.0. Agents packages pin Dex SDK 1.38.0; release agents 0.5.0 on SDK 1.44 #1578 tracks removing the override after agents 0.5.0.fork,end_branch,for_all_branches, andbranch_results(branch builders come from factory functions to avoid late-binding lambdas in loops); the cancelling joins usefor_brancheswith sibling cancellation; StructuredPartialJoin, BlockingPartialJoin, and StaticPartialJoinForMultipleInstances drop their reset Steps andround-<k>keys, and the next round's split records the previous round's ignored results inignoredQuotes/ignoredInspections, which the tests read after completion. Outdated comments that named the old mechanism are updated.patterns/parallel/await_parallel_steps_flow.py: Joinparallel-complete, branch inputWorkItem(index, round), Await inputJoinRound;dex:group/dex:explanationkept.docs/src/data/flow-definitions/design-patterns/parallel-await.jsonis regenerated from it (the Join appears as a map resource with a read edge), and the visualize test's decision line moves to 80.Why
The Join helper shipped in 1.44.0. The examples show the standard way to join parallel branches, and the Workflow Patterns rating update depends on them. The Await Flow definition must be regenerated in the same change as its source.
doc-map: no change needed: examples and one regenerated Flow definition; the docs prose, snippets, and skills update follows after all five languages migrate
Testing
uv sync --locked;./run-integ-tests.shagainst dexcli dev and server-zd: 202 tests, 6 sync tests, 15 agent-harness tests passed.mypy --strictand ruff on the changed files.go test -tags integration ./internal/command -run 'TestVisualizePythonFanOutExtendGenerator|TestVisualizeScansEveryExampleFlowSource'.npm run generate:flow-definitions: onlyparallel-await.jsonchanges.