fix(ci): pin mcp additional_dependency in mypy pre-commit hook - #2302
Open
JSv4 wants to merge 1 commit into
Open
fix(ci): pin mcp additional_dependency in mypy pre-commit hook#2302JSv4 wants to merge 1 commit into
JSv4 wants to merge 1 commit into
Conversation
The mypy hook's additional_dependencies list pins nearly every entry to match requirements/base.txt's ceiling, but mcp>=1.0.0 had no ceiling. pip resolved that to mcp 2.1.1 in the hook's isolated env, whose SDK renamed/removed fields and methods that opencontractserver/mcp/server.py (written against the 1.x API, requirements/base.txt pins <2) still uses, producing 48 mypy errors unrelated to any given PR's actual diff and failing linter/backend-ci-gate on every open PR that touches backend code. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199pawBYHjfsWUyPyrhRRtu
|
Reviewed the diff — this is a clean, minimal, well-targeted fix. Correctness
Code quality
Risk / scope
No issues found. One very minor, non-blocking thought: since this class of bug (hook dependency drifting ahead of |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
additional_dependencieslist pins nearly every entry to matchrequirements/base.txt, butmcp>=1.0.0had no ceiling — pip resolved it tomcp2.1.1 in the hook's isolated env.mcp2.x renamed/removed fields and methods (Server.list_resources,uriTemplate→uri_template,inputSchema→input_schema) thatopencontractserver/mcp/server.py(written against the 1.x API;requirements/base.txtpins<2) still uses, producing 48 mypy errors unrelated to any PR's actual diff.linter/backend-ci-gateon every open PR touching backend code (confirmed on PRs chore(deps): bump flower from 2.0.1 to 2.1.0 #2291, chore(deps): update openai requirement from <3,>=2.52.0 to >=3.6.0,<4 #2292, chore(deps): bump cryptography from 50.0.0 to 50.0.1 #2293, chore(deps): bump posthog from 7.35.4 to 7.44.2 #2294, and present onmain's current HEAD before any of them existed).mcp>=1.28.1,<2to match the runtime ceiling, same convention already used foropenai>=2.11.0,<3andanthropic>=0.45.2,<1a few lines above.Test plan
pre-commit run mypy --files opencontractserver/mcp/server.pypasses locally with the fixpre-commit run --files .pre-commit-config.yaml(full suite) passes🤖 Generated with Claude Code
https://claude.ai/code/session_0199pawBYHjfsWUyPyrhRRtu