Skip to content

Integration support#329

Merged
xzrderek merged 1 commit intomainfrom
derekx/integrate
Nov 13, 2025
Merged

Integration support#329
xzrderek merged 1 commit intomainfrom
derekx/integrate

Conversation

@xzrderek
Copy link
Contributor

@xzrderek xzrderek commented Nov 13, 2025

Note

Add shared/per-run MCP server lifecycle with configurable port and a helper to build rollout configs, and expose eval params metadata on the test wrapper.

  • Pytest rollout processing:
    • MCPGymRolloutProcessor: adds server_mode ("per_run" or "shared") with class-level shared server lifecycle, guarded by a lock; honors start_server, configurable port, and forwards extra server kwargs; endpoint now uses http://localhost:{port}; cleanup skips stopping shared server.
  • Evaluation test wrapper:
    • Attaches execution params metadata via __ep_params__ on the dual-mode wrapper.
  • Utilities:
    • Adds build_rollout_processor_config(...) to construct RolloutProcessorConfig, supporting MCP-specific options (start_server, server_mode, server_script_path).
  • Types:
    • Introduces ServerMode literal type in eval_protocol/pytest/types.py.

Written by Cursor Bugbot for commit d91a56f. This will update automatically on new commits. Configure here.

"Shared MCP server not started. Call with server_mode='shared' and start_server=True first."
)
# Bind this instance to the shared server for this call
self.server = MCPGymRolloutProcessor._shared_server
Copy link

Choose a reason for hiding this comment

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

Bug: Shared Server Port Mismatch Breaks Connections

In shared server mode, the port used to create the shared server is not validated against the port requested in subsequent calls. If the first call creates a shared server on port 9700, but a second call requests port 8000, the code reuses the server on port 9700 but attempts to connect to port 8000 at line 304, causing connection failures.

Fix in Cursor Fix in Web

Copy link
Collaborator

@dphuang2 dphuang2 left a comment

Choose a reason for hiding this comment

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

LGTM

@xzrderek xzrderek merged commit d301d0e into main Nov 13, 2025
13 of 16 checks passed
@xzrderek xzrderek deleted the derekx/integrate branch November 13, 2025 22:26
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.

2 participants