Skip to content

mcp: lower the temporalio floor back to 1.32.0 - #434

Merged
campoy merged 2 commits into
mainfrom
fix/mcp-temporalio-floor-1-32
Nov 6, 2026
Merged

campoy merged 2 commits into
mainfrom
fix/mcp-temporalio-floor-1-32

Conversation

@campoy

@campoy campoy commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What was changed

Does temporalio-mcp need temporalio 1.34? I checked, and it doesn't. So this PR puts the floor back at 1.32.0.

  • temporalio-mcp requires temporalio>=1.32.0,<2 again, instead of >=1.34.0,<2. The matching line in uv.lock changes too. The lock still resolves 1.34.0, so development and CI don't change.
  • The dev-server retry helper (tests/helpers/environment.py) now also retries the startup timeout that SDKs before 1.33 report: Failed connecting to test server after 5 seconds, last error: .... Without it, a slow start on 1.32 failed at once instead of getting its three attempts. Thanks Brian for catching this! The template and every Python plugin's copy change together, as the conventions check requires.

Why?

#59 raised the floor so the test helper would see one dev-server startup-timeout format. In its own words: "Using SDK 1.34.0 across the plugin test environments gives the helper one startup-timeout format to recognize." That's a reason for the tests, not for the package.

Nothing in temporalio-mcp's code needs 1.34. It uses activity, workflow, ApplicationError, SimplePlugin, WorkflowRunner, SandboxedWorkflowRunner and ActivityConfig, and all of them exist in 1.32.0. With the floor back at 1.32.0, users on 1.32 or 1.33 don't have to upgrade their SDK to get 0.3.0.

Checklist

  1. Closes: no issue.

  2. How was this tested:

  • With temporalio 1.32.0, and then 1.33.0, installed over the lock, the whole python/mcp suite passes, and pyright and mypy are clean.
  • test_env.py gets the old timeout in the recovery and three-attempt cases, with last error: None and last error: Some(...), and a near-miss connection error that stays non-retryable. Against the old helper, 7 of its 53 cases fail. With the fix, all 53 pass.
  • After the helper change, the whole python/mcp suite passes on temporalio 1.32.0 and 1.34.0 (102 tests), and ruff, pyright, basedpyright and mypy are clean.
  • The repository conventions check passes, and so do the 505 tooling tests in scripts/tests.
  • uv lock --check passes.
  1. Any docs updates needed? No.

#59 raised it to 1.34.0 so the test helper would see one dev-server
startup-timeout format. Nothing in temporalio-mcp's code needs 1.34: the
whole suite passes, and pyright and mypy are clean, on temporalio 1.32.0
and 1.33.0. The lock still resolves 1.34.0 for development and CI.
@campoy
campoy requested a review from a team as a code owner November 6, 2026 00:11
@campoy
campoy marked this pull request as draft November 6, 2026 00:13
@campoy
campoy marked this pull request as ready for review November 6, 2026 00:15
@campoy
campoy requested a review from brianstrauch November 6, 2026 00:40

@brianstrauch brianstrauch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the dev-server retry helper before lowering the SDK floor. MCP's workflow tests use WorkflowEnvironment.start_local, and SDK 1.32 reports its startup timeout as:

Failed starting Temporal dev server: Failed connecting to test server after 5 seconds, last error: …

tests/helpers/environment.py only recognizes the newer timeout format used by SDK 1.33+. With 1.32, a transient startup timeout therefore fails immediately instead of receiving the intended three attempts. A successful suite run does not exercise this failure path.

Suggested change to python/_template/tests/helpers/environment.py.tmpl:

 _RETRYABLE_STARTUP_ERROR = re.compile(
     r"^Failed starting Temporal dev server: (?:"
     r"ephemeral server at \S+ did not start within \d+s\."
+    r"|Failed connecting to test server after \d+ seconds, last error: "
     r"|failed to download ephemeral server executable:"

Add the legacy timeout to the retry regression cases with both last error: None and last error: Some(…), covering recovery and the three-attempt limit. Keep unrelated connection errors non-retryable. Apply the template changes to every Python plugin's helper and test copies, as required by the byte-identical conventions check.

I reproduced the missing retries with the new regression cases. With this fix, all 104 MCP tests pass on SDK 1.32.0 and 1.34.0; lint/type checks, repository conventions, and 31 conventions/scaffolding tests also pass.

With the temporalio floor back at 1.32.0, the test helper must also
recognize the startup timeout that SDK 1.32 reports: 'Failed connecting
to test server after N seconds, last error: ...'. Before, that timeout
failed at once instead of getting the three attempts.

Add it to the template's retry regex, add regression cases with
'last error: None' and 'last error: Some(...)' to the recovery and
three-attempt tests, keep a near-miss connection error non-retryable,
and copy both templates to every Python plugin.
@campoy

campoy commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks Brian, good catch! I checked the SDK binaries: 1.32.0 reports exactly that message, and 1.33.0 and 1.34.0 use the newer one.

Fixed:

  • The template's retry regex now matches Failed connecting to test server after N seconds, last error: .
  • test_env.py covers it with last error: None and last error: Some(...), in both the recovery and the three-attempt cases. A near-miss connection error (Failed connecting to test server: invalid URL) stays non-retryable.
  • All 11 Python plugins' copies match the template again.

Against the old helper, 7 of the 53 test_env.py cases fail. With the fix, all of them pass. The whole MCP suite passes on 1.32.0 and 1.34.0 (102 tests), and so do the conventions check and the 505 tooling tests.

Could you take another look?

@campoy
campoy requested a review from brianstrauch November 6, 2026 01:04
@campoy
campoy merged commit 33963b8 into main Nov 6, 2026
127 checks passed
@campoy
campoy deleted the fix/mcp-temporalio-floor-1-32 branch November 6, 2026 03:01
@campoy

campoy commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

This one is merged already, but here's what I ran with it, so the record lives with the PR.

How did I test it with the plugins?

I built a local candidate: the GA release candidate plus #433, #434 (before its test-helper change) and #435. I built temporalio-mcp from that tree as 0.3.0 and installed it over each plugin's lock. Then I reran everything we have for the two plugins that use temporalio-mcp: OpenAI Agents and Strands (both Python). I compared each result with the same check on the release candidate, which used temporalio-mcp 0.2.0.

Check OpenAI Agents Strands
Plugin CI suite on temporalio-mcp 0.3.0 544 passed, 1 skipped 230 passed
Defect fix checks 14, all the same as before 15, all the same as before
Feature evidence checks 80, all the same as before all of them, the same as before

temporalio-mcp's own CI passed on #433 and #434: macOS, Ubuntu (Python 3.10 and 3.14) and Windows.

What changed, on purpose?

What didn't change?

The items that failed on the release candidate still fail the same way here, and none of them comes from temporalio-mcp. In OpenAI Agents, two defect fix checks and five feature checks were already failing on the release candidate. Only three defect checks and one feature item in OpenAI Agents go through the temporalio-mcp route; the rest of its MCP evidence uses the deprecated providers, which don't import it.

Anything flaky, or not run?

  • A few first runs broke while my laptop was asleep or Docker restarted. Every rerun matched the earlier result.
  • Not run, as on the release candidate: the Docker and ssh routes of the credential checks (the image has neither) and two replay items that were never part of the run.

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.

2 participants