You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Monty 0.0.8 removed the external_functions parameter from the Monty constructor, which breaks code mode. This pins the dependency to <0.0.8 for the patch release so existing users aren't broken on install.
The forward-looking fix (adapting to 0.0.8's new API) is already on main via #3468.
Summary: Two unrelated pre-existing test failures were triggered in CI — a JWT expiration race condition on Windows and subprocess-spawning tests timing out with lowest-direct dependencies. Neither failure is caused by this PR's changes (which only pin pydantic-monty<0.0.8).
Failure 1: Windows — test_verify_token_validates_expiration
Root Cause: The test creates a JWT with expires_in=1 second, then immediately calls verify_token expecting it to be valid. On slow Windows CI runners, the token expires before the "immediate" verification runs — the token is issued at exp=1773515519 and the Token expired debug log fires at the same second, indicating the 1-second window is too tight for Windows CI.
Suggested Solution: Increase expires_in from 1 to something like 3 in the test, and adjust the time.sleep to match (e.g. time.sleep(3.1)). This gives more room on slow runners while still testing expiration.
Root Cause: Both tests are decorated with @pytest.mark.timeout(5) on this branch, but they spawn two subprocess MCP servers which takes longer than 5s on slow CI with minimum dependency versions. These tests are already fixed on main — the timeout has been bumped to @pytest.mark.timeout(15) there.
Suggested Solution: Since this is a patch branch that diverged before the timeout fix, this failure is moot as the PR has merged.
File: tests/test_mcp_config.py (lines ~358, ~418)
Detailed Analysis
Windows failure log excerpt:
DEBUG Issued access token for client=client-abc jti=token-id exp=1773515519
[03/14/26 19:11:59] DEBUG Token expired
E authlib.jose.errors.JoseError: Token has expired:
src\fastmcp\server\auth\jwt_issuer.py:227: JoseError
The token expires at the exact second it is being verified — the expires_in=1 window is too short for the Windows CI runner.
Lowest-direct dependencies failure log excerpt:
@pytest.mark.timeout(5)
async def test_multi_client_lifespan(tmp_path: Path):
...
E Failed: Timeout (>5.0s) from pytest-timeout.
tests/test_mcp_config.py:58: Failed
And similarly for test_multi_client_force_close (line 447). Both tests spawn two subprocesses. On the current main, the marker has been updated to @pytest.mark.timeout(15), which resolves this.
Related Files
tests/server/auth/test_jwt_issuer.py — JWT issuer test with flaky 1-second expiry window
tests/test_mcp_config.py — Multi-client lifecycle tests with subprocess-based MCP servers; timeout was 5s on this branch, 15s on main
src/fastmcp/server/auth/jwt_issuer.py — verify_token raises JoseError when exp < time.time()
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
bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.dependenciesUpdates to project dependencies. Automatically applied to dependabot PRs.
1 participant
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.
Monty 0.0.8 removed the
external_functionsparameter from theMontyconstructor, which breaks code mode. This pins the dependency to<0.0.8for the patch release so existing users aren't broken on install.The forward-looking fix (adapting to 0.0.8's new API) is already on main via #3468.
See also #3463