Skip to content

fix(mcp): make handle_resource_status robust#124

Merged
MaojiaSheng merged 1 commit intovolcengine:feat/server-mcpfrom
ZaynJarvis:fix/mcp-router-robustness
Feb 12, 2026
Merged

fix(mcp): make handle_resource_status robust#124
MaojiaSheng merged 1 commit intovolcengine:feat/server-mcpfrom
ZaynJarvis:fix/mcp-router-robustness

Conversation

@ZaynJarvis
Copy link
Collaborator

Changes

  • Bugfix: Ensure _initialized is always a boolean before JSON serialization in handle_resource_status()
  • Prevents potential TypeError when service._initialized is not a bool (e.g., during mocking)

Tests

  • Added comprehensive test suite for MCP router: tests/server/test_mcp.py
  • 12 tests covering all MCP endpoints:
    • GET /mcp (server info)
    • initialize, ping
    • tools/list, resources/list
    • tools/call (search_find, fs_ls)
    • resources/read
    • Error handling (unknown tool, unknown resource, invalid JSON, unknown method)

All tests pass.

@CLAassistant
Copy link

CLAassistant commented Feb 10, 2026

CLA assistant check
All committers have signed the CLA.

@ZaynJarvis ZaynJarvis changed the title fix(mcp): make handle_resource_status more robust [WIP]: fix(mcp): make handle_resource_status more robust Feb 11, 2026
- Ensure _initialized is always a boolean before JSON serialization
- Prevents TypeError when service._initialized is not a bool
- Add comprehensive test suite for MCP router (12 tests)
@ZaynJarvis ZaynJarvis force-pushed the fix/mcp-router-robustness branch from 85e8fa3 to c600f19 Compare February 11, 2026 13:28
@ZaynJarvis ZaynJarvis changed the title [WIP]: fix(mcp): make handle_resource_status more robust fix(mcp): make handle_resource_status more robust Feb 12, 2026
@ZaynJarvis ZaynJarvis changed the title fix(mcp): make handle_resource_status more robust fix(mcp): make handle_resource_status robust Feb 12, 2026
@MaojiaSheng MaojiaSheng merged commit d84be79 into volcengine:feat/server-mcp Feb 12, 2026
1 check passed
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.

3 participants