From 8976aa1b6ffb876249eca1aefd7f2e04ecfdc54e Mon Sep 17 00:00:00 2001 From: Abhigyan Patwari <126312502+abhigyanpatwari@users.noreply.github.com> Date: Fri, 6 Mar 2026 13:57:20 +0530 Subject: [PATCH] fix(ingestion): align CALLS edge sourceId with node ID format (#194) findEnclosingFunctionId generated IDs without :startLine suffix, but node creation includes it. This caused every CALLS edge to reference a non-existent source node, making the process detector find 0 entry points and produce 0 execution flows. Bumps to 1.3.9. Co-authored-by: Claude Opus 4.6 --- gitnexus/package-lock.json | 4 ++-- gitnexus/package.json | 2 +- gitnexus/src/core/ingestion/workers/parse-worker.ts | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gitnexus/package-lock.json b/gitnexus/package-lock.json index 585e015f4b..f8a98f8603 100644 --- a/gitnexus/package-lock.json +++ b/gitnexus/package-lock.json @@ -1,12 +1,12 @@ { "name": "gitnexus", - "version": "1.3.8", + "version": "1.3.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gitnexus", - "version": "1.3.8", + "version": "1.3.9", "hasInstallScript": true, "license": "PolyForm-Noncommercial-1.0.0", "dependencies": { diff --git a/gitnexus/package.json b/gitnexus/package.json index c8de59f60b..f1ab257233 100644 --- a/gitnexus/package.json +++ b/gitnexus/package.json @@ -1,6 +1,6 @@ { "name": "gitnexus", - "version": "1.3.8", + "version": "1.3.9", "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.", "author": "Abhigyan Patwari", "license": "PolyForm-Noncommercial-1.0.0", diff --git a/gitnexus/src/core/ingestion/workers/parse-worker.ts b/gitnexus/src/core/ingestion/workers/parse-worker.ts index 2e9890b7b6..b9d0b2bdb7 100644 --- a/gitnexus/src/core/ingestion/workers/parse-worker.ts +++ b/gitnexus/src/core/ingestion/workers/parse-worker.ts @@ -291,7 +291,8 @@ const findEnclosingFunctionId = (node: any, filePath: string): string | null => if (current.type === 'init_declaration' || current.type === 'deinit_declaration') { const funcName = current.type === 'init_declaration' ? 'init' : 'deinit'; const label = 'Constructor'; - return generateId(label, `${filePath}:${funcName}`); + const startLine = current.startPosition?.row ?? 0; + return generateId(label, `${filePath}:${funcName}:${startLine}`); } if (['function_declaration', 'function_definition', 'async_function_declaration', @@ -327,7 +328,8 @@ const findEnclosingFunctionId = (node: any, filePath: string): string | null => } if (funcName) { - return generateId(label, `${filePath}:${funcName}`); + const startLine = current.startPosition?.row ?? 0; + return generateId(label, `${filePath}:${funcName}:${startLine}`); } } current = current.parent;