Repository navigation
Conversation
|
cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2f3fa79. Configure here.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Reviewed and refreshed this migration at source-branch head Independent validation (Python 3.12,
Not recommending merge yet: this is a breaking protocol migration, not a safe dependency-ceiling bump. A real managed-client probe confirms Final read-back confirms PR and fork head both equal |
Resolve validation-runtime FastMCP conflict with 4.1.2, the 4.x release containing the transformed-component authorization fixes backported in main 3.4.10. Retain unrelated dependency versions and existing legacy/protocol behavior; release acceptance remains a maintainer gate.
tests/validation_runtime/uv.lock conflicted with main's pillow 13 and gradio 6.32 relock (openenv#1620). Take main's lock and relock with fastmcp pinned to 4.1.2, which reproduces this branch's six package changes. Relock tests/tau2_runtime too: main's root pyproject moved on, so its openenv metadata was stale and uv lock --check failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
|
|
After the
|
Summary
Upgrade the core runtime to FastMCP 4 while preserving OpenEnv's managed session semantics and migrating harness sampling to the supported guard protocol.
fastmcp>=4.0.10,<5.0.0, with the FastAPI and Pydantic floors required by SDK v2.Type of Change
Compatibility notes
FastMCP 4 removes
Context.sample()even on legacy connections. Harness tools that borrow the client's model should returnInputRequiredResultwith aCreateMessageRequestand consumectx.input_responseson the continuation. The client'ssampling_handlerremains supported.Sampling guards require modern connections; the legacy internal client used for managed OpenEnv tool calls does not accept modern guards. The migration is documented rather than claiming the removed API is transparently restored.
Alignment Checklist
RFC Status
Not required: dependency migration, internal compatibility fixes and regression tests; no new public OpenEnv signatures or architectural abstractions. RFC 003/005 boundaries are preserved.
Test Plan
Completed on this exact head commit:
FASTMCP_MCP_CAMELCASE_COMPAT=false: 834 passed, 1 skipped.git diff --checkpass.The standalone local lint hook reports the same existing usort/Ruff formatting differences as the clean upstream baseline (including environment Markdown). The repository's exact CI lint pipeline passes. No unrelated mass formatting is included. The local test hook requires GNU
timeout, absent on this macOS host; the full Linux CI selection was run instead.Review Notes
No new debugger statements, public Gym signature changes, reward relocation or agent access to simulation controls. External-service/network/Docker-marked tests remain excluded by the existing CI configuration.
Note
High Risk
Breaking dependency upgrade touches core MCP session handling, HTTP tool discovery, and harness protocol negotiation; regressions could affect production MCP clients and cross-call tool state.
Overview
Upgrades the core runtime to FastMCP 4 (
fastmcp>=4.0.10) with bumped FastAPI and Pydantic floors, and adapts OpenEnv so managed MCP sessions and harness tooling still behave as before.Managed MCP sessions now connect internal clients with
Client(..., mode="legacy")soctx.get_state()/ctx.set_state()persist across tool calls within an OpenEnv HTTP or WebSocket session. Tool discovery maps FastMCP’sinput_schemato the wireinputSchemaalias (e.g.model_dump(by_alias=True)on HTTP).Harness bridge mirrors each front connection’s protocol era onto the stateful proxy backend so modern sampling guards (
InputRequiredResult/ctx.input_responses) work through renamed tools, while legacy connections keep per-session state isolation.Docs describe the FastMCP 4 session model and the migration away from
Context.sample(). CI runs τ²-bench tests from a newtests/tau2_runtimeproject with lock checks; regression tests cover schema aliases, session isolation, and harness sampling/state/progress.Reviewed by Cursor Bugbot for commit b3ae6ac. Bugbot is set up for automated code reviews on this repo. Configure here.