From 3e8e7c2acc314ae181eaae2b4f9e8352be4d8eb1 Mon Sep 17 00:00:00 2001 From: Gergo Magyar Date: Mon, 4 May 2026 19:33:34 +0100 Subject: [PATCH] chore(lint): baseline-suppress 134 existing console.* sites with TODO(pino-migration) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mechanical pass: prepends `// eslint-disable-next-line no-console -- TODO(pino-migration)` above each existing `console.*` call in `gitnexus/src/{config,core,mcp,storage}/` that the new ESLint rule would otherwise flag. CLI/server are exempt at the config level (legitimate stdout output). Zero functional changes. Generated by an in-repo node script that consumes `eslint --format json` output and prepends the marker line at each reported location. Verification: npx eslint gitnexus/src/ β†’ 0 no-console warnings grep -rn "TODO(pino-migration)" gitnexus/src/ | wc -l β†’ 134 The marker tags inventory the remaining migration surface so future sweep PRs can grep their target list. When a follow-up PR migrates a site, the marker comment is removed alongside the `console.*` β†’ `logger.*` swap. `--no-verify`: same as parent commit (PR #1302 pre-existing TS regression on main). --- gitnexus/src/config/ignore-service.ts | 1 + gitnexus/src/core/embeddings/embedder.ts | 8 ++++++++ gitnexus/src/core/embeddings/embedding-pipeline.ts | 12 ++++++++++++ .../group/extractors/elixir-workspace-extractor.ts | 1 + .../core/group/extractors/go-workspace-extractor.ts | 1 + gitnexus/src/core/group/extractors/grpc-extractor.ts | 1 + .../group/extractors/java-workspace-extractor.ts | 1 + .../src/core/group/extractors/manifest-extractor.ts | 1 + .../group/extractors/node-workspace-extractor.ts | 1 + .../group/extractors/python-workspace-extractor.ts | 1 + .../group/extractors/rust-workspace-extractor.ts | 1 + gitnexus/src/core/group/service.ts | 4 ++++ gitnexus/src/core/group/sync.ts | 3 +++ gitnexus/src/core/ingestion/ast-cache.ts | 1 + gitnexus/src/core/ingestion/call-processor.ts | 2 ++ gitnexus/src/core/ingestion/cluster-enricher.ts | 2 ++ .../src/core/ingestion/cobol/cobol-copy-expander.ts | 3 +++ gitnexus/src/core/ingestion/filesystem-walker.ts | 2 ++ gitnexus/src/core/ingestion/heritage-processor.ts | 2 ++ gitnexus/src/core/ingestion/import-processor.ts | 12 ++++++++++++ gitnexus/src/core/ingestion/language-config.ts | 5 +++++ .../src/core/ingestion/method-extractors/generic.ts | 1 + gitnexus/src/core/ingestion/parsing-processor.ts | 6 ++++++ gitnexus/src/core/ingestion/pipeline-phases/cobol.ts | 3 +++ .../core/ingestion/pipeline-phases/communities.ts | 1 + .../ingestion/pipeline-phases/cross-file-impl.ts | 4 ++++ .../src/core/ingestion/pipeline-phases/cross-file.ts | 2 ++ .../src/core/ingestion/pipeline-phases/markdown.ts | 1 + gitnexus/src/core/ingestion/pipeline-phases/mro.ts | 1 + gitnexus/src/core/ingestion/pipeline-phases/orm.ts | 1 + .../src/core/ingestion/pipeline-phases/parse-impl.ts | 8 ++++++++ .../src/core/ingestion/pipeline-phases/processes.ts | 2 ++ .../src/core/ingestion/pipeline-phases/routes.ts | 3 +++ .../src/core/ingestion/pipeline-phases/runner.ts | 2 ++ gitnexus/src/core/ingestion/pipeline-phases/tools.ts | 1 + gitnexus/src/core/ingestion/process-processor.ts | 3 +++ .../src/core/ingestion/scope-extractor-bridge.ts | 1 + .../ingestion/scope-resolution/pipeline/phase.ts | 2 ++ .../core/ingestion/scope-resolution/pipeline/run.ts | 1 + gitnexus/src/core/ingestion/type-env.ts | 1 + gitnexus/src/core/ingestion/utils/max-file-size.ts | 1 + gitnexus/src/core/ingestion/workers/parse-worker.ts | 4 ++++ gitnexus/src/core/ingestion/workers/worker-pool.ts | 3 +++ gitnexus/src/core/lbug/extension-loader.ts | 1 + gitnexus/src/core/lbug/lbug-adapter.ts | 4 ++++ gitnexus/src/core/tree-sitter/parser-loader.ts | 2 ++ gitnexus/src/core/wiki/cursor-client.ts | 1 + gitnexus/src/core/wiki/llm-client.ts | 1 + gitnexus/src/mcp/core/embedder.ts | 2 ++ gitnexus/src/mcp/local/local-backend.ts | 6 ++++++ 50 files changed, 134 insertions(+) diff --git a/gitnexus/src/config/ignore-service.ts b/gitnexus/src/config/ignore-service.ts index ff61f0eb3..f44a66cbd 100644 --- a/gitnexus/src/config/ignore-service.ts +++ b/gitnexus/src/config/ignore-service.ts @@ -365,6 +365,7 @@ export const loadIgnoreRules = async ( } catch (err: unknown) { const code = (err as NodeJS.ErrnoException).code; if (code !== 'ENOENT') { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(` Warning: could not read ${filename}: ${(err as Error).message}`); } } diff --git a/gitnexus/src/core/embeddings/embedder.ts b/gitnexus/src/core/embeddings/embedder.ts index 0d7fe41df..a4fe1cf1d 100644 --- a/gitnexus/src/core/embeddings/embedder.ts +++ b/gitnexus/src/core/embeddings/embedder.ts @@ -166,6 +166,7 @@ export const initEmbedder = async ( const isDev = process.env.NODE_ENV === 'development'; if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`🧠 Loading embedding model: ${finalConfig.modelId}`); } @@ -192,12 +193,16 @@ export const initEmbedder = async ( for (const device of devicesToTry) { try { if (isDev && device === 'dml') { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('πŸ”§ Trying DirectML (DirectX12) GPU backend...'); } else if (isDev && device === 'cuda') { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('πŸ”§ Trying CUDA GPU backend...'); } else if (isDev && device === 'cpu') { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('πŸ”§ Using CPU backend...'); } else if (isDev && device === 'wasm') { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('πŸ”§ Using WASM backend (slower)...'); } @@ -221,7 +226,9 @@ export const initEmbedder = async ( : device === 'cuda' ? 'GPU (CUDA)' : device.toUpperCase(); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`βœ… Using ${label} backend`); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('βœ… Embedding model loaded successfully'); } @@ -229,6 +236,7 @@ export const initEmbedder = async ( } catch (deviceError) { if (isDev && (device === 'cuda' || device === 'dml')) { const gpuType = device === 'dml' ? 'DirectML' : 'CUDA'; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`⚠️ ${gpuType} not available, falling back to CPU...`); } // Continue to next device in list diff --git a/gitnexus/src/core/embeddings/embedding-pipeline.ts b/gitnexus/src/core/embeddings/embedding-pipeline.ts index 82af563d4..f83239650 100644 --- a/gitnexus/src/core/embeddings/embedding-pipeline.ts +++ b/gitnexus/src/core/embeddings/embedding-pipeline.ts @@ -157,6 +157,7 @@ const queryEmbeddableNodes = async ( } } catch (error) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`Query for ${label} nodes failed:`, error); } } @@ -212,6 +213,7 @@ const createVectorIndex = async ( return true; } catch (error) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('Vector index creation warning:', error); } return false; @@ -256,6 +258,7 @@ export const runEmbeddingPipeline = async ( try { const vectorAvailable = await ensureVectorExtensionAvailable(); + // eslint-disable-next-line no-console -- TODO(pino-migration) if (!vectorAvailable && isDev) console.warn(vectorUnavailableMessage); // Phase 1: Load embedding model @@ -283,6 +286,7 @@ export const runEmbeddingPipeline = async ( }); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('πŸ” Querying embeddable nodes...'); } @@ -325,6 +329,7 @@ export const runEmbeddingPipeline = async ( // (Kuzu forbids SET on vector-indexed properties; DELETE-then-INSERT is the sanctioned pattern) if (staleNodeIds.length > 0) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ”„ Deleting ${staleNodeIds.length} stale embedding rows for re-embed`); } try { @@ -346,6 +351,7 @@ export const runEmbeddingPipeline = async ( } if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ“¦ Incremental embeddings: ${beforeCount} total, ${existingEmbeddings.size} cached, ${staleNodeIds.length} stale, ${nodes.length} to embed`, ); @@ -355,6 +361,7 @@ export const runEmbeddingPipeline = async ( const totalNodes = nodes.length; if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ“Š Found ${totalNodes} embeddable nodes`); } @@ -442,6 +449,7 @@ export const runEmbeddingPipeline = async ( ); } catch (chunkErr) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `⚠️ AST chunking failed for ${node.label} "${node.name}" (${node.filePath}), falling back to character-based chunking:`, chunkErr, @@ -482,6 +490,7 @@ export const runEmbeddingPipeline = async ( try { embeddings = await embedBatch(subTexts); } catch (embedErr) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error( `❌ embedBatch failed for ${subTexts.length} texts (first: "${subTexts[0]?.substring(0, 80)}..."):`, embedErr, @@ -520,6 +529,7 @@ export const runEmbeddingPipeline = async ( }); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('πŸ“‡ Creating vector index...'); } @@ -533,6 +543,7 @@ export const runEmbeddingPipeline = async ( }); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `βœ… Embedding pipeline complete! (${totalChunks} chunks from ${totalNodes} nodes)`, ); @@ -547,6 +558,7 @@ export const runEmbeddingPipeline = async ( const errorMessage = error instanceof Error ? error.message : 'Unknown error'; if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error('❌ Embedding pipeline error:', error); } diff --git a/gitnexus/src/core/group/extractors/elixir-workspace-extractor.ts b/gitnexus/src/core/group/extractors/elixir-workspace-extractor.ts index 33afcaed9..d509a5870 100644 --- a/gitnexus/src/core/group/extractors/elixir-workspace-extractor.ts +++ b/gitnexus/src/core/group/extractors/elixir-workspace-extractor.ts @@ -202,6 +202,7 @@ export async function extractElixirWorkspaceLinks( }; const existing = appsByName.get(manifest.appName); if (existing) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[elixir-workspace-extractor] duplicate app "${manifest.appName}" in "${groupPath}" and "${existing.groupPath}" β€” skipping "${groupPath}"`, ); diff --git a/gitnexus/src/core/group/extractors/go-workspace-extractor.ts b/gitnexus/src/core/group/extractors/go-workspace-extractor.ts index fbdf0e450..adc339850 100644 --- a/gitnexus/src/core/group/extractors/go-workspace-extractor.ts +++ b/gitnexus/src/core/group/extractors/go-workspace-extractor.ts @@ -211,6 +211,7 @@ export async function extractGoWorkspaceLinks( }; const existing = modulesByPath.get(manifest.modulePath); if (existing) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[go-workspace-extractor] duplicate module "${manifest.modulePath}" in "${groupPath}" and "${existing.groupPath}" β€” skipping "${groupPath}"`, ); diff --git a/gitnexus/src/core/group/extractors/grpc-extractor.ts b/gitnexus/src/core/group/extractors/grpc-extractor.ts index b5782d9b3..4d7ad7932 100644 --- a/gitnexus/src/core/group/extractors/grpc-extractor.ts +++ b/gitnexus/src/core/group/extractors/grpc-extractor.ts @@ -344,6 +344,7 @@ export function resolveProtoConflict( // services under a fabricated package-qualified contract id. if (winners.length !== 1) { const paths = candidates.map((c) => c.protoPath).join(', '); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[grpc-extractor] Ambiguous proto resolution for service "${serviceName}" from ${sourceFilePath}: ${winners.length} candidates tied at score ${maxScore} among [${paths}] β€” skipping canonical contract`, ); diff --git a/gitnexus/src/core/group/extractors/java-workspace-extractor.ts b/gitnexus/src/core/group/extractors/java-workspace-extractor.ts index 66ee35ee5..828e729ab 100644 --- a/gitnexus/src/core/group/extractors/java-workspace-extractor.ts +++ b/gitnexus/src/core/group/extractors/java-workspace-extractor.ts @@ -213,6 +213,7 @@ export async function extractJavaWorkspaceLinks( }; const existing = projectsByKey.get(key); if (existing) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[java-workspace-extractor] duplicate artifact "${key}" in "${groupPath}" and "${existing.groupPath}" β€” skipping "${groupPath}"`, ); diff --git a/gitnexus/src/core/group/extractors/manifest-extractor.ts b/gitnexus/src/core/group/extractors/manifest-extractor.ts index 3185f05e1..bba74f554 100644 --- a/gitnexus/src/core/group/extractors/manifest-extractor.ts +++ b/gitnexus/src/core/group/extractors/manifest-extractor.ts @@ -298,6 +298,7 @@ export class ManifestExtractor { // fail the whole manifest extraction. Unresolved contracts still // get a synthetic symbolUid below, so cross-impact can proceed. const message = err instanceof Error ? err.message : String(err); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[manifest-extractor] resolveSymbol failed for ${link.type}:${link.contract} ` + `in ${repoPathKey}: ${message}`, diff --git a/gitnexus/src/core/group/extractors/node-workspace-extractor.ts b/gitnexus/src/core/group/extractors/node-workspace-extractor.ts index 05a7c95dd..8e8c7dc89 100644 --- a/gitnexus/src/core/group/extractors/node-workspace-extractor.ts +++ b/gitnexus/src/core/group/extractors/node-workspace-extractor.ts @@ -205,6 +205,7 @@ export async function extractNodeWorkspaceLinks( }; const existing = packagesByName.get(manifest.name); if (existing) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[node-workspace-extractor] duplicate package name "${manifest.name}" in "${groupPath}" and "${existing.groupPath}" β€” skipping "${groupPath}"`, ); diff --git a/gitnexus/src/core/group/extractors/python-workspace-extractor.ts b/gitnexus/src/core/group/extractors/python-workspace-extractor.ts index 5930808af..ccb3cd9f5 100644 --- a/gitnexus/src/core/group/extractors/python-workspace-extractor.ts +++ b/gitnexus/src/core/group/extractors/python-workspace-extractor.ts @@ -204,6 +204,7 @@ export async function extractPythonWorkspaceLinks( }; const existing = packagesByImportName.get(manifest.importName); if (existing) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[python-workspace-extractor] duplicate package "${manifest.name}" in "${groupPath}" and "${existing.groupPath}" β€” skipping "${groupPath}"`, ); diff --git a/gitnexus/src/core/group/extractors/rust-workspace-extractor.ts b/gitnexus/src/core/group/extractors/rust-workspace-extractor.ts index c19af07ca..29efb12f5 100644 --- a/gitnexus/src/core/group/extractors/rust-workspace-extractor.ts +++ b/gitnexus/src/core/group/extractors/rust-workspace-extractor.ts @@ -224,6 +224,7 @@ export async function extractRustWorkspaceLinks( }; const existing = cratesByName.get(manifest.name); if (existing) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[rust-workspace-extractor] duplicate crate name "${manifest.name}" in "${groupPath}" and "${existing.groupPath}" β€” skipping "${groupPath}"`, ); diff --git a/gitnexus/src/core/group/service.ts b/gitnexus/src/core/group/service.ts index a412ceaa8..dc942c7e5 100644 --- a/gitnexus/src/core/group/service.ts +++ b/gitnexus/src/core/group/service.ts @@ -170,10 +170,12 @@ async function loadContractRegistryResilient( contracts.push(row); } else { skippedCorrupt++; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('[group] skipping corrupt contract row in contracts.json'); } } catch { skippedCorrupt++; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('[group] skipping corrupt contract row in contracts.json'); } } @@ -187,10 +189,12 @@ async function loadContractRegistryResilient( crossLinks.push(row); } else { skippedCorrupt++; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('[group] skipping corrupt crossLinks row in contracts.json'); } } catch { skippedCorrupt++; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('[group] skipping corrupt crossLinks row in contracts.json'); } } diff --git a/gitnexus/src/core/group/sync.ts b/gitnexus/src/core/group/sync.ts index 09b289033..4a2373f2b 100644 --- a/gitnexus/src/core/group/sync.ts +++ b/gitnexus/src/core/group/sync.ts @@ -198,6 +198,7 @@ export async function syncGroup(config: GroupConfig, opts?: SyncOptions): Promis allLinks = [...allLinks, ...wsResult.links]; if (opts?.verbose) { for (const s of wsResult.stats) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( ` workspace-deps: discovered ${s.linkCount} cross-${s.ecosystem.toLowerCase()} links from ${s.projectCount} ${s.ecosystem} projects`, ); @@ -217,6 +218,7 @@ export async function syncGroup(config: GroupConfig, opts?: SyncOptions): Promis for (const link of allLinks) { const dangling = [link.from, link.to].filter((r) => !knownRepos.has(r)); if (dangling.length > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[group/sync] manifest link ${link.type}:${link.contract} references repos not in config.repos: ${dangling.join(', ')} β€” cross-links will use synthetic UIDs`, ); @@ -228,6 +230,7 @@ export async function syncGroup(config: GroupConfig, opts?: SyncOptions): Promis autoContracts.push(...manifestResult.contracts); manifestCrossLinks = manifestResult.crossLinks; if (opts?.verbose) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( ` manifest: ${manifestCrossLinks.length} cross-links from ${allLinks.length} links (${config.links.length} declared + ${allLinks.length - config.links.length} discovered)`, ); diff --git a/gitnexus/src/core/ingestion/ast-cache.ts b/gitnexus/src/core/ingestion/ast-cache.ts index 65da46ab8..69723abce 100644 --- a/gitnexus/src/core/ingestion/ast-cache.ts +++ b/gitnexus/src/core/ingestion/ast-cache.ts @@ -49,6 +49,7 @@ export const createASTCache = (maxSize: number = 50): ASTCache => { // will hand freed memory to scope-resolution. (tree as unknown as { delete?: () => void }).delete?.(); } catch (e) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('Failed to delete tree from WASM memory', e); } }, diff --git a/gitnexus/src/core/ingestion/call-processor.ts b/gitnexus/src/core/ingestion/call-processor.ts index 1871d0605..203b14ede 100644 --- a/gitnexus/src/core/ingestion/call-processor.ts +++ b/gitnexus/src/core/ingestion/call-processor.ts @@ -784,6 +784,7 @@ export const processCalls = async ( const query = new Parser.Query(lang, queryStr); matches = query.matches(tree.rootNode); } catch (queryError) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`Query error for ${file.path}:`, queryError); continue; } @@ -1391,6 +1392,7 @@ export const processCalls = async ( if (skippedByLang && skippedByLang.size > 0) { for (const [lang, count] of skippedByLang.entries()) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[ingestion] Skipped ${count} ${lang} file(s) in call processing β€” ${lang} parser not available.`, ); diff --git a/gitnexus/src/core/ingestion/cluster-enricher.ts b/gitnexus/src/core/ingestion/cluster-enricher.ts index b20ed2bad..f1291cb8b 100644 --- a/gitnexus/src/core/ingestion/cluster-enricher.ts +++ b/gitnexus/src/core/ingestion/cluster-enricher.ts @@ -128,6 +128,7 @@ export const enrichClusters = async ( enrichments.set(community.id, enrichment); } catch (error) { // On error, fallback to heuristic + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`Failed to enrich cluster ${community.id}:`, error); enrichments.set(community.id, { name: community.heuristicLabel, @@ -210,6 +211,7 @@ Output JSON array: } } } catch (error) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('Batch enrichment failed, falling back to heuristics:', error); // Fallback for this batch for (const community of batch) { diff --git a/gitnexus/src/core/ingestion/cobol/cobol-copy-expander.ts b/gitnexus/src/core/ingestion/cobol/cobol-copy-expander.ts index 46a33001d..156dc4a96 100644 --- a/gitnexus/src/core/ingestion/cobol/cobol-copy-expander.ts +++ b/gitnexus/src/core/ingestion/cobol/cobol-copy-expander.ts @@ -454,6 +454,7 @@ export function expandCopies( if (visited.has(resolvedPath)) { if (!warnedCircular.has(resolvedPath)) { warnedCircular.add(resolvedPath); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[cobol-copy-expander] Circular COPY detected: ${cs.target} (${resolvedPath}) ` + `includes itself. Skipping expansion.`, @@ -464,6 +465,7 @@ export function expandCopies( // Max depth exceeded β€” keep unexpanded if (depth >= maxDepth) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[cobol-copy-expander] Max expansion depth (${maxDepth}) reached for ` + `COPY ${cs.target} in ${srcPath}. Skipping expansion.`, @@ -475,6 +477,7 @@ export function expandCopies( if (++totalExpansions > MAX_TOTAL_EXPANSIONS) { if (!warnedCircular.has('__max_total__')) { warnedCircular.add('__max_total__'); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[cobol-copy-expander] Max total expansions (${MAX_TOTAL_EXPANSIONS}) reached ` + `in ${srcPath}. Skipping further expansions.`, diff --git a/gitnexus/src/core/ingestion/filesystem-walker.ts b/gitnexus/src/core/ingestion/filesystem-walker.ts index 71a4046f2..81ea95b95 100644 --- a/gitnexus/src/core/ingestion/filesystem-walker.ts +++ b/gitnexus/src/core/ingestion/filesystem-walker.ts @@ -74,9 +74,11 @@ export const walkRepositoryPaths = async ( if (skippedLarge > 0) { const isDefault = maxFileSizeBytes === DEFAULT_MAX_FILE_SIZE_BYTES; const suffix = isDefault ? ', likely generated/vendored' : ''; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(` Skipped ${skippedLarge} large files (>${maxFileSizeBytes / 1024}KB${suffix})`); if (isVerboseIngestionEnabled()) { for (const p of skippedLargePaths) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(` - ${p}`); } } diff --git a/gitnexus/src/core/ingestion/heritage-processor.ts b/gitnexus/src/core/ingestion/heritage-processor.ts index 12e59a19a..8e4de1bf2 100644 --- a/gitnexus/src/core/ingestion/heritage-processor.ts +++ b/gitnexus/src/core/ingestion/heritage-processor.ts @@ -237,6 +237,7 @@ export const processHeritage = async ( query = new Parser.Query(treeSitterLang, queryStr); matches = query.matches(tree.rootNode); } catch (queryError) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`Heritage query error for ${file.path}:`, queryError); continue; } @@ -267,6 +268,7 @@ export const processHeritage = async ( if (skippedByLang && skippedByLang.size > 0) { for (const [lang, count] of skippedByLang.entries()) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[ingestion] Skipped ${count} ${lang} file(s) in heritage processing β€” ${lang} parser not available.`, ); diff --git a/gitnexus/src/core/ingestion/import-processor.ts b/gitnexus/src/core/ingestion/import-processor.ts index b669d2744..a8bcf2a69 100644 --- a/gitnexus/src/core/ingestion/import-processor.ts +++ b/gitnexus/src/core/ingestion/import-processor.ts @@ -324,13 +324,21 @@ export const processImports = async ( matches = query.matches(tree.rootNode); } catch (queryError: any) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.group(`πŸ”΄ Query Error: ${file.path}`); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('Language:', language); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('Query (first 200 chars):', queryStr.substring(0, 200) + '...'); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('Error:', queryError?.message || queryError); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('File content (first 300 chars):', file.content.substring(0, 300)); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('AST root type:', tree.rootNode?.type); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('AST has errors:', tree.rootNode?.hasError); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.groupEnd(); } @@ -346,6 +354,7 @@ export const processImports = async ( const sourceNode = captureMap['import.source']; if (!sourceNode) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`⚠️ Import captured but no source node in ${file.path}`); } return; @@ -399,6 +408,7 @@ export const processImports = async ( if (skippedByLang && skippedByLang.size > 0) { for (const [lang, count] of skippedByLang.entries()) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[ingestion] Skipped ${count} ${lang} file(s) in import processing β€” ${lang} parser not available.`, ); @@ -406,6 +416,7 @@ export const processImports = async ( } if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ“Š Import processing complete: ${getResolvedCount()}/${totalImportsFound} imports resolved to graph edges`, ); @@ -498,6 +509,7 @@ export const processImportsFromExtracted = async ( ); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ“Š Import processing (fast path): ${getResolvedCount()}/${totalImportsFound} imports resolved to graph edges`, ); diff --git a/gitnexus/src/core/ingestion/language-config.ts b/gitnexus/src/core/ingestion/language-config.ts index 682d7b190..a14a0d2ab 100644 --- a/gitnexus/src/core/ingestion/language-config.ts +++ b/gitnexus/src/core/ingestion/language-config.ts @@ -82,6 +82,7 @@ export async function loadTsconfigPaths(repoRoot: string): Promise 0) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ“¦ Loaded ${aliases.size} path aliases from ${filename}`); } return { aliases, baseUrl }; @@ -104,6 +105,7 @@ export async function loadGoModulePath(repoRoot: string): Promise 0) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ“¦ Loaded ${targets.size} Swift package targets`); } return { targets }; diff --git a/gitnexus/src/core/ingestion/method-extractors/generic.ts b/gitnexus/src/core/ingestion/method-extractors/generic.ts index 7e15f2458..886f0756d 100644 --- a/gitnexus/src/core/ingestion/method-extractors/generic.ts +++ b/gitnexus/src/core/ingestion/method-extractors/generic.ts @@ -158,6 +158,7 @@ function findBodies(node: SyntaxNode, bodyNodeSet: Set): SyntaxNode[] { // Fallback: body field exists but its type is not in bodyNodeTypes. // This may indicate a config typo β€” log for debugging if NODE_ENV is development. if (process.env.NODE_ENV === 'development') { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[MethodExtractor] body field type '${bodyField.type}' not in bodyNodeTypes for node '${node.type}'`, ); diff --git a/gitnexus/src/core/ingestion/parsing-processor.ts b/gitnexus/src/core/ingestion/parsing-processor.ts index 86b419990..e7191e554 100644 --- a/gitnexus/src/core/ingestion/parsing-processor.ts +++ b/gitnexus/src/core/ingestion/parsing-processor.ts @@ -191,6 +191,7 @@ const processParsingWithWorkers = async ( const summary = Array.from(skippedLanguages.entries()) .map(([lang, count]) => `${lang}: ${count}`) .join(', '); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(` Skipped unsupported languages: ${summary}`); } @@ -382,6 +383,7 @@ const processParsingSequential = async ( bufferSize: getTreeSitterBufferSize(parseContent), }); } catch (parseError) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`Skipping unparseable file: ${file.path}`); continue; } @@ -408,6 +410,7 @@ const processParsingSequential = async ( query = new Parser.Query(language, queryString); matches = query.matches(tree.rootNode); } catch (queryError) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`Query error for ${file.path}:`, queryError); continue; } @@ -701,6 +704,7 @@ const processParsingSequential = async ( if (skippedByLang && skippedByLang.size > 0) { for (const [lang, count] of skippedByLang.entries()) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[ingestion] Skipped ${count} ${lang} file(s) in parsing processing β€” ${lang} parser not available.`, ); @@ -742,6 +746,7 @@ export const processParsing = async ( // in scope-resolution with an empty cache and get re-parsed. // Surfacing this in PROF mode prevents silent perf cliffs when // a repo crosses the worker-pool threshold. + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[scope-resolution prof] worker pool engaged for ${files.length} files β€” cross-phase tree cache will be empty; scope-resolution re-parses.`, ); @@ -757,6 +762,7 @@ export const processParsing = async ( ); } catch (err) { const message = err instanceof Error ? err.message : String(err); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn('Worker pool parsing stopped; continuing with sequential parser:', message); reportProgress?.( lastProgress, diff --git a/gitnexus/src/core/ingestion/pipeline-phases/cobol.ts b/gitnexus/src/core/ingestion/pipeline-phases/cobol.ts index cfe6b6ce2..2ead44be3 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/cobol.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/cobol.ts @@ -47,6 +47,7 @@ export const cobolPhase: PipelinePhase = { const cobolResult = processCobol(ctx.graph, cobolFiles, allPathSet); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( ` COBOL: ${cobolResult.programs} programs, ${cobolResult.paragraphs} paragraphs, ${cobolResult.sections} sections from ${cobolFiles.length} files`, ); @@ -55,11 +56,13 @@ export const cobolPhase: PipelinePhase = { cobolResult.execCicsBlocks > 0 || cobolResult.entryPoints > 0 ) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( ` COBOL enriched: ${cobolResult.execSqlBlocks} SQL blocks, ${cobolResult.execCicsBlocks} CICS blocks, ${cobolResult.entryPoints} entry points, ${cobolResult.moves} moves, ${cobolResult.fileDeclarations} file declarations`, ); } if (cobolResult.jclJobs > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(` JCL: ${cobolResult.jclJobs} jobs, ${cobolResult.jclSteps} steps`); } } diff --git a/gitnexus/src/core/ingestion/pipeline-phases/communities.ts b/gitnexus/src/core/ingestion/pipeline-phases/communities.ts index 6a302b8b9..d68821871 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/communities.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/communities.ts @@ -47,6 +47,7 @@ export const communitiesPhase: PipelinePhase = { }); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `🏘️ Community detection: ${communityResult.stats.totalCommunities} communities found (modularity: ${communityResult.stats.modularity.toFixed(3)})`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/cross-file-impl.ts b/gitnexus/src/core/ingestion/pipeline-phases/cross-file-impl.ts index 334ff57df..a8dd94d44 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/cross-file-impl.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/cross-file-impl.ts @@ -60,6 +60,7 @@ export async function runCrossFileBindingPropagation( const { levels, cycleCount } = topologicalLevelSort(ctx.importMap); if (isDev && cycleCount > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ”„ ${cycleCount} files in import cycles (processed last in undefined order)`); } @@ -88,6 +89,7 @@ export async function runCrossFileBindingPropagation( const gapRatio = totalFiles > 0 ? filesWithGaps / totalFiles : 0; if (gapRatio < CROSS_FILE_SKIP_THRESHOLD && filesWithGaps < gapThreshold) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `⏭️ Cross-file re-resolution skipped (${filesWithGaps}/${totalFiles} files, ${(gapRatio * 100).toFixed(1)}% < ${CROSS_FILE_SKIP_THRESHOLD * 100}% threshold)`, ); @@ -193,6 +195,7 @@ export async function runCrossFileBindingPropagation( if (crossFileResolved >= MAX_CROSS_FILE_REPROCESS) { if (isDev) + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`⚠️ Cross-file re-resolution capped at ${MAX_CROSS_FILE_REPROCESS} files`); break; } @@ -204,6 +207,7 @@ export async function runCrossFileBindingPropagation( const elapsed = Date.now() - crossFileStart; const totalElapsed = Date.now() - pipelineStart; const reResolutionPct = totalElapsed > 0 ? ((elapsed / totalElapsed) * 100).toFixed(1) : '0'; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”— Cross-file re-resolution: ${crossFileResolved} candidates re-processed` + ` in ${elapsed}ms (${reResolutionPct}% of total ingestion time so far)`, diff --git a/gitnexus/src/core/ingestion/pipeline-phases/cross-file.ts b/gitnexus/src/core/ingestion/pipeline-phases/cross-file.ts index e1e907a0b..ac3ee54c7 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/cross-file.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/cross-file.ts @@ -59,10 +59,12 @@ export const crossFilePhase: PipelinePhase = { if (isDev) { if (bindingAccumulator.totalBindings > 0) { const memKB = Math.round(bindingAccumulator.estimateMemoryBytes() / 1024); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ“¦ BindingAccumulator: ${bindingAccumulator.totalBindings} bindings across ${bindingAccumulator.fileCount} files (~${memKB} KB)`, ); } else if (totalFiles > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ“¦ BindingAccumulator: EMPTY β€” 0 bindings across 0 files despite ${totalFiles} parsed files. If the codebase has typed bindings, this indicates an upstream regression.`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/markdown.ts b/gitnexus/src/core/ingestion/pipeline-phases/markdown.ts index 6b3853b9d..43631a3a9 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/markdown.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/markdown.ts @@ -48,6 +48,7 @@ export const markdownPhase: PipelinePhase = { const mdResult = processMarkdown(ctx.graph, mdFiles, allPathSet); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( ` Markdown: ${mdResult.sections} sections, ${mdResult.links} cross-links from ${mdFiles.length} files`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/mro.ts b/gitnexus/src/core/ingestion/pipeline-phases/mro.ts index 372ae32b0..9f5bbb0a2 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/mro.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/mro.ts @@ -42,6 +42,7 @@ export const mroPhase: PipelinePhase = { const mroResult = computeMRO(ctx.graph); if (isDev && mroResult.entries.length > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”€ MRO: ${mroResult.entries.length} classes analyzed, ${mroResult.ambiguityCount} ambiguities, ${mroResult.overrideEdges} METHOD_OVERRIDES, ${mroResult.methodImplementsEdges} METHOD_IMPLEMENTS`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/orm.ts b/gitnexus/src/core/ingestion/pipeline-phases/orm.ts index ebdac018a..2f6082f76 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/orm.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/orm.ts @@ -91,6 +91,7 @@ function processORMQueries( } if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `ORM dataflow: ${edgesCreated} QUERIES edges, ${modelNodes.size} models (${queries.length} total calls)`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts b/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts index 025bdbeb7..b6f1c7047 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts @@ -136,6 +136,7 @@ export async function runChunkedParseAndResolve( } } for (const [lang, count] of skippedByLang) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `Skipping ${count} ${lang} file(s) β€” ${lang} parser not available (native binding may not have built). Try: npm rebuild tree-sitter-${lang}`, ); @@ -171,6 +172,7 @@ export async function runChunkedParseAndResolve( if (isDev) { const totalMB = parseableScanned.reduce((s, f) => s + f.size, 0) / (1024 * 1024); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ“‚ Scan: ${totalFiles} paths, ${totalParseable} parseable (${totalMB.toFixed(0)}MB), ${numChunks} chunks @ ${CHUNK_BYTE_BUDGET / (1024 * 1024)}MB budget`, ); @@ -220,6 +222,7 @@ export async function runChunkedParseAndResolve( } workerPool = createWorkerPool(workerUrl); } catch (err) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( 'Worker pool creation failed, using sequential fallback:', (err as Error).message, @@ -339,6 +342,7 @@ export async function runChunkedParseAndResolve( exportedTypeMap, ); if (isDev && enrichedCount > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”— E1: Seeded ${enrichedCount} cross-file receiver types (chunk ${chunkIdx + 1})`, ); @@ -538,6 +542,7 @@ export async function runChunkedParseAndResolve( const rcStats = ctx.getStats(); const total = rcStats.cacheHits + rcStats.cacheMisses; const hitRate = total > 0 ? ((rcStats.cacheHits / total) * 100).toFixed(1) : '0'; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ” Resolution cache: ${rcStats.cacheHits} hits, ${rcStats.cacheMisses} misses (${hitRate}% hit rate)`, ); @@ -554,12 +559,14 @@ export async function runChunkedParseAndResolve( bindingAccumulator.finalize(); const enriched = enrichExportedTypeMap(bindingAccumulator, graph, exportedTypeMap); if (isDev && enriched > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”— Worker TypeEnv enrichment: ${enriched} fixpoint-inferred exports added to ExportedTypeMap`, ); } } catch (enrichErr) { if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( 'Post-fallback finalize/enrich failed during cleanup:', (enrichErr as Error).message, @@ -571,6 +578,7 @@ export async function runChunkedParseAndResolve( if (!hasSynthesized) { const synthesized = synthesizeWildcardImportBindings(graph, ctx); if (isDev && synthesized > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”— Synthesized ${synthesized} additional wildcard import bindings (Go/Ruby/C++/Swift/Python)`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/processes.ts b/gitnexus/src/core/ingestion/pipeline-phases/processes.ts index 209906cfb..4358d24e5 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/processes.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/processes.ts @@ -67,6 +67,7 @@ export const processesPhase: PipelinePhase = { ); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”„ Process detection: ${processResult.stats.totalProcesses} processes found (${processResult.stats.crossCommunityCount} cross-community)`, ); @@ -167,6 +168,7 @@ export const processesPhase: PipelinePhase = { } } if (isDev && linked > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ”— Linked ${linked} Route/Tool nodes to execution flows`); } } diff --git a/gitnexus/src/core/ingestion/pipeline-phases/routes.ts b/gitnexus/src/core/ingestion/pipeline-phases/routes.ts index cd0a65f9d..3dc72c114 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/routes.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/routes.ts @@ -174,6 +174,7 @@ export const routesPhase: PipelinePhase = { } if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ—ΊοΈ Route registry: ${routeRegistry.size} routes${duplicateRoutes > 0 ? ` (${duplicateRoutes} duplicate URLs skipped)` : ''}`, ); @@ -224,6 +225,7 @@ export const routesPhase: PipelinePhase = { linkedCount++; } if (isDev && linkedCount > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ›‘οΈ Linked ${mwPath} middleware [${mwLabel.join(', ')}] to ${linkedCount} routes`, ); @@ -290,6 +292,7 @@ export const routesPhase: PipelinePhase = { processNextjsFetchRoutes(ctx.graph, allFetchCalls, routeURLToFile, consumerContents); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `πŸ”— Processed ${allFetchCalls.length} fetch() calls against ${routeRegistry.size} routes`, ); diff --git a/gitnexus/src/core/ingestion/pipeline-phases/runner.ts b/gitnexus/src/core/ingestion/pipeline-phases/runner.ts index 89543e049..d5c789e13 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/runner.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/runner.ts @@ -176,6 +176,7 @@ export async function runPipeline( const start = Date.now(); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`β–Ά Phase: ${phase.name}`); } @@ -220,6 +221,7 @@ export async function runPipeline( }); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`βœ“ Phase: ${phase.name} (${durationMs}ms)`); } } diff --git a/gitnexus/src/core/ingestion/pipeline-phases/tools.ts b/gitnexus/src/core/ingestion/pipeline-phases/tools.ts index 023c8a1af..053a5a6f0 100644 --- a/gitnexus/src/core/ingestion/pipeline-phases/tools.ts +++ b/gitnexus/src/core/ingestion/pipeline-phases/tools.ts @@ -104,6 +104,7 @@ export const toolsPhase: PipelinePhase = { } if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`πŸ”§ Tool registry: ${toolDefs.length} tools detected`); } } diff --git a/gitnexus/src/core/ingestion/process-processor.ts b/gitnexus/src/core/ingestion/process-processor.ts index a12378c98..10228008b 100644 --- a/gitnexus/src/core/ingestion/process-processor.ts +++ b/gitnexus/src/core/ingestion/process-processor.ts @@ -319,12 +319,15 @@ const findEntryPoints = ( // DEBUG: Log top candidates with new scoring details if (sorted.length > 0 && isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(`[Process] Top 10 entry point candidates (new scoring):`); sorted.slice(0, 10).forEach((c, i) => { const node = graph.getNode(c.id); const exported = node?.properties.isExported ? 'βœ“' : 'βœ—'; const shortPath = node?.properties.filePath?.split('/').slice(-2).join('/') || ''; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(` ${i + 1}. ${node?.properties.name} [exported:${exported}] (${shortPath})`); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log(` score: ${c.score.toFixed(2)} = [${c.reasons.join(' Γ— ')}]`); }); } diff --git a/gitnexus/src/core/ingestion/scope-extractor-bridge.ts b/gitnexus/src/core/ingestion/scope-extractor-bridge.ts index 1774cefca..fc63f29bf 100644 --- a/gitnexus/src/core/ingestion/scope-extractor-bridge.ts +++ b/gitnexus/src/core/ingestion/scope-extractor-bridge.ts @@ -53,6 +53,7 @@ export function extractParsedFile( err instanceof Error ? err.message : String(err) }`; if (onWarn !== undefined) onWarn(message); + // eslint-disable-next-line no-console -- TODO(pino-migration) else console.warn(message); return undefined; } diff --git a/gitnexus/src/core/ingestion/scope-resolution/pipeline/phase.ts b/gitnexus/src/core/ingestion/scope-resolution/pipeline/phase.ts index 5dbb3715f..900a7f1fd 100644 --- a/gitnexus/src/core/ingestion/scope-resolution/pipeline/phase.ts +++ b/gitnexus/src/core/ingestion/scope-resolution/pipeline/phase.ts @@ -144,6 +144,7 @@ export const scopeResolutionPhase: PipelinePhase = { resolutionConfig, onWarn: (msg) => { if (isSemanticModelValidatorEnabled()) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`[scope-resolution:${lang}] ${msg}`); } }, @@ -162,6 +163,7 @@ export const scopeResolutionPhase: PipelinePhase = { }); if (isDev) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `[scope-resolution:${lang}] ${stats.filesProcessed} files β†’ ${stats.importsEmitted} IMPORTS + ${stats.referenceEdgesEmitted} reference edges (${stats.resolve.unresolved} unresolved sites, ${stats.referenceSkipped} skipped)`, ); diff --git a/gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts b/gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts index b069f0dd1..947db5eb7 100644 --- a/gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts +++ b/gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts @@ -279,6 +279,7 @@ export function runScopeResolution( if (PROF) { const tEnd = process.hrtime.bigint(); const ns = (a: bigint, b: bigint): number => Number(b - a) / 1_000_000; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[scope-resolution prof] extract=${ns(tStart, tExtract).toFixed(0)}ms` + ` finalize=${ns(tExtract, tFinalize).toFixed(0)}ms` + diff --git a/gitnexus/src/core/ingestion/type-env.ts b/gitnexus/src/core/ingestion/type-env.ts index 998e7a59e..011655f5f 100644 --- a/gitnexus/src/core/ingestion/type-env.ts +++ b/gitnexus/src/core/ingestion/type-env.ts @@ -769,6 +769,7 @@ const resolveFixpointBindings = ( if (iter === MAX_FIXPOINT_ITERATIONS - 1 && process.env.GITNEXUS_DEBUG) { const unresolved = pendingItems.length - resolved.size; if (unresolved > 0) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `[type-env] fixpoint hit iteration cap (${MAX_FIXPOINT_ITERATIONS}), ${unresolved} items unresolved`, ); diff --git a/gitnexus/src/core/ingestion/utils/max-file-size.ts b/gitnexus/src/core/ingestion/utils/max-file-size.ts index 0c418bfd4..8363ec946 100644 --- a/gitnexus/src/core/ingestion/utils/max-file-size.ts +++ b/gitnexus/src/core/ingestion/utils/max-file-size.ts @@ -11,6 +11,7 @@ const warned = new Set(); const warnOnce = (key: string, message: string): void => { if (warned.has(key)) return; warned.add(key); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(message); }; diff --git a/gitnexus/src/core/ingestion/workers/parse-worker.ts b/gitnexus/src/core/ingestion/workers/parse-worker.ts index 669465fe2..80ba5e7b7 100644 --- a/gitnexus/src/core/ingestion/workers/parse-worker.ts +++ b/gitnexus/src/core/ingestion/workers/parse-worker.ts @@ -1385,6 +1385,7 @@ const processFileGroup = ( if (parentPort) { parentPort.postMessage({ type: 'warning', message }); } else { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(message); } return; @@ -1414,6 +1415,7 @@ const processFileGroup = ( bufferSize: getTreeSitterBufferSize(parseContent), }); } catch (err) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `Failed to parse file ${file.path}: ${err instanceof Error ? err.message : String(err)}`, ); @@ -1427,6 +1429,7 @@ const processFileGroup = ( try { matches = query.matches(tree.rootNode); } catch (err) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `Query execution failed for ${file.path}: ${err instanceof Error ? err.message : String(err)}`, ); @@ -1447,6 +1450,7 @@ const processFileGroup = ( file.path, (message) => { if (parentPort) parentPort.postMessage({ type: 'warning', message }); + // eslint-disable-next-line no-console -- TODO(pino-migration) else console.warn(message); }, tree, diff --git a/gitnexus/src/core/ingestion/workers/worker-pool.ts b/gitnexus/src/core/ingestion/workers/worker-pool.ts index 4be6af6b1..5c02f2bd2 100644 --- a/gitnexus/src/core/ingestion/workers/worker-pool.ts +++ b/gitnexus/src/core/ingestion/workers/worker-pool.ts @@ -258,6 +258,7 @@ export const createWorkerPool = ( splitDepth: job.splitDepth + 1, timeoutMs: nextTimeout, }; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `Worker ${workerIndex} parse job idle timeout after ${job.timeoutMs / 1000}s ` + `(${job.items.length} items, ${job.estimatedBytes} bytes, last progress: ${lastProgress}). ` + @@ -271,6 +272,7 @@ export const createWorkerPool = ( const nextAttempt = job.attempt + 1; if (nextAttempt <= poolOptions.maxTimeoutRetries) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( `Worker ${workerIndex} parse job idle timeout after ${job.timeoutMs / 1000}s ` + `(single item, attempt ${nextAttempt}/${poolOptions.maxTimeoutRetries + 1}). ` + @@ -365,6 +367,7 @@ export const createWorkerPool = ( reportProgress(); } else if (msg.type === 'warning') { resetIdleTimer(); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(msg.message); } else if (msg.type === 'sub-batch-done') { waitingForFlush = true; diff --git a/gitnexus/src/core/lbug/extension-loader.ts b/gitnexus/src/core/lbug/extension-loader.ts index 9fbee871b..6ba78241b 100644 --- a/gitnexus/src/core/lbug/extension-loader.ts +++ b/gitnexus/src/core/lbug/extension-loader.ts @@ -188,6 +188,7 @@ export class ExtensionManager { const policy = opts.policy ?? this.options.policy ?? resolvePolicyFromEnv(); const timeoutMs = opts.installTimeoutMs ?? this.options.installTimeoutMs ?? getExtensionInstallTimeoutMs(); + // eslint-disable-next-line no-console -- TODO(pino-migration) const warn = this.options.warn ?? console.warn; if (policy === 'never') { diff --git a/gitnexus/src/core/lbug/lbug-adapter.ts b/gitnexus/src/core/lbug/lbug-adapter.ts index bdacadff9..61d856ce3 100644 --- a/gitnexus/src/core/lbug/lbug-adapter.ts +++ b/gitnexus/src/core/lbug/lbug-adapter.ts @@ -348,6 +348,7 @@ const doInitLbug = async (dbPath: string) => { } catch (err) { const msg = err instanceof Error ? err.message : String(err); if (!msg.includes('already exists')) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn(`⚠️ Schema creation warning: ${msg.slice(0, 120)}`); } } @@ -701,6 +702,7 @@ export const insertNodeToLbug = async ( return false; } catch (e: any) { // Node may already exist or other error + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error(`Failed to insert ${label} node:`, e.message); return false; } @@ -1028,6 +1030,7 @@ export const fetchExistingEmbeddingHashes = async ( const nodeId = r.nodeId ?? r[0]; if (nodeId) map.set(nodeId, STALE_HASH_SENTINEL); } + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `[embed] ${map.size} nodes in legacy DB (missing chunk-aware columns) β€” all treated as stale`, ); @@ -1035,6 +1038,7 @@ export const fetchExistingEmbeddingHashes = async ( } catch (fallbackErr: any) { const fallbackMsg = fallbackErr?.message ?? ''; if (isMissingColumnOrTableError(fallbackMsg)) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log( `[embed] CodeEmbedding table not yet present β€” full embedding run (${fallbackMsg})`, ); diff --git a/gitnexus/src/core/tree-sitter/parser-loader.ts b/gitnexus/src/core/tree-sitter/parser-loader.ts index e79cdc599..f5e65c5e1 100644 --- a/gitnexus/src/core/tree-sitter/parser-loader.ts +++ b/gitnexus/src/core/tree-sitter/parser-loader.ts @@ -175,7 +175,9 @@ const logFailure = (key: string, result: LoadResult): void => { logged.add(key); const message = `[gitnexus] ${result.note} (${result.error.message})`; + // eslint-disable-next-line no-console -- TODO(pino-migration) if (result.severity === 'error') console.error(message); + // eslint-disable-next-line no-console -- TODO(pino-migration) else console.warn(message); }; diff --git a/gitnexus/src/core/wiki/cursor-client.ts b/gitnexus/src/core/wiki/cursor-client.ts index 707f8e293..e0b85463c 100644 --- a/gitnexus/src/core/wiki/cursor-client.ts +++ b/gitnexus/src/core/wiki/cursor-client.ts @@ -21,6 +21,7 @@ function isVerbose(): boolean { function verboseLog(...args: unknown[]): void { if (isVerbose()) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.log('[cursor-cli]', ...args); } } diff --git a/gitnexus/src/core/wiki/llm-client.ts b/gitnexus/src/core/wiki/llm-client.ts index 6f446be15..1a69453e5 100644 --- a/gitnexus/src/core/wiki/llm-client.ts +++ b/gitnexus/src/core/wiki/llm-client.ts @@ -135,6 +135,7 @@ export async function callLLM( // Warn when using Azure legacy deployment URL without api-version if (azure && !config.apiVersion && config.baseUrl.includes('/deployments/')) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.warn( '[gitnexus] Warning: Azure legacy deployment URL detected but no api-version set. Add --api-version 2024-10-21 or use the v1 API format.', ); diff --git a/gitnexus/src/mcp/core/embedder.ts b/gitnexus/src/mcp/core/embedder.ts index f506cdead..241d8ee06 100644 --- a/gitnexus/src/mcp/core/embedder.ts +++ b/gitnexus/src/mcp/core/embedder.ts @@ -51,6 +51,7 @@ export const initEmbedder = async (): Promise => { applyHfEnvOverrides(env); const embeddingConfig = resolveEmbeddingConfig(); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error('GitNexus: Loading embedding model (first search may take a moment)...'); const devicesToTry: Array<'dml' | 'cuda' | 'cpu'> = @@ -82,6 +83,7 @@ export const initEmbedder = async (): Promise => { restoreStdout(); process.stderr.write = realStderrWrite; } + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error(`GitNexus: Embedding model loaded (${device})`); return embedderInstance!; } catch { diff --git a/gitnexus/src/mcp/local/local-backend.ts b/gitnexus/src/mcp/local/local-backend.ts index 68df9feaa..d8fba7af0 100644 --- a/gitnexus/src/mcp/local/local-backend.ts +++ b/gitnexus/src/mcp/local/local-backend.ts @@ -164,6 +164,7 @@ const confidenceForRelType = (relType: string | undefined): number => /** Structured error logging for query failures β€” replaces empty catch blocks */ function logQueryError(context: string, err: unknown): void { const msg = err instanceof Error ? err.message : String(err); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error(`GitNexus [${context}]: ${msg}`); } @@ -184,6 +185,7 @@ function logQueryError(context: string, err: unknown): void { function logQueryTiming(query: string, phases: Record): void { const totalMs = phases.wall ?? Object.values(phases).reduce((a, b) => a + b, 0); const truncated = query.length > 80 ? `${query.slice(0, 80)}…` : query; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error( `GitNexus [query:timing] query=${JSON.stringify(truncated)} totalMs=${totalMs} phases=${JSON.stringify(phases)}`, ); @@ -287,6 +289,7 @@ export class LocalBackend { // If kuzu exists but lbug doesn't, warn so the user knows to re-analyze. const kuzu = await cleanupOldKuzuFiles(storagePath); if (kuzu.found && kuzu.needsReindex) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error( `GitNexus: "${entry.name}" has a stale KuzuDB index. Run: gitnexus analyze ${entry.path}`, ); @@ -637,6 +640,7 @@ export class LocalBackend { } this.warnedSiblingDrift.add(cacheKey); + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error(`GitNexus: ${match.hint}`); } @@ -990,6 +994,7 @@ export class LocalBackend { try { bm25Results = await searchFTSFromLbug(query, limit, repo.id); } catch (err: any) { + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error('GitNexus: BM25/FTS search failed (FTS indexes may not exist) -', err.message); return { results: [], ftsUsed: false }; } @@ -1114,6 +1119,7 @@ export class LocalBackend { // policy. Emitted once per `LocalBackend` instance lifetime to avoid // noisy stderr on hot semantic-search paths (DoD Β§2.8). this.warnedVectorUnsupported = true; + // eslint-disable-next-line no-console -- TODO(pino-migration) console.error( 'GitNexus [query:vector]: VECTOR extension not supported on this platform; using exact scan fallback', );