Skip to content

mind-nerve 0.3.0-beta.2 — flock-guarded ensure()

Latest

Choose a tag to compare

@star-ga star-ga released this 18 May 13:13
· 165 commits to main since this release

Bumps mind-nerve to 0.3.0-beta.2.

Fixed

  • Concurrent ensure() daemon-spawn race. Parallel CLI invocations during the daemon's ~5 s weight-load window each saw an unresponsive socket from their fast-path probe and spawned their own mind-nerve-routed. A real bot-thrash incident left 9 zombie daemons (~1.3 GB each) under a single user systemd cgroup. ensure() now serialises the spawn decision under a sibling mind-nerve.sock.lock flock + holds the lock while waiting for the socket to bind. Net effect: at most one daemon spawn per WAIT_SECONDS (20 s) window, regardless of caller concurrency.

Tests

  • New tests/python/test_ensure_concurrency.py — 6 regressions covering lock path layout, single-call sanity, fast-path skip, 16-thread race (asserts spawn_count == 1), 4-thread fail-open under permanently-broken daemon, and no-daemon-binary short-circuit.

Surface

No public API changes vs 0.3.0-beta.1. Same wheel layout, same model_hash. Install with pip install mind-nerve==0.3.0b2.