Skip to content

fix(deps): raise MCP floor to avoid Pydantic 2.14 import failures - #895

Merged
dgenio merged 1 commit into
mainfrom
fix/mcp-floor-pydantic-compat-20261105
Nov 5, 2026
Merged

dgenio merged 1 commit into
mainfrom
fix/mcp-floor-pydantic-compat-20261105

Conversation

@dgenio

@dgenio dgenio commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

PR #894's required CI check fails in Floor deps (lowest-direct, 3.10) (workflow run 41399477288). The lowest-direct resolver installs mcp==1.19.0 with pydantic==2.14.2. Test collection then raises 16 ImportError exceptions because the old MCP SDK imports pydantic._internal._typing_extra.eval_type_backport, which the newer Pydantic no longer exposes.

Fix

Raise the declared MCP floor to mcp>=1.22.0,<2 (from >=1.19.0,<2). Upstream source inspection verifies that MCP 1.21.0 still imports this private function, while 1.22.0 replaces it with typing_inspection. Preserve the <2 ceiling because the project's adapters still rely on MCP v1 APIs. Update the dependency-floor rationale in pyproject.toml.

Verification

The issue is pre-existing dependency metadata, not attributable to the Action upgrades in #894. No release or publishing workflow is triggered by this PR.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The compatibility guide still advertises MCP 1.19.0 as the supported floor despite the dependency floor increasing to 1.22.0, so both outdated references need updating.

1 open issue
What changed in this PR

Raises contextweaver’s minimum MCP SDK version to avoid Pydantic 2.14 import failures in lowest-direct CI, addressing the dependency issue blocking PR #894.

Changes:

  • Raises the MCP requirement from >=1.19.0,<2 to >=1.22.0,<2, preserving the v1 compatibility ceiling.
  • Updates the dependency comment to explain the new floor and retained ceiling.
File Description
pyproject.toml Raises the MCP minimum version and updates its compatibility rationale.

Review effort: Balanced

Comment thread pyproject.toml
# mcp 1.22 uses typing_inspection instead. The old 1.19 floor
# also ensured the live gateway's required content wire format.
# Ceiling <2: mcp 2.0 removes RequestResponder and other adapter APIs.
"mcp>=1.22.0,<2",
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark delta (vs main)

Soft regression feedback only — this comment never blocks the PR.
Latency budget: ⚠️ when head > base × 1.3. Accuracy budget: ⚠️ when head < base - 1pp.

Routing summary (single backend × catalog sizes)

size recall@k (head Δ vs base) MRR (head Δ vs base) p99 (ms)
50 ✅ 0.5649 (+0.0000) ✅ 0.4978 (+0.0000) ✅ 0.460 (base 0.650)
83 ✅ 0.3825 (+0.0000) ✅ 0.3242 (+0.0000) ✅ 0.576 (base 1.205)
1000 ✅ 0.1475 (+0.0000) ✅ 0.1456 (+0.0000) ✅ 25.867 (base 47.855)

Per-backend × per-size matrix

backend size recall@k (Δ) MRR (Δ) p99 (ms)
bm25 100 ✅ 0.3825 (+0.0000) ✅ 0.3399 (+0.0000) ✅ 4.773 (base 8.399)
bm25 500 ✅ 0.2250 (+0.0000) ✅ 0.2165 (+0.0000) ✅ 22.281 (base 41.865)
bm25 1000 ✅ 0.1575 (+0.0000) ✅ 0.1525 (+0.0000) ✅ 64.775 (base 112.387)
embedding_hashing 100 ✅ 0.5175 (+0.0000) ✅ 0.4360 (+0.0000) ✅ 5.896 (base 7.218)
embedding_hashing 500 ✅ 0.2700 (+0.0000) ✅ 0.2674 (+0.0000) ✅ 31.632 (base 43.171)
embedding_hashing 1000 ✅ 0.2000 (+0.0000) ✅ 0.1931 (+0.0000) ✅ 74.459 (base 102.979)
embedding_st 100 skipped (skipped: missing sentence-transformers) — —
embedding_st 500 skipped (skipped: missing sentence-transformers) — —
embedding_st 1000 skipped (skipped: missing sentence-transformers) — —
fuzzy 100 skipped (skipped: missing rapidfuzz) — —
fuzzy 500 skipped (skipped: missing rapidfuzz) — —
fuzzy 1000 skipped (skipped: missing rapidfuzz) — —
tfidf 100 ✅ 0.3825 (+0.0000) ✅ 0.3220 (+0.0000) ✅ 0.756 (base 1.193)
tfidf 500 ✅ 0.2325 (+0.0000) ✅ 0.2314 (+0.0000) ✅ 6.970 (base 10.803)
tfidf 1000 ✅ 0.1475 (+0.0000) ✅ 0.1456 (+0.0000) ✅ 26.285 (base 42.986)

Context pipeline (per scenario)

scenario tokens dropped dedup
large_catalog 1480 (base 1480, Δ+0) 0 (base 0, Δ+0) 0 (base 0, Δ+0)
long_conversation 2500 (base 2500, Δ+0) 0 (base 0, Δ+0) 0 (base 0, Δ+0)
mixed_payload 488 (base 488, Δ+0) 0 (base 0, Δ+0) 0 (base 0, Δ+0)
short_conversation 487 (base 487, Δ+0) 0 (base 0, Δ+0) 0 (base 0, Δ+0)
stress_conversation 6590 (base 6590, Δ+0) 11 (base 11, Δ+0) 4 (base 4, Δ+0)
tiny_payload 256 (base 256, Δ+0) 0 (base 0, Δ+0) 0 (base 0, Δ+0)

Numbers come from make benchmark / make benchmark-matrix.
Latency is hardware-dependent — treat the markers as a rough guide.
See benchmarks/scorecard.md for the full picture.

@dgenio
dgenio merged commit e99d632 into main Nov 5, 2026
20 checks passed
dgenio pushed a commit that referenced this pull request Nov 5, 2026
Bump the nine GitHub Actions versions across CI, security scanning, docs and release workflows. This PR's branch also synced the MCP floor from already-merged #895 to rerun CI against a compatible Pydantic; no additional package-dependency change is introduced relative to main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants