Repository navigation
Stabilize MCP refresh regression tests - #1772
Conversation
There was a problem hiding this comment.
Pull request overview
Stabilizes MCP OAuth proxy refresh regression tests by removing dependency on shared process env state and aligning mocked proxy responses with token metadata expectations.
Changes:
- Make proxy-refresh regression tests deterministic by guarding and resetting OAuth proxy-related env vars during tests.
- Use a local, dynamically generated
token_urlfor the proxy-configured MCP refresh test. - Replace allocator-sensitive lock pointer assertions with
Weak/Arc::ptr_eq-based assertions and align mock proxy responses to includetoken_typeandscope.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tools/mcp/auth.rs | Makes MCP refresh/proxy tests deterministic (env isolation, local token URL) and makes refresh-lock tests robust by avoiding pointer-based assertions. |
| src/cli/oauth_defaults.rs | Updates mock proxy token responses to include token_type and scope to match token metadata assertions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request enhances the test suite for OAuth and MCP authentication. It updates mock JSON responses to include token_type and scope, replaces hardcoded test URLs with dynamic values, and improves concurrency tests by implementing environment variable guards and more precise Arc pointer comparisons. I have no feedback to provide.
Summary
Testing