Skip to content

test(sdk/python): drop the stale enable_mcp kwarg from Agent fixtures - #1120

Merged
AbirAbbas merged 1 commit into
mainfrom
fix/python-tests-fastapi-0148
Oct 19, 2026
Merged

AbirAbbas merged 1 commit into
mainfrom
fix/python-tests-fastapi-0148

Conversation

@AbirAbbas

Copy link
Copy Markdown
Contributor

Summary

FastAPI 0.148.0, released today, no longer accepts unknown keyword arguments in FastAPI.__init__. Agent forwards its extra kwargs to FastAPI, and six tests still passed enable_mcp=False, an Agent parameter that no longer exists. They now fail with TypeError: FastAPI.__init__() got an unexpected keyword argument 'enable_mcp', which fails coverage (sdk-python) and therefore the required coverage-summary check on every open PR.

This removes the stale kwarg from those six fixtures. No SDK code changes.

Testing

  • ruff check . (ruff 0.15.22): clean
  • ./scripts/run_pytest.sh with FastAPI 0.148.0 on Python 3.12: 2558 passed, 4 skipped, 0 failed

🤖 Generated with Claude Code

FastAPI 0.148.0 (released 2026-10-19) no longer accepts unknown keyword
arguments in FastAPI.__init__. Agent forwards its extra kwargs to FastAPI,
and six tests still passed enable_mcp=False, an Agent parameter that no
longer exists, so they now fail with a TypeError and break the sdk-python
coverage job on every PR.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AbirAbbas
AbirAbbas requested a review from a team as a code owner October 19, 2026 17:31
@github-actions

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.1 KB - 0.26 µs -26% ✓ ✓

✓ No regressions detected

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 88.00% 87.40% ↑ +0.60 pp 🟡
sdk-go 93.30% 92.00% ↑ +1.30 pp 🟢
sdk-python 94.72% 93.73% ↑ +0.99 pp 🟢
sdk-typescript 91.77% 90.42% ↑ +1.35 pp 🟢
web-ui 84.77% 84.79% ↓ -0.02 pp 🟡
aggregate 85.96% 85.75% ↑ +0.21 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 — ➖ no changes
sdk-go 0 — ➖ no changes
sdk-python 0 — ➖ no changes
sdk-typescript 0 — ➖ no changes
web-ui 0 — ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@AbirAbbas
AbirAbbas merged commit 8aa3aba into main Oct 19, 2026
32 checks passed
@AbirAbbas
AbirAbbas deleted the fix/python-tests-fastapi-0148 branch October 19, 2026 17:42
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.

1 participant