Make upstream deprecations visible in the test suite - #147
Open
tony wants to merge 2 commits into
Open
Conversation
tony
force-pushed
the
deprecation-warnings-visible
branch
from
July 25, 2026 22:25
1fdb40b to
59e0e6e
Compare
tony
force-pushed
the
deprecation-warnings-visible
branch
from
July 26, 2026 11:17
59e0e6e to
36997db
Compare
tony
force-pushed
the
deprecation-warnings-visible
branch
from
August 1, 2026 17:55
36997db to
fdca3c3
Compare
why: Two things make an unbounded range unsafe for end users. AgentgrepResponseLimitingMiddleware specializes _truncate_to_result, a private FastMCP helper carrying no compatibility guarantee, and FastMCP 4.0 is a documented breaking major that renames camelCase result fields behind a deprecation bridge. The lockfile pins 3.4.4 for CI, so this only affects consumers resolving the range themselves. what: - Constrain the runtime requirement to fastmcp>=3.4.0,<4 and record why the cap exists and what has to be verified before lifting it. - Refresh uv.lock; resolution is unchanged at 139 packages.
why: Python silences DeprecationWarning outside __main__ by default, so an upstream deprecation reaches end users before it ever reaches the suite. The cost lands on the release that removes the feature rather than the one that announces it, which is the expensive end. MCP now runs a formal deprecation policy with a twelve-month window, so the signal this surfaces is worth acting on. what: - Escalate DeprecationWarning and PendingDeprecationWarning to errors in the pytest configuration. - Record the escape hatch: a narrow per-module ignore with the migration tracked, rather than relaxing the blanket rule.
tony
force-pushed
the
deprecation-warnings-visible
branch
from
August 9, 2026 12:02
fdca3c3 to
f19b658
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Audits the
agentgrepMCP surface against the MCP deprecated features registry and adds a standing guard so the next upstream deprecation surfaces on its own.Audit result: nothing to migrate
MCP adopted a formal feature lifecycle (SEP-2596) — Active / Deprecated / Removed, with a twelve-month minimum window. Six features are currently Deprecated.
agentgrepuses none of them:agentgrep2026-07-282026-07-282026-07-282026-07-28includeContext: "thisServer"/"allServers"2025-11-252025-03-26Verified by building the server and exercising all 11 tools, 6 resources, and 3 prompts under
-W error::DeprecationWarning: zero warnings, nofilterwarningssuppressing anything.Worth recording for future work: Roots is the natural fit for passing directories to a search server, and it is now Deprecated. Its migration path is "pass directories or files via tool parameters," which
searchalready does throughcwd,repo, andbranch. Project and repository awareness should keep using tool parameters rather than adopting Roots.What this changes
Deprecation warnings are now errors in the suite. Python silences
DeprecationWarningoutside__main__by default, so an upstream deprecation reaches end users before it reaches the suite — the cost lands on the release that removes a feature rather than the one that announces it. The suite is already clean under the setting, so this is free today and load-bearing later. The escape hatch is a narrow per-moduleignorewith the migration tracked, not relaxing the blanket rule.fastmcpis capped below 4.0. FastMCP 4.0 renames camelCase result fields behind a deprecation bridge, andtests/test_mcp_response_limiting.pyreads three of them (outputSchema,isError,structuredContent). Without the cap, a 4.x resolve would start emittingFastMCPDeprecationWarning— which the escalation above turns into a failure. The cap also protects the response-limiting middleware, which specializes the private_truncate_to_result. The lockfile already pinned 3.4.4, so this only affects consumers resolving the range themselves.FastMCPDeprecationWarningsubclassesDeprecationWarning, so the escalation genuinely covers it — verified by triggering one under the filter, not by inspection alone.Test plan
Full gate green:
ruff check,ruff format,ty check,pytest -m "" --reruns 0(223 passed),just build-docs.