fastmcp/tests/server/versioning
Jeremiah Lowin 9f8347dbaf
Fix get_* returning None when latest version is disabled (#3439)
* Fix get_* returning None when latest version is disabled (#3421)

When a visibility transform disabled the highest version of a component,
get_tool/get_resource/get_resource_template/get_prompt returned None
instead of falling back to the next-highest enabled version. The list_*
path already worked correctly because deduplication runs after visibility
filtering. The get_* path now falls back to listing all versions and
picking the highest enabled one when the top version is disabled.

* Apply auth checks in version fallback paths

The fallback code in get_tool, get_resource, get_resource_template, and
get_prompt bypassed auth filtering when falling back to older versions
after the highest version was disabled. This could expose auth-protected
older versions to unauthorized users.
2026-03-07 11:55:10 -05:00
..
__init__.py Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
test_calls.py Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
test_filtering.py Add include_unversioned option to VersionFilter (#3349) 2026-03-02 21:06:50 -05:00
test_mounting.py Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
test_versioning.py Validate version metadata to reject non-scalar types (#3437) 2026-03-07 11:40:36 -05:00
test_visibility_version_fallback.py Fix get_* returning None when latest version is disabled (#3439) 2026-03-07 11:55:10 -05:00