Repository navigation
docs: add snippet verification for docs/ pages - #2115
Merged
Merged
Conversation
maxisbey
force-pushed
the
fweinberger/v1x-docs-links
branch
from
February 23, 2026 15:20
09b9e62 to
4f64325
Compare
maxisbey
force-pushed
the
fweinberger/v1x-docs-snippets
branch
from
February 23, 2026 15:24
f401457 to
9fac4d1
Compare
maxisbey
marked this pull request as ready for review
February 23, 2026 15:24
Extend the snippet verification system to cover docs/*.md in addition to README.md. Create runnable example files for all 18 new code snippets. Script changes: - Rename update_readme_snippets.py -> update_doc_snippets.py - Process README.md + all docs/*.md files via glob - Update CI job and pre-commit hook references New snippet files (18): - examples/snippets/servers/: audio, binary resources, resource templates, resource subscriptions, embedded resource results (text + binary), prompt embedded resources, prompt image content, prompt change notifications, tool change notifications, elicitation enum/complete, set logging level, JSON schema - examples/snippets/clients/: roots, SSE client, logging, cancellation All snippet-source tags verified: uv run scripts/update_doc_snippets.py --check
maxisbey
force-pushed
the
fweinberger/v1x-docs-snippets
branch
from
February 23, 2026 15:31
9fac4d1 to
4725650
Compare
maxisbey
approved these changes
Feb 23, 2026
Stacked on #2102.
Motivation and Context
The existing snippet verification system (
update_readme_snippets.py) only checked README.md. The new docs/ pages have code examples that should also be verified against runnable source files.How Has This Been Tested?
uv run scripts/update_doc_snippets.py --checkpasses (all 10 doc files verified)uv run pre-commit run --all-filespasses all hooksBreaking Changes
None. CI job renamed from
readme-snippetstodoc-snippets.Types of changes
Additional context
update_readme_snippets.py->update_doc_snippets.pyexamples/snippets/<!-- snippet-source -->for CI verification