Skip to content

Trim the migration guide to genuine v1-to-v2 breaking changes - #3183

Open
maxisbey wants to merge 1 commit into
mainfrom
migration-doc-cleanup
Open

Trim the migration guide to genuine v1-to-v2 breaking changes#3183
maxisbey wants to merge 1 commit into
mainfrom
migration-doc-cleanup

Conversation

@maxisbey

@maxisbey maxisbey commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Cuts docs/migration.md down to what it is for: someone with working v1.x code that breaks (or silently changes behavior) on v2, and needs to know what to write instead. Rebased onto current main (post-2.1.1) with every example re-verified against today's v1.x and main.

Motivation and Context

The guide had drifted into a changelog: new-in-v2 feature notes, "what did not change" inventories, spec-adoption commentary, deprecations of APIs that still work, and internal fixes with nothing for a migrator to change, alongside stale before/after code and a fair amount of history narration. A porter (or an agent pointed at the page) had to sieve for the parts that apply.

What changed:

  • Removed non-migration entries (102 → 80 sections): the whole Deprecations group, the "what did not change" sections, the mcp dev/mcp install pinning note, the 4 MiB body limit (also on v1.x; kept as a clause beside max_request_body_size), the resolver capability gate, the stdio_client shutdown rework, SEP-2352/SEP-2350 adoption, lowlevel-handler registration through private attributes, the subscribe-capability fix, client_secret_post/-32601 wire notes, and the Mcp-Param-* section. The two deprecation consequences a migrator does act on stay, under Testing utilities: warnings-as-errors suites failing on MCPDeprecationWarning, and the client calls that go dead on the default 2026-era Client(server) connection (mode="legacy" restores them).
  • Corrected code and claims against current 2.x: mcp.types is a permanent alias (imports keep working), issuer= on the client-credentials providers, session_idle_timeout/max_sessions in the moved-parameters list, UnexpectedToolError on direct call_tool(), the removed ValidationError, PRM discovery failures, and more. Every remaining before/after block was executed or import-checked against v1.x and main.
  • Two entries added for 2.1 behavior the guide never recorded: exception messages from @mcp.tool() handlers no longer reach the model unless raised as ToolError, and content-block return annotations no longer produce output_schema/structured_content.
  • Reframed "Notes for 2026-era connections" as "Behavior changes on v2's default connection" (symptom-first: NoBackChannelError, log opt-in, listen-only change notifications), folded near-duplicates (dependency requirements, default server identity, direct calls to MCPServer protocol methods, the in-memory testing helper), standardized imports, regenerated the index and suggested-order blocks, and cut history and over-explanation throughout.

How Has This Been Tested?

Each surviving example was executed or import-checked against the corresponding tree (v1.x for "Before", main for "After"), driving handler code through the in-memory client where relevant. scripts/docs/build.sh (strict Zensical build, render-order and cross-reference checks) and markdownlint pass; every intra-document anchor resolves under both GitHub and Python-Markdown slug rules, and the headings other pages (and the mcp.server.fastmcp shim message) link to are unchanged.

Breaking Changes

None — documentation only.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Also touches docs/whats-new.md, only to drop two links whose target sections this removes (mcp dev/mcp install pinning and Mcp-Param-*); the strict build aborts on missing anchors. migration.md is excluded from translation, but the translated whats-new.md pages still carry those two links until the translation tool is next run (their builds are non-strict, so this is a warning, not a failure).

AI Disclaimer

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 1 file

Not reviewed (too large): docs/migration.md (~2,117 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation preview

Preview https://pr-3183.mcp-python-docs.pages.dev
Deployment https://98fe232d.mcp-python-docs.pages.dev
Commit 934a417
Triggered by @maxisbey
Updated 2026-09-04 19:44:42 UTC

Comment thread docs/migration.md Outdated

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing the two dangling whats-new.md anchors from my earlier comment — commit 426de27 resolves that, and I found no new issues this run. Still deferring to a human for a final pass, since this is a large editorial rewrite of the migration guide whose behavioral claims (which v1 examples run, what was cut as non-migration content) can't be fully verified mechanically.

What was reviewed:

  • Every cross-page link to migration.md#... anchors (7 remaining) resolves against the trimmed headings; no other page links to a deleted section.
  • Every intra-document anchor in migration.md (the "Find your changes" tables, suggested order, and inline cross-references) matches an existing heading slug.
  • Relative doc links check out; the two api/ targets are generated at build time per mkdocs.yml.
Extended reasoning...

Overview

This PR is documentation-only: it trims docs/migration.md from 91 to 73 sections, removing entries that were changelog/deprecation notes rather than genuine v1-to-v2 breaking changes, correcting several before/after code blocks, and folding near-duplicate entries. It also drops two links from docs/whats-new.md whose target sections the trim removes — the exact issue a prior run of this review flagged, now resolved by commit 426de27.

Security risks

None. No code, configuration, or CI changes — only Markdown under docs/. The removed sections include some security-adjacent content (SEP-2243 header validation, credential binding), but removing documentation of shipped behavior does not change the behavior itself.

Level of scrutiny

Docs-only changes warrant moderate scrutiny: the failure mode is misleading migration guidance, not broken software. I mechanically verified everything verifiable — all cross-page and intra-document anchors resolve, no other docs page links to a deleted section, and relative links point at real (or build-generated) files. What cannot be verified mechanically is the content accuracy of the rewritten prose and code examples: the author states every surviving before/after block was executed against v1.x and main respectively, but I cannot reproduce that here, and the judgment calls about which entries count as "genuine migration content" (e.g. dropping the SEP-2352/SEP-2350 notes and the "Notes for 2026-era connections" group entirely) are editorial decisions a maintainer should sign off on.

Other factors

The prior review cycle worked as intended: the one concrete defect (dangling anchors) was reported inline and fixed in a follow-up commit before this run. The bug hunting system found nothing further. Given the size of the rewrite (~700 changed lines in migration.md) and the repository's own AGENTS.md emphasis on migration-guide accuracy for the v2 line, a human skim of the removed and rewritten sections is the remaining review work — hence deferral rather than approval.

@maxisbey
maxisbey force-pushed the migration-doc-cleanup branch from 426de27 to d0dc9bd Compare July 28, 2026 18:17

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

This review may be incomplete: some analysis steps could not run due to a temporary API capacity limit.

The guide had accumulated entries that are not v1-to-v2 migration
items: new v2 feature notes, "what did not change" reassurance
sections, spec-adoption commentary, deprecations of APIs that still
work, and internal fixes with nothing for a migrator to change. Remove
those, including the whole Deprecations group; the two deprecation
consequences a migrator does act on (warnings-as-errors test runs, and
client calls that die on the default 2026-era connection) live in the
testing section.

Correct code and claims that were wrong for v1.x or stale for current
2.x, and verify every remaining before/after example against the v1.x
and main trees. Two behavior changes that shipped in 2.1 without a
guide entry get one: exception messages from tool handlers no longer
reach the model unless raised as ToolError, and content-block return
annotations no longer produce structured output. Reframe the 2026-era
notes as behavior changes migrated code sees on v2's default connection,
fold closely related entries together, standardize on the documented
imports, regenerate the index and suggested-order blocks, and cut
history and over-explanation throughout.

Also drop two whats-new.md links whose target sections this removes.

No-Verification-Needed: documentation-only change
@maxisbey
maxisbey force-pushed the migration-doc-cleanup branch from d0dc9bd to 934a417 Compare September 4, 2026 19:42

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review found no issues

No high-confidence issues detected in this change.

2 verified lower-impact observations (convention, logging or cleanup points) were not posted.

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