Skip to content

v0.29.2 — cold-boot race fix: daemon port bound at process start

Latest

Choose a tag to compare

@AdelElo13 AdelElo13 released this 13 Jul 09:04
· 2 commits to main since this release

Fixed

  • FIX: cold-boot race — daemon port is now bound within milliseconds of
    process start.
    Previously the daemon loaded its full module graph
    (better-sqlite3, MCP SDK, embeddings probe, …) before binding its port;
    on a cold boot that window was measured at ~110 s, and every MCP client
    that connected during it got ECONNREFUSED (Claude Code surfaced
    "Could not attach to MCP server neuromcp" — it connects over plain HTTP
    with no wait/retry wrapper). bin/neuromcp-daemon now starts through a
    dependency-free bootstrap (daemon-bootstrap.js + daemon-early-bind.js)
    that owns the TCP port immediately, answers GET /health with
    503 {"status":"starting"} while the core loads (so curl -sf pollers
    such as mcp-remote-wait.sh keep waiting), buffers all other requests in
    a bounded queue (64 requests, 120 s hold timeout), and replays them into
    the real router once the core has taken the server over
    (startMcpHttpDaemon gained a handoff option). A build guard test
    walks the static import graph of the built bootstrap artifact so a tsup
    config regression cannot silently reintroduce the race.

Internal

  • src/daemon.ts main logic moved to src/daemon-core.ts
    (runDaemon(handoff?)); dist/daemon.js remains as a back-compat direct
    entry without early bind. Port/host env parsing + loopback-bind validation
    moved to the dependency-free src/daemon-early-bind.ts so bootstrap and
    core stay in lockstep.

Volledig bewijs & review-detail: PR #15 — TDD (regressietest eerst rood), 646/646 tests, subprocess-E2E over de echte productieketen, adversariele 24-agent review (5 bevestigde findings, alle gefixt voor merge), LongMemEval distractor-smoke identiek aan baseline.

Install: npm i -g neuromcp@0.29.2 of download de .mcpb hieronder voor one-click install in Claude Desktop.