Commit Graph
633 Commits
Author SHA1 Message Date
Michael Panchenko 4a4b665d60 Testing: allow setting PYTEST_MARKERS to control which tests to run by default 2025-06-14 01:25:31 +02:00
Michael Panchenko 9c28f90139 Major: Implement process isolation for MCP server to prevent asyncio deadlocks
ROOT CAUSE: Asyncio event loop contamination between MCP server and SerenaAgent
  was causing intermittent deadlocks. MCP server runs in its own asyncio loop,
  but SerenaAgent creates coroutines that leak into the MCP context, leading to
  unawaited coroutines and eventual event loop blocking.

  SOLUTION: Complete process isolation with clean architecture

  Process Isolation Changes:
  - Add ProcessIsolatedSerenaAgent wrapper that runs SerenaAgent in separate process
  - Implement JSON-RPC based IPC for communication between MCP server and agent
  - Add SerenaAgentWorker class to handle requests in the isolated process
  - Centralize error handling in _make_request_with_result() helper method
  - Use serena_config.tool_timeout instead of hardcoded timeout parameters

  Architecture Improvements:
  - Define ToolProtocol interface for clean tool contracts
  - Implement ProcessIsolatedTool with complete Tool interface (apply + apply_ex)
  - Remove hacky make_process_isolated_tool function - use single make_tool path
  - Eliminate inheritance abuse - ProcessIsolatedTool implements protocol cleanly
  - Preserve full docstring parsing functionality through process boundary

  MCP Server Updates:
  - Update start_mcp_server() to use process isolation by default
  - Maintain backward compatibility with create_mcp_server_and_agent()
  - Retrieve tool metadata from isolated process for proper MCP tool creation
  - Ensure proper process lifecycle management in server lifespan handlers

  Key Benefits:
  - Prevents asyncio contamination deadlocks completely
  - Maintains full docstring parsing and parameter schema generation
  - Clean protocol-based architecture with no inheritance hacks
  - Centralized configuration-driven timeout handling
  - All tools implement consistent apply_ex interface
  - Process isolation is transparent to MCP clients

  This fix ensures that MCP symbolic tools no longer create deadlocks
2025-06-14 01:25:30 +02:00
Michael Panchenko 4514d04c90 Minor (docstrings, validation) 2025-06-14 00:27:25 +02:00
Michael Panchenko f3901dfec2 Fix: trace_lsp_communication in yaml was ignored 2025-06-14 00:01:10 +02:00
Michael Panchenko cd10d2f056 Minor 2025-06-13 23:33:15 +02:00
Michael Panchenko 3f5b4da532 More config options for logging in tests, formating 2025-06-13 23:31:48 +02:00
Michael Panchenko 2fba67f231 LS: hacky solution for waiting till pyright and ts servers are ready 2025-06-13 23:31:31 +02:00
Michael Panchenko 5c530fa642 Multilspy logger: default stacklevel to 2 2025-06-13 23:31:31 +02:00
Michael Panchenko 8c465b53f7 LS: minor deduplication, logging 2025-06-13 23:31:27 +02:00
Michael Panchenko 386a8df54e Timeout fixup 2025-06-13 23:30:58 +02:00
Michael Panchenko b1e14d8267 Force-added ingored file in test resources
Needed for tests involving ignored patterns
2025-06-13 23:29:35 +02:00
Michael Panchenko 71ab18fddf Agent: force log format through basicConfig
Needed to make multilspy logs respect our log format
2025-06-13 23:29:35 +02:00
Michael Panchenko 40e9bb87c1 Tests: use gitignore parser in LS setup, remove duplication 2025-06-13 23:29:35 +02:00
Michael Panchenko 47a133a7c0 Typo 2025-06-13 23:29:35 +02:00
Michael Panchenko 3ca27e47d5 Fix tests to correctly use gitignore for LS setup 2025-06-13 23:29:35 +02:00
Michael Panchenko 3b04d0b867 Advice to restart LS in tool failure message 2025-06-12 15:09:38 +02:00
Michael Panchenko 36dbf5c681 Possibility to override tool timeout through CLI 2025-06-12 15:09:38 +02:00
Michael Panchenko bdaedfd3e5 Added Claude.md 2025-06-12 15:09:38 +02:00
Michael Panchenko 0c5a98236f Gitignore: fix handling of anchored ignores
Previously anchored ignores would be erroneosly ingored everywhere
2025-06-11 17:09:33 +02:00
Michael Panchenko 40b9a246f0 Multilspy: fix dotnet version detection
don't just use first line of output, instead use latest available and allowed version
2025-06-11 17:08:32 +02:00
Michael Panchenko b33af12203 Merge pull request #166 from oraios/enhance_nonsymbolic_search_tools
Gitignore handling and read-edit tools - important fixes and improvments
2025-06-11 16:01:23 +02:00
Michael Panchenko 9c7440861b Gitignore handling and read-edit tools - important fixes and improvments
1. Use all gitignore files in SerenaAgent, not just top level
2. Listing and file finding tools now can find all non-ignored files (previously they would only find code files)
3. Read and edit tools will raise an error on attempting to operate on an ignored file or a path outside the project root
2025-06-11 15:56:54 +02:00
Michael Panchenko 9cf18b3b0c Merge pull request #164 from oraios/fix_ls_stop_racing_conditions
Fix ls stop racing conditions
2025-06-10 01:22:17 +02:00
Michael Panchenko 6c03f10f8d No rust tests on ubuntu either for now 2025-06-10 01:09:36 +02:00
Michael Panchenko c14fff0517 No java tests on ubuntu for now 2025-06-10 01:03:45 +02:00
Michael Panchenko d1537d682c CI: maybe rust and java run? 2025-06-10 00:36:25 +02:00
Michael Panchenko 993c6f6dfd Mercilessly kill all asyncio stuff at shutdown 2025-06-10 00:29:37 +02:00
Michael Panchenko d2cd006007 More logging in tests 2025-06-09 22:01:03 +02:00
Michael Panchenko 1c6af8cfea LS: attempt at more robust shutdown 2025-06-09 21:54:55 +02:00
Michael Panchenko ce0c82869b LS: thread-safe cache read/write through locking 2025-06-09 18:07:24 +02:00
Michael Panchenko 9202924189 LS: logging, thread-safe shutdown 2025-06-09 17:58:02 +02:00
Michael Panchenko c987445faf LS: more logging, more robust server shutdown on stop
Previously shutdown relied on garbage collection and occasionally failed (probably due to racing conditions)
2025-06-09 16:16:52 +02:00
Michael Panchenko d73c976fd4 Merge pull request #155 from nikita2206/feature/java-21-support
feat: Add Java 21 support to multilspy
2025-06-08 12:29:34 +02:00
Michael Panchenko 413097c8f9 Merge pull request #156 from mdbenito/fix/docker-build
Fix docker build
2025-06-06 12:52:00 +02:00
Miguel de Benito Delgado 3ba52bdfc1 Add missing ssh client to docker image 2025-06-06 10:30:16 +00:00
Miguel de Benito Delgado 1772bfdb92 Fix wrong shell and missing file in Dockerfile for uv 2025-06-06 10:26:31 +00:00
nikita2206andClaude 597c28c8e8 feat: Add Java 21 support to multilspy
- Update Eclipse JDTLS to vscode-java v1.42.0 with Java 21.0.7 JRE
- Update Kotlin language server dependencies to use Java 21
- Update test Maven project to use Java 21 compiler settings
- Update runtime configuration from JavaSE-17 to JavaSE-21
- Update dependency versions: lombok 1.18.36, launcher 1.7.0

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-06 11:10:36 +02:00
Michael Panchenko 1af077a2b4 gui_log_level -> log_level. Also added possibility to set trace_lsp_communication in config and cli
[ci skip]
2025-06-05 16:55:42 +02:00
Michael Panchenko 1c016248eb Multilspy: slightly more logging and better typing 2025-06-05 16:36:48 +02:00
Michael Panchenko 9a6970380f Minor extension in log messages [ci skip] 2025-06-05 15:20:20 +02:00
Michael Panchenko 54289ea3eb Configure multilspy log_level using serena config [ci skip] 2025-06-05 14:24:53 +02:00
Dominik Jain 11bcdb00f3 Merge pull request #150 from oraios/multilspy-update
Multilspy update
2025-06-05 01:24:30 +02:00
Dominik Jain 2a11fefcaa Add None check (mypy) 2025-06-05 00:23:04 +02:00
Dominik Jain 83a14c6872 Use central log level configuration for both GUI and dashboard 2025-06-05 00:22:11 +02:00
Dominik Jain 4bcda6ef1f Hotfix: GUI log window failure due to incorrect path 2025-06-05 00:06:12 +02:00
Michael Panchenko 7445bbcc42 Revert GH changes, don't run snapshot tests on Windows 2025-06-04 21:23:21 +02:00
Michael Panchenko 08e0711ee7 GH: try full test suite again 2025-06-04 21:04:30 +02:00
Michael Panchenko f04d3e44ff MCP: try stopping ls in server_lifespan 2025-06-04 21:03:46 +02:00
Michael Panchenko 7b5f59624b Show loglevel in mcp logs 2025-06-04 21:03:40 +02:00
Michael Panchenko 2ecee5003c Dashboard: use configured log level 2025-06-04 21:03:34 +02:00