mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-21 00:21:30 +00:00
* fix: MCP server crashes under parallel tool calls (#326) * fix: ensure full connection pool is pre-created to avoid race conditions during query execution * fix: improve graceful shutdown handling with exit codes * fix: resolve critical concurrency bugs in connection pool init - Add initPromises dedup map to prevent double-init race when parallel tool calls trigger initLbug for the same repoId simultaneously - Move pool.set() after FTS load so concurrent checkout can't grab a connection mid-async-init (FTS race on available[0]) - Replace lazy createConnection growth path with integrity error — pool is pre-warmed, lazy creation would silence stdout during active queries - Add preWarmActive flag so watchdog timer skips stdout restore during the synchronous pre-warm loop - Unify stdout capture: server.ts imports realStdoutWrite from lbug-adapter instead of capturing its own copy * test: add connection pool parallel stability tests 7 integration tests covering concurrent query safety, waiter queue overflow, stdout.write restoration, connection leak detection, initLbug deduplication, atomic pool visibility, and mixed query types. * fix: run LadybugDB tests sequentially via vitest projects config Vitest's projects feature splits test files into two groups: lbug-db (fileParallelism: false) and default (parallel). This prevents native mmap file-lock conflicts on Windows without requiring the CI shell loop locally. * test: add enrichment Promise.all regression test for #292/#316 Verifies that 3 concurrent queries via Promise.all (the exact pattern from the impact command's enrichment phase at local-backend.ts:1415) complete without SIGSEGV on a pre-warmed connection pool. |
||
|---|---|---|
| .. | ||
| cli | ||
| config | ||
| core | ||
| lib | ||
| mcp | ||
| server | ||
| storage | ||
| types | ||