mirror of
https://github.com/aaronsb/obsidian-mcp-plugin.git
synced 2026-07-22 06:45:14 +00:00
Code review of the self-heal path surfaced a concurrency correctness gap and some observability refinements. Correctness: the 404 self-heal was gated on `response.status === 404 && sessionId`. When two tool calls 404 concurrently on a dead session, the first call's reinitialize() synchronously nulls sessionId before the second call's 404 is handled, so the sibling failed the `&& sessionId` guard, skipped self-heal, and surfaced -32603 "Bridge: HTTP 404" instead of recovering. Drop the guard: a 404 on /mcp always means a session id was presented (the server answers 400 when none is), so any non-initialize 404 is a self-heal trigger regardless of current bridge state. Both concurrent calls now coalesce onto the single in-flight reinit and replay under the fresh session. Added a concurrent-dispatch regression test proving one reinit + both replays under the new session id. Observability: log a non-2xx (or thrown) notifications/initialized during reinit so a required-but-failing handshake notification is diagnosable from stderr; soften the comment to match its best-effort reality; note the startNotifyStream fire-and-forget intent. Align the test's __state() type with the seam. Claude-Session: https://claude.ai/code/session_011yowKCMFCBp61DRBu5xQm4 |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| fixtures | ||
| security | ||
| validation | ||
| bases-expression-evaluator.test.ts | ||
| bases-yaml.test.ts | ||
| bridge-self-heal.test.ts | ||
| combine-inline-router.test.ts | ||
| combine-inline.test.ts | ||
| dataview-integration.test.ts | ||
| dispatch-param-guards.test.ts | ||
| file-lock-edit-serialization.test.ts | ||
| fuzzy-match.test.ts | ||
| graph-ignore-exclusion.test.ts | ||
| graph-node-title.test.ts | ||
| graph-search-traversal.test.ts | ||
| graph-search.test.ts | ||
| graph-statistics-vault-wide.test.ts | ||
| list-files-recursive.test.ts | ||
| mcp-server.test.ts | ||
| mcp-session-reinit.test.ts | ||
| network-classifier.test.ts | ||
| network-exposure-integration.test.ts | ||
| patch-operations.test.ts | ||
| read-only-mode.test.ts | ||
| recursive-copy.test.ts | ||
| search-tag-operator.test.ts | ||
| setup.ts | ||
| vault-read-fidelity.test.ts | ||