Repository navigation
chore(deps): pin mcp <2.0 to guard _compat.py shim - #125
Merged
Merged
Conversation
src/hive/_compat.py monkey-patches private attributes on mcp.shared.session.RequestResponder (_completed, _on_complete, _entered, _cancel_scope, __exit__, respond) to work around the cancel-race tracked at modelcontextprotocol/python-sdk#2610. Until upstream lands a fix and we can drop the shim, ANY mcp release that renames these private attributes will silently break the shim. The shim is self-gated and degrades to a WARNING log + no-op, so the server doesn't crash — but the cancel-race protection disappears. Pinning `<2.0` forces a deliberate review on the next major release (the most likely place for a RequestResponder refactor). When the upper bound needs lifting, the workflow is: 1. Bump mcp lower bound, hold upper at 2.0 2. Run the suite (in particular tests/test_compat_shim.py) 3. If the shim still applies cleanly (no WARNING in apply() output), the bump is safe. Otherwise port the shim to the new internals. Lock file regenerated: mcp pinned at 1.26.0 (current). Refs: src/hive/_compat.py docstring; HIVE-115 PR-4 wraps the related multi-process termination authority via bounded_call.
mlorentedev
added a commit
that referenced
this pull request
May 23, 2026
#126) ## Summary Configures Dependabot for three ecosystems, each emitting **ONE grouped PR per week** (Monday 07:00 America/Denver): | Ecosystem | Where | Group | Special | |-----------|-------|-------|---------| | pip | `/pyproject.toml` + `uv.lock` | all (minor + patch only) | `mcp` major-version-update **ignored** — see [_compat.py shim](https://github.com/mlorentedev/hive/blob/master/src/hive/_compat.py) (tracker [modelcontextprotocol/python-sdk#2610](modelcontextprotocol/python-sdk#2610)) | | github-actions | `/.github/workflows/` | all | — | | npm | `/site` (Astro + Starlight) | all (minor + patch only) | separate PR so docs-site bumps don't mix with Python | Three PRs/week ceiling under normal load — well below the "20 stale Dependabot PRs" failure mode that prompted this. ## Why grouped weekly instead of per-package daily? - Per-package daily produces a long backlog of one-line PRs nobody triages - Grouped weekly produces ONE rebase-able PR per ecosystem the maintainer can review in 5 minutes - `make check` runs on every PR via existing CI, so regressions are caught before merge ## Test plan - [x] YAML syntax validates locally (visually + against Dependabot schema; will get rejected at PR time if invalid) - [ ] First Dependabot run after merge (next Monday) opens at most 3 PRs total Refs: HIVE-115 follow-up; pairs with PR #125 (mcp `<2.0` pin).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/hive/_compat.pymonkey-patches private attributes onmcp.shared.session.RequestResponder(_completed,_on_complete,_entered,_cancel_scope,__exit__,respond) to work around the cancel-race tracked upstream at modelcontextprotocol/python-sdk#2610.Until the upstream fix lands, ANY
mcprelease that renames these internals will silently break the shim. The shim is self-gated and degrades to a WARNING + no-op (no crash), but the cancel-race protection disappears.Pin
mcp>=1.26,<2.0forces a deliberate review on the next major release — the most likely place for aRequestResponderrefactor.Test plan
make check→ 573 passed, 2 skipped, 87% coverage; no behaviour changeuv lockregenerated;mcpresolves to 1.26.0 (current)pyproject.tomldocuments the bump workflow for future maintainersBump workflow (when this PR's pin needs widening)
pytest tests/test_compat_shim.py— the cancel-race test exercises the shim path_compat.apply()returns without WARNING log, the bump is safeRefs:
src/hive/_compat.pydocstring.