From 8ca3bc5da5f31888949525b26b847a70b0bf191e Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 13 Aug 2026 12:32:09 -0700 Subject: [PATCH 1/4] Declare the real mcp bounds for the google-adk and google-genai samples Both groups relied on sibling groups to supply or constrain mcp, so each was broken when resolved on its own. google-adk never declared mcp at all, even though google_adk_agents imports McpToolset. google.adk.tools.mcp_tool imports it inside a try/except ImportError, so a missing mcp does not raise -- the symbol is simply never exported and the sample's toolsets silently disappear. google-genai declared "mcp>=1.0.0" while the sample imports mcp.shared.session, which mcp 2.0 removed. Nothing in that group caps mcp, so on its own the declaration selects 2.0.0. Also upgrades the lock from mcp 1.27.1 to 1.29.0. It sat at 1.27.1 only because uv does not upgrade already-locked packages; no constraint required it. Verified each group in a pruned environment (uv run --exact --no-default-groups --group ...), and on mcp 1.29.0 the full suite collects 150 tests as before, with 148 passed, 4 skipped and mypy clean. The uv.lock diff also picks up pre-existing drift: pyproject declares temporalio[langsmith]>=1.31.0 for the deepagents group while the committed lock recorded >=1.30.0, so every uv run produced a spurious lock diff. Co-Authored-By: Claude Opus 5 (1M context) --- pyproject.toml | 8 ++++++-- uv.lock | 12 +++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4d842261..7464dfe8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,9 +45,13 @@ external-storage = [ ] external-storage-redis = ["redis>=5.0.0,<8"] gevent = ["gevent>=25.4.2 ; python_version >= '3.8'"] -google-adk = ["temporalio[google-adk] >= 1.31.0", "google-adk>=2.2.0,<3"] +google-adk = [ + "temporalio[google-adk] >= 1.31.0", + "google-adk>=2.2.0,<3", + "mcp>=1.27.1,<2", +] google-genai = [ - "mcp>=1.0.0", + "mcp>=1.27.1,<2", "temporalio[google-genai,pydantic]>=1.31.0", ] langfuse-tracing = [ diff --git a/uv.lock b/uv.lock index 202bb944..9fd4c5f7 100644 --- a/uv.lock +++ b/uv.lock @@ -2284,7 +2284,7 @@ wheels = [ [[package]] name = "mcp" -version = "1.27.1" +version = "1.29.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -2302,9 +2302,9 @@ dependencies = [ { name = "typing-inspection" }, { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/38/83/d1efe7c2980d8a3afa476f4e3d42d53dd54c0ab94c27bee5d755b45c8b73/mcp-1.27.1.tar.gz", hash = "sha256:0f47e1820f8f8f941466b39749eb1d1839a04caddca2bc60e9d46e8a99914924", size = 608458, upload-time = "2026-05-08T16:50:12.601Z" } +sdist = { url = "https://files.pythonhosted.org/packages/30/d3/f9acc21dfc886e4f78e2add1a47db46ce16884346afde53f8a064c02c891/mcp-1.29.0.tar.gz", hash = "sha256:52d01f334de1868cc3bb2d6604931126a67631f99a6c5d3b82ba47290315ec36", size = 643148, upload-time = "2026-07-28T13:41:41.939Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fd/73/42d9596facebdb533b7f0b86c1b0364ef350d1f8ba78b1052e8a58b48b65/mcp-1.27.1-py3-none-any.whl", hash = "sha256:1af3c4203b329430fde7a87b4fcb6392a041f5cb851fd68fc674016ab4e7c06f", size = 216260, upload-time = "2026-05-08T16:50:10.547Z" }, + { url = "https://files.pythonhosted.org/packages/01/c8/248b201f6d753d69fd5d6506011abbb35a946d9142b2ae311a948fd0be3d/mcp-1.29.0-py3-none-any.whl", hash = "sha256:f5a075bb611f23d6f4d080c6a1699fa62772eebc562ba9e66b306ddde1c755f7", size = 223436, upload-time = "2026-07-28T13:41:40.337Z" }, ] [[package]] @@ -4575,6 +4575,7 @@ gevent = [ ] google-adk = [ { name = "google-adk" }, + { name = "mcp" }, { name = "temporalio", extra = ["google-adk"] }, ] google-genai = [ @@ -4655,7 +4656,7 @@ deepagents = [ { name = "langchain", marker = "python_full_version >= '3.11'", specifier = ">=1.3.11,<2" }, { name = "langchain-anthropic", marker = "python_full_version >= '3.11'", specifier = ">=1.4.7,<2" }, { name = "langchain-core", marker = "python_full_version >= '3.11'", specifier = ">=1.4.8,<2" }, - { name = "temporalio", extras = ["langsmith"], marker = "python_full_version >= '3.11'", specifier = ">=1.30.0" }, + { name = "temporalio", extras = ["langsmith"], marker = "python_full_version >= '3.11'", specifier = ">=1.31.0" }, ] dev = [ { name = "fakeredis", specifier = ">=2,<3" }, @@ -4688,10 +4689,11 @@ external-storage-redis = [{ name = "redis", specifier = ">=5.0.0,<8" }] gevent = [{ name = "gevent", marker = "python_full_version >= '3.8'", specifier = ">=25.4.2" }] google-adk = [ { name = "google-adk", specifier = ">=2.2.0,<3" }, + { name = "mcp", specifier = ">=1.27.1,<2" }, { name = "temporalio", extras = ["google-adk"], specifier = ">=1.31.0" }, ] google-genai = [ - { name = "mcp", specifier = ">=1.0.0" }, + { name = "mcp", specifier = ">=1.27.1,<2" }, { name = "temporalio", extras = ["google-genai", "pydantic"], specifier = ">=1.31.0" }, ] langfuse-tracing = [ From 2542521c20e51bb376befae3be6622d3a4bf7db5 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 13 Aug 2026 12:35:18 -0700 Subject: [PATCH 2/4] Upgrade google-adk to 2.6.3 The lock sat at 2.6.2 only because uv does not upgrade already-locked packages. 2.6.3 is compatible: google_adk_agents tests pass (6 passed), the full suite collects 150 tests with 148 passed and 4 skipped, and mypy is clean. Co-Authored-By: Claude Opus 5 (1M context) --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index 9fd4c5f7..3a7c460a 100644 --- a/uv.lock +++ b/uv.lock @@ -1095,7 +1095,7 @@ wheels = [ [[package]] name = "google-adk" -version = "2.6.2" +version = "2.6.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohttp" }, @@ -1124,9 +1124,9 @@ dependencies = [ { name = "watchdog" }, { name = "websockets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f9/39/d9512c13102d20dd32e4c36b8af3918583a2a1ae4e1f062dec01f648bb59/google_adk-2.6.2.tar.gz", hash = "sha256:e95eee1e18811078a3478e8b4a57922dd8eff0fa4c465b864f0f6174c04bfad8", size = 3721236, upload-time = "2026-08-04T01:20:22.206Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/5a/a8a1fd24f8bfdbd64e54e1ae954ddb272d1debc61a7a69ce4a8277c70e32/google_adk-2.6.3.tar.gz", hash = "sha256:a5f290ead5f8893ad3aaf3c7a0053893624c82ff5c447c90800904f633a8c72d", size = 3721520, upload-time = "2026-08-07T21:18:44.149Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6d/6f/8bde13dff964e96f2351c5aab0fc8a2ce69a16e1adeaed0c5558331b1f27/google_adk-2.6.2-py3-none-any.whl", hash = "sha256:59908032fa10ba0249aad12fb571d5f5cacb24f1c85e63a6eaec45c7c3ed01f1", size = 4305118, upload-time = "2026-08-04T01:20:20.307Z" }, + { url = "https://files.pythonhosted.org/packages/e4/37/bab5ae6d5ac57a04bfae128f755c56e2d878a7d9dcdbd461282baf19344a/google_adk-2.6.3-py3-none-any.whl", hash = "sha256:3c53fc7885bbc00f98fe90e30474ad7ef7d1ccdc4dd7aa0be154721e61295f04", size = 4305269, upload-time = "2026-08-07T21:18:41.71Z" }, ] [[package]] From 0e2b6edf642c16ccf9998d13b11eabcd0c94daf1 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 13 Aug 2026 12:37:21 -0700 Subject: [PATCH 3/4] Run the gevent test in CI again The step was gated on `matrix.python == '3.12'`, which was correct when written but stopped matching in a5ee599 when the matrix moved to 3.10/3.13. It has not run since July 2025, across two matrix bumps. Rather than hardcode another version, drop the condition so the step runs on every matrix entry and cannot silently die on the next bump. Verified locally on both ends of the matrix, 3.10 and 3.14: the workflow completes and returns "Hello, Temporal!". The test is self-contained -- it starts its own WorkflowEnvironment -- so it needs no extra CI setup. Also moves the step above the pydantic downgrade, which is documented as needing to remain last: `uv sync --group gevent` re-syncs the environment from the lock and would undo the pinned pydantic 1.10. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e85fbe40..6d7cec2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,10 @@ jobs: - run: mkdir junit-xml - run: poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml - run: poe test -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml + - run: | + uv sync --group gevent + uv run gevent_async/test/run_combined.py + # This must remain the last step since it downgrades pydantic - name: Uninstall pydantic shell: bash @@ -56,13 +60,6 @@ jobs: uv run pip install pydantic==1.10 poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--pydantic-v1.xml tests/pydantic_converter_v1/workflow_test.py - # On latest, run gevent test - - name: Gevent test - if: ${{ matrix.python == '3.12' }} - run: | - uv sync --group gevent - uv run gevent_async/test/run_combined.py - - name: Upload junit-xml artifacts uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 if: always() From 3a35c5a84ebda4b31d717e8b59104de6292fef9d Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 13 Aug 2026 12:45:05 -0700 Subject: [PATCH 4/4] Fix stale sample and test wiring Four unrelated papercuts: - Add the llm-stream dependency group. workflow_streams/README.md tells readers to run `uv sync --group llm-stream` for scenario 5, but the group was never created, so the command fails. The sample's openai import resolves today only because the langfuse-tracing and langsmith-tracing groups happen to install openai. - Rename tests/activity_sticky_queues to tests/worker_specific_task_queues, and drop the stale prefix from the two test filenames. The sample was renamed but its test directory was not, so the tests sat under a directory naming a sample that no longer exists. - Locate google_genai's echo MCP server through the installed package rather than Path(__file__).parents[2], which hardcodes the distance from the test file to the sample and silently resolves to a nonexistent path if either moves. A missing server script makes the test hang rather than fail, since the client waits on a subprocess that never started. - Add __init__.py to the five test directories that lacked it. Test filenames collide across samples by design (workflow_test.py, activity_test.py and mcp_test.py each appear in several), and package markers are what keep pytest from treating them as the same module. The five worked only because they had not collided yet. Full suite unchanged at 150 collected, 148 passed, 4 skipped; mypy clean. Co-Authored-By: Claude Opus 5 (1M context) --- pyproject.toml | 1 + tests/google_genai/mcp_test.py | 5 ++--- tests/{activity_sticky_queues => hello_nexus}/__init__.py | 0 tests/message_passing/__init__.py | 0 tests/message_passing/introduction/__init__.py | 0 tests/message_passing/lazy_initialization/__init__.py | 0 tests/message_passing/safe_message_handlers/__init__.py | 0 tests/message_passing/waiting_for_handlers/__init__.py | 0 .../waiting_for_handlers_and_compensation/__init__.py | 0 tests/nexus_messaging/__init__.py | 0 tests/polling/__init__.py | 0 tests/sentry/__init__.py | 0 tests/worker_specific_task_queues/__init__.py | 0 .../activity_test.py} | 0 .../workflow_test.py} | 0 uv.lock | 4 ++++ 16 files changed, 7 insertions(+), 3 deletions(-) rename tests/{activity_sticky_queues => hello_nexus}/__init__.py (100%) create mode 100644 tests/message_passing/__init__.py create mode 100644 tests/message_passing/introduction/__init__.py create mode 100644 tests/message_passing/lazy_initialization/__init__.py create mode 100644 tests/message_passing/safe_message_handlers/__init__.py create mode 100644 tests/message_passing/waiting_for_handlers/__init__.py create mode 100644 tests/message_passing/waiting_for_handlers_and_compensation/__init__.py create mode 100644 tests/nexus_messaging/__init__.py create mode 100644 tests/polling/__init__.py create mode 100644 tests/sentry/__init__.py create mode 100644 tests/worker_specific_task_queues/__init__.py rename tests/{activity_sticky_queues/activity_sticky_queues_activity_test.py => worker_specific_task_queues/activity_test.py} (100%) rename tests/{activity_sticky_queues/activity_sticky_worker_workflow_test.py => worker_specific_task_queues/workflow_test.py} (100%) diff --git a/pyproject.toml b/pyproject.toml index 7464dfe8..01908c19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,7 @@ langgraph = [ "temporalio[langgraph,langsmith]>=1.31.0", ] litellm = ["litellm>=1.85.0,<2"] +llm-stream = ["openai>=1.4.0"] nexus = ["nexus-rpc>=1.1.0,<2"] open-telemetry = [ "temporalio[opentelemetry]", diff --git a/tests/google_genai/mcp_test.py b/tests/google_genai/mcp_test.py index e5913ad1..6b9e00c0 100644 --- a/tests/google_genai/mcp_test.py +++ b/tests/google_genai/mcp_test.py @@ -17,11 +17,10 @@ ) from temporalio.worker import Worker +import google_genai.mcp as google_genai_mcp from google_genai.mcp.workflow import McpWorkflow -ECHO_SERVER = str( - Path(__file__).parents[2] / "google_genai" / "mcp" / "echo_mcp_server.py" -) +ECHO_SERVER = str(Path(google_genai_mcp.__file__).parent / "echo_mcp_server.py") @asynccontextmanager diff --git a/tests/activity_sticky_queues/__init__.py b/tests/hello_nexus/__init__.py similarity index 100% rename from tests/activity_sticky_queues/__init__.py rename to tests/hello_nexus/__init__.py diff --git a/tests/message_passing/__init__.py b/tests/message_passing/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/message_passing/introduction/__init__.py b/tests/message_passing/introduction/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/message_passing/lazy_initialization/__init__.py b/tests/message_passing/lazy_initialization/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/message_passing/safe_message_handlers/__init__.py b/tests/message_passing/safe_message_handlers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/message_passing/waiting_for_handlers/__init__.py b/tests/message_passing/waiting_for_handlers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/message_passing/waiting_for_handlers_and_compensation/__init__.py b/tests/message_passing/waiting_for_handlers_and_compensation/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/nexus_messaging/__init__.py b/tests/nexus_messaging/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/polling/__init__.py b/tests/polling/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/sentry/__init__.py b/tests/sentry/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/worker_specific_task_queues/__init__.py b/tests/worker_specific_task_queues/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/activity_sticky_queues/activity_sticky_queues_activity_test.py b/tests/worker_specific_task_queues/activity_test.py similarity index 100% rename from tests/activity_sticky_queues/activity_sticky_queues_activity_test.py rename to tests/worker_specific_task_queues/activity_test.py diff --git a/tests/activity_sticky_queues/activity_sticky_worker_workflow_test.py b/tests/worker_specific_task_queues/workflow_test.py similarity index 100% rename from tests/activity_sticky_queues/activity_sticky_worker_workflow_test.py rename to tests/worker_specific_task_queues/workflow_test.py diff --git a/uv.lock b/uv.lock index 3a7c460a..197cfb64 100644 --- a/uv.lock +++ b/uv.lock @@ -4607,6 +4607,9 @@ langsmith-tracing = [ litellm = [ { name = "litellm" }, ] +llm-stream = [ + { name = "openai" }, +] nexus = [ { name = "nexus-rpc" }, ] @@ -4715,6 +4718,7 @@ langsmith-tracing = [ { name = "temporalio", extras = ["pydantic", "langsmith"], specifier = ">=1.31.0" }, ] litellm = [{ name = "litellm", specifier = ">=1.85.0,<2" }] +llm-stream = [{ name = "openai", specifier = ">=1.4.0" }] nexus = [{ name = "nexus-rpc", specifier = ">=1.1.0,<2" }] open-telemetry = [ { name = "opentelemetry-exporter-otlp-proto-grpc" },