fix(mcp): attach session manager for non-OAuth HTTP clients (#793)#986
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request re-implements an approved fix to ensure that non-OAuth HTTP clients are properly configured with a session manager. The original PR became outdated due to recent refactoring, so this update integrates the necessary logic into the current codebase and includes dedicated tests to prevent future regressions, thereby maintaining consistent session tracking across client types. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly attaches the MCP session manager to non-OAuth HTTP clients, ensuring consistent session handling across all HTTP-based clients created by the factory. The change is straightforward and is accompanied by a focused regression test.
…) (nearai#986) * fix(mcp): attach session manager for non-OAuth HTTP clients (nearai#793) * style(mcp): format factory regression test (nearai#986)
…) (nearai#986) * fix(mcp): attach session manager for non-OAuth HTTP clients (nearai#793) * style(mcp): format factory regression test (nearai#986)
Summary
#793MCP session-manager fix onto currentstagingWhy this replacement exists
Original PR
#793is approved but dirty after subsequent MCP refactors landed onstaging. In currentstaging, the CLI path already routes throughcreate_client_from_config, so this replacement preserves the original intent in the remaining live code path.Supersedes approved PR
#793.Validation
cargo test session_manager -- --nocapturetools::mcp::client::tests::test_with_session_managertools::mcp::factory::tests::test_factory_non_oauth_http_has_session_manager