From 350b1ece63cf37dcf8ae14941de517d033b4ac6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 May 2026 06:46:45 +0000 Subject: [PATCH] chore(parse): use template literal for warning, add .hh test case Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/5591f1ba-9032-4706-b007-effb0df46eb8 Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com> --- gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts | 8 ++++---- gitnexus/test/unit/parse-impl-worker-guard.test.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts b/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts index c0752aa28..a99343b34 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts @@ -386,10 +386,10 @@ export async function runChunkedParseAndResolve( if (chunkHasWorkerUnsafeFiles && !hasWarnedAboutCppChunks) { hasWarnedAboutCppChunks = true; logger.warn( - 'C/C++ files detected — parsing those chunks in sequential mode to avoid known ' + - 'worker-thread native binding errors (e.g. `Napi::Error`). C/C++ source files ' + - 'are still fully indexed; chunks with no C/C++ continue using workers. ' + - 'Set GITNEXUS_ALLOW_CPP_WORKERS=1 if you use a custom tree-sitter build without this issue.', + `C/C++ files detected — parsing those chunks in sequential mode to avoid known ` + + `worker-thread native binding errors (e.g. \`Napi::Error\`). C/C++ source files ` + + `are still fully indexed; chunks with no C/C++ continue using workers. ` + + `Set GITNEXUS_ALLOW_CPP_WORKERS=1 if you use a custom tree-sitter build without this issue.`, ); } chunkWorkerData = await processParsing( diff --git a/gitnexus/test/unit/parse-impl-worker-guard.test.ts b/gitnexus/test/unit/parse-impl-worker-guard.test.ts index 245c22bf1..5438ccbf1 100644 --- a/gitnexus/test/unit/parse-impl-worker-guard.test.ts +++ b/gitnexus/test/unit/parse-impl-worker-guard.test.ts @@ -29,9 +29,10 @@ describe('hasWorkerUnsafeLanguages', () => { expect(hasWorkerUnsafeLanguages([{ path: 'include/api.h', size: 100 }])).toBe(true); }); - it('returns true when C++ header files (.hpp, .hxx) are present', () => { + it('returns true when C++ header files (.hpp, .hxx, .hh) are present', () => { expect(hasWorkerUnsafeLanguages([{ path: 'include/api.hpp', size: 100 }])).toBe(true); expect(hasWorkerUnsafeLanguages([{ path: 'include/core.hxx', size: 100 }])).toBe(true); + expect(hasWorkerUnsafeLanguages([{ path: 'include/util.hh', size: 100 }])).toBe(true); }); it('returns false for an empty list', () => {