Skip to content

Python examples: move to SDK 1.44.0 and use the Join helper - #1580

Merged
longquanzheng merged 3 commits into
mainfrom
examples/join-python
Nov 11, 2026
Merged

longquanzheng merged 3 commits into
mainfrom
examples/join-python

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

Moves the Python examples to dex-python-sdk 1.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.lock regenerated. The published dex-agents==0.4.0 pins dex-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.
  • Workflow Patterns (design 9.2): the all-of joins use fork, end_branch, for_all_branches, and branch_results (branch builders come from factory functions to avoid late-binding lambdas in loops); the cancelling joins use for_branches with sibling cancellation; StructuredPartialJoin, BlockingPartialJoin, and StaticPartialJoinForMultipleInstances drop their reset Steps and round-<k> keys, and the next round's split records the previous round's ignored results in ignoredQuotes / ignoredInspections, which the tests read after completion. Outdated comments that named the old mechanism are updated.
  • patterns/parallel/await_parallel_steps_flow.py: Join parallel-complete, branch input WorkItem(index, round), Await input JoinRound; dex:group / dex:explanation kept. docs/src/data/flow-definitions/design-patterns/parallel-await.json is regenerated from it (the Join appears as a map resource with a read edge), and the visualize test's decision line moves to 80.
  • Join names reuse the old Channel names; Flow, Step, RPC, and test names are unchanged. Flows that design 9.2 leaves alone are unchanged.

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.sh against dexcli dev and server-zd: 202 tests, 6 sync tests, 15 agent-harness tests passed.
  • mypy --strict and ruff on the changed files.
  • go test -tags integration ./internal/command -run 'TestVisualizePythonFanOutExtendGenerator|TestVisualizeScansEveryExampleFlowSource'.
  • npm run generate:flow-definitions: only parallel-await.json changes.

…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.
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

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.
@longquanzheng
longquanzheng enabled auto-merge (squash) November 11, 2026 03:58
@longquanzheng
longquanzheng merged commit faffbef into main Nov 11, 2026
34 checks passed
@longquanzheng
longquanzheng deleted the examples/join-python branch November 11, 2026 04:08
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