Skip to content

Commit b586a45

Browse files
Merge branch 'main' into fix/pre-parse-json-str-union
2 parents 839ec38 + be5bb7c commit b586a45

File tree

91 files changed

+4041
-5735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4041
-5735
lines changed

.github/workflows/shared.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,19 @@ jobs:
2626
with:
2727
extra_args: --all-files --verbose
2828
env:
29-
SKIP: no-commit-to-branch
29+
SKIP: no-commit-to-branch,readme-v1-frozen
30+
31+
# TODO(Max): Drop this in v2.
32+
- name: Check README.md is not modified
33+
if: github.event_name == 'pull_request'
34+
run: |
35+
git fetch --no-tags --depth=1 origin "$BASE_SHA"
36+
if git diff --name-only "$BASE_SHA" -- README.md | grep -q .; then
37+
echo "::error::README.md is frozen at v1. Edit README.v2.md instead."
38+
exit 1
39+
fi
40+
env:
41+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
3042

3143
test:
3244
name: test (${{ matrix.python-version }}, ${{ matrix.dep-resolution.name }}, ${{ matrix.os }})

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ repos:
5555
language: system
5656
files: ^(pyproject\.toml|uv\.lock)$
5757
pass_filenames: false
58+
# TODO(Max): Drop this in v2.
59+
- id: readme-v1-frozen
60+
name: README.md is frozen (v1 docs)
61+
entry: README.md is frozen at v1. Edit README.v2.md instead.
62+
language: fail
63+
files: ^README\.md$
5864
- id: readme-snippets
5965
name: Check README snippets are up to date
6066
entry: uv run --frozen python scripts/update_readme_snippets.py --check

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ This document contains critical information about working with this codebase. Fo
2828
- Bug fixes require regression tests
2929
- IMPORTANT: The `tests/client/test_client.py` is the most well designed test file. Follow its patterns.
3030
- IMPORTANT: Be minimal, and focus on E2E tests: Use the `mcp.client.Client` whenever possible.
31+
- IMPORTANT: Before pushing, verify 100% branch coverage on changed files by running
32+
`uv run --frozen pytest -x` (coverage is configured in `pyproject.toml` with `fail_under = 100`
33+
and `branch = true`). If any branch is uncovered, add a test for it before pushing.
3134

3235
Test files mirror the source tree: `src/mcp/client/streamable_http.py``tests/client/test_streamable_http.py`
3336
Add tests to the existing file for that module.

0 commit comments

Comments
 (0)