Skip to content

Python: [Issue]: MCP workflow resume test failed in Python 3.12 Windows CI #10293

Description

@shx815

Category

Build or CI

Problem

The Python Tests (3.12, windows-latest) job failed on #10177, a PR that only updates the A2A quickstart README. The failure triggered cancellation of four other jobs in the Python test matrix, and Merge Gatekeeper failed.

Evidence

  • Windows / Python 3.12 job log
  • Failing test: TestApprovalFlow.test_auth_context_binding_survives_workflow_resume[True-True]
  • Assertion location: python/packages/declarative/tests/test_invoke_mcp_tool_executor.py:471
  • Expected handler.call_count == 0 after resuming from a checkpoint with a changed authorization context. Actual: handler.call_count == 1.

I observed this in one CI run. Reproducibility is unknown.

Desired Outcome

Determine whether the failure reproduces on the base commit under Windows / Python 3.12, and make the test reliable so it does not block unrelated PRs.

Language

Python

Acknowledgements

  • I searched existing issues and did not find a duplicate.
  • I will wait for explicit maintainer agreement before starting implementation of a non-trivial change.

Activity

  1. added theissue type on Nov 12, 2026
  2. added
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Nov 12, 2026
  3. changed the title [-][Issue]: MCP workflow resume test failed in Python 3.12 Windows CI[/-] [+]Python: [Issue]: MCP workflow resume test failed in Python 3.12 Windows CI[/+] on Nov 12, 2026
  4. DZH166 commented on Nov 14, 2026

    @DZH166

    We reproduced and root-caused this failure on Windows / Python 3.12. Mechanism: the test selects the restore checkpoint with max(checkpoints, key=lambda item: item.timestamp), but several superstep checkpoints of one run are saved within the same host clock tick, so their ISO timestamp strings are identical (observed locally: the three checkpoints saved by one run shared 21:12:25.956597). Python max returns the first maximal element and InMemoryCheckpointStorage.list_checkpoints returns checkpoints in save order, so a tie returns the earliest tied checkpoint. Restoring from that stale checkpoint resumes with the pre-response state (Local.selector == "first"), the approval then matches the stale context-first binding, and the MCP tool executes with handler.call_count == 1 — the exact failure at test_invoke_mcp_tool_executor.py:471 from the CI log. A clock-scripting harness that pins the tie reproduces assert 1 == 0 at that line pre-fix and passes post-fix. The fix is test-only: select the checkpoint via await storage.get_latest(workflow_name=...), which is the storage's own lineage-aware tie-break (_select_latest_checkpoint, the same selection the runner uses for implicit resume) instead of a plain string max. shx815 Eduard van Valkenburg (@eavanvalkenburg) — does this direction work? If so we'll open the PR (test-only change, Fixes #10293, before/after logs included).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions