From 707b7d2ac5516e1c027d17ecd15a436cc0460e7e Mon Sep 17 00:00:00 2001 From: abhigyantrumio Date: Fri, 6 Mar 2026 13:17:15 +0530 Subject: [PATCH] fix(cli): force-exit after analyze to prevent KuzuDB hang KuzuDB's native module holds open handles that prevent Node.js from exiting cleanly. Previously only force-exited when embeddings were used (for ONNX Runtime segfault workaround), but the same issue affects all analyze runs. Now always calls process.exit(0) after completion. Co-Authored-By: Claude Opus 4.6 --- gitnexus/src/cli/analyze.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gitnexus/src/cli/analyze.ts b/gitnexus/src/cli/analyze.ts index 7505169bbe..48421a6031 100644 --- a/gitnexus/src/cli/analyze.ts +++ b/gitnexus/src/cli/analyze.ts @@ -357,10 +357,8 @@ export const analyzeCommand = async ( console.log(''); - // ONNX Runtime registers native atexit hooks that segfault during process - // shutdown on macOS (#38) and some Linux configs (#40). Force-exit to - // bypass them when embeddings were loaded. - if (!embeddingSkipped) { - process.exit(0); - } + // KuzuDB's native module holds open handles that prevent Node from exiting. + // ONNX Runtime also registers native atexit hooks that segfault on some + // platforms (#38, #40). Force-exit to ensure clean termination. + process.exit(0); };