Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 51 additions & 26 deletions DEVELOPER_GUIDE.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions TESTING_GUIDE.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions changelog.d/unreleased/4848.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
category: fixed
issues:
- 4848
affected:
- src/CodeIndex/Mcp/McpServer.Initialization.cs
- src/CodeIndex/Mcp/McpServer.MessageDispatch.Single.cs
- src/CodeIndex/Mcp/McpServer.Transport.ConcurrentLoop.cs
- src/CodeIndex/Mcp/McpServer.Transport.cs
- src/CodeIndex/Mcp/McpServer.cs
- src/CodeIndex/Mcp/McpToolHandlers.cs
- tests/CodeIndex.Tests/McpAuditLogTests.cs
- tests/CodeIndex.Tests/McpServerProtocolTests.cs
- tests/CodeIndex.Tests/McpServerTests.cs
- DEVELOPER_GUIDE.md
- TESTING_GUIDE.md
---

## English

- **MCP sessions now enforce one initialization and protocol-correct capability direction (#4848)** — The server rejects duplicate initialization without replacing established session state, advertises only server-provided capabilities, and requests client roots after the initialized notification only when roots support was negotiated. Repeated initialized notifications coalesce into one tracked roots refresh that participates in transport teardown.

## 日本語

- **MCP session で初期化を1回に制限し、capability の方向を protocol に合わせました(#4848)** — 確立済み session state を置き換えずに重複初期化を拒否し、server 提供 capability だけを公開します。また、roots support を交渉した場合に限り、initialized notification 後に client roots を要求します。initialized notification が再送されても、追跡対象の roots refresh 1件に集約し、transport teardown で drain します。
1 change: 1 addition & 0 deletions src/CodeIndex/Mcp/McpServer.DatabaseLifecycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void Dispose()
if (_disposed)
return;
_disposed = true;
MarkSessionClosed();
CloseSharedDb();
var shutdownCancellationTask = RequestShutdownCancellation();
if (shutdownCancellationTask.IsCompleted)
Expand Down
Loading
Loading