Add isolated named Python sessions - #25
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
This pull request adds named, isolated Python sessions backed by dedicated Jupyter kernels, exposing them via new MCP tools and REST session lifecycle endpoints, and updates retry behavior so user-code exceptions aren’t retried while infrastructure failures still can be.
Changes:
- Introduces
PythonSessionManagerto create/list/stop named sessions and route execution to session-reserved kernels. - Adjusts kernel lifecycle handling (discard on session stop, wait for newly created kernels to become responsive, refine retry behavior).
- Adds a contract/integration-style test script covering MCP protocol negotiation/tool schemas plus REST session lifecycle.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
server.py |
Adds session manager + MCP/REST session APIs; changes kernel lifecycle + retry/error behavior. |
test-sessions.py |
Adds end-to-end contract tests for MCP tools, session isolation, concurrency, capacity limits, and REST lifecycle. |
README.md |
Documents new MCP tools for starting/listing/stopping sessions and how to pass session_id. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mkagenius
left a comment
There was a problem hiding this comment.
I built PR 25's actual head ( 3d60721 ) and ran it. Everything passed:
Summary
Testing