You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The daemon now replaces itself when its connection-level self-heal proves futile. Production incident (2026-08-02 → 08-04): every query blew the 60s deadline, every zombie-reconnect "succeeded" (fresh Surreal, connect + signin round-tripped), and the next query died again — for two days — while an identical fresh process against the same server answered in under a second. The 0.7.118 self-heal kept rebuilding the one component that wasn't broken (the connection) and had no feedback that its medicine wasn't working; hooks failing open at 50s made the outage silent, and the valid pid file blocked every replacement spawn. A WedgeDetector per store now tracks the streak of query-deadline timeouts and futile completed reconnects; when a streak crosses 10 timeouts and 3 futile heals and 3 minutes with zero successful queries (any success resets everything — a merely-slow server can never escalate), the store concludes the fault is process-level state a connection rebuild cannot reach and hands off to the daemon's gracefulCleanup, whose existing 8s watchdog guarantees the exit even when the wedged store hangs the drain. The pid-file spawn guard then brings up a clean process on the next hook/MCP demand — turning this failure class from a multi-day silent outage into a ~minutes blip. Both the primary and the dedicated maintenance store escalate; standalone embedders (mcp-server.ts, tests) stay log-only since a library must not process.exit(). Knobs: LAQRUMCODE_WEDGE_STREAK_MS (floor, clamped 30s–1h) and LAQRUMCODE_WEDGE_EXIT_DISABLED=1 (log-only escape hatch). test/wedge-escalation.test.ts (11) pins the thresholds, the reset-on-success semantics, the single-burst floor, the fire-once latch, and the shutdown/disabled suppressions.