mirror of
https://github.com/aaronsb/obsidian-mcp-plugin.git
synced 2026-07-22 06:45:14 +00:00
0.11.34 shipped a broken bridge: #243 gated startup on `require.main === module`, but Claude Desktop runs the .mcpb with its built-in Node ("Using built-in Node.js for MCP server") via a loader that does NOT make server.js the main module. So main() never ran, stdin was never read, the client's `initialize` went unanswered, and Desktop timed out after 60s ("Request timed out", -32001) — the extension "couldn't connect at all". (Local `node mcpb/server.js` worked, which is why it passed review: that path makes require.main === module true.) Gate on the absence of Jest's worker env instead. main() then runs in every real launch — system `node server.js` and Desktop's built-in Node alike — while the require()-based test seam stays inert under Jest. Reproduced via `node -e "require('./mcpb/server.js')"` (hangs before, responds after). Add tests/bridge-bootstrap.test.ts: spawns the bridge against a stub HTTP server and asserts it answers `initialize` in BOTH launch shapes (`node server.js` AND non-main require). The existing unit tests `require()` the module — which by design skips main() — so they could never catch a boot failure; this is that missing coverage. Verified non-vacuous: reverting the guard fails the non-main case. Refs #243. The GitHub 0.11.34 release .mcpb has this bug and must not be promoted; ship the fix in 0.11.35. Claude-Session: https://claude.ai/code/session_011yowKCMFCBp61DRBu5xQm4 |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| fixtures | ||
| security | ||
| validation | ||
| bases-expression-evaluator.test.ts | ||
| bases-yaml.test.ts | ||
| bridge-bootstrap.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 | ||
| sse-socket-timeout.test.ts | ||
| vault-read-fidelity.test.ts | ||