mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-08-28 05:25:25 +00:00
chore(lint): baseline-suppress 134 existing console.* sites with TODO(pino-migration)
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).
This commit is contained in:
parent
471f77e6bf
commit
3e8e7c2acc
50 changed files with 134 additions and 0 deletions
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}"`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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}"`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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}"`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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}`,
|
||||
|
|
|
|||
|
|
@ -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}"`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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}"`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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}"`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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.`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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.`,
|
||||
|
|
|
|||
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ export async function loadTsconfigPaths(repoRoot: string): Promise<TsconfigPaths
|
|||
|
||||
if (aliases.size > 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<GoModuleConfig
|
|||
const match = content.match(/^module\s+(\S+)/m);
|
||||
if (match) {
|
||||
if (isDev) {
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.log(`📦 Loaded Go module path: ${match[1]}`);
|
||||
}
|
||||
return { modulePath: match[1] };
|
||||
|
|
@ -132,6 +134,7 @@ export async function loadComposerConfig(repoRoot: string): Promise<ComposerConf
|
|||
}
|
||||
|
||||
if (isDev) {
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.log(`📦 Loaded ${psr4.size} PSR-4 mappings from composer.json`);
|
||||
}
|
||||
return { psr4 };
|
||||
|
|
@ -178,6 +181,7 @@ export async function loadCSharpProjectConfig(repoRoot: string): Promise<CSharpP
|
|||
const projectDir = path.relative(repoRoot, dir).replace(/\\/g, '/');
|
||||
configs.push({ rootNamespace, projectDir });
|
||||
if (isDev) {
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.log(
|
||||
`📦 Loaded C# project: ${entry.name} (namespace: ${rootNamespace}, dir: ${projectDir})`,
|
||||
);
|
||||
|
|
@ -217,6 +221,7 @@ export async function loadSwiftPackageConfig(repoRoot: string): Promise<SwiftPac
|
|||
|
||||
if (targets.size > 0) {
|
||||
if (isDev) {
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.log(`📦 Loaded ${targets.size} Swift package targets`);
|
||||
}
|
||||
return { targets };
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ function findBodies(node: SyntaxNode, bodyNodeSet: Set<string>): 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}'`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const cobolPhase: PipelinePhase<CobolOutput> = {
|
|||
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<CobolOutput> = {
|
|||
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`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const communitiesPhase: PipelinePhase<CommunitiesOutput> = {
|
|||
});
|
||||
|
||||
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)})`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)`,
|
||||
|
|
|
|||
|
|
@ -59,10 +59,12 @@ export const crossFilePhase: PipelinePhase<CrossFileOutput> = {
|
|||
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.`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export const markdownPhase: PipelinePhase<MarkdownOutput> = {
|
|||
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`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export const mroPhase: PipelinePhase<MROOutput> = {
|
|||
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`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ export const processesPhase: PipelinePhase<ProcessesOutput> = {
|
|||
);
|
||||
|
||||
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<ProcessesOutput> = {
|
|||
}
|
||||
}
|
||||
if (isDev && linked > 0) {
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.log(`🔗 Linked ${linked} Route/Tool nodes to execution flows`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ export const routesPhase: PipelinePhase<RoutesOutput> = {
|
|||
}
|
||||
|
||||
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<RoutesOutput> = {
|
|||
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<RoutesOutput> = {
|
|||
|
||||
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`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ export const toolsPhase: PipelinePhase<ToolsOutput> = {
|
|||
}
|
||||
|
||||
if (isDev) {
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.log(`🔧 Tool registry: ${toolDefs.length} tools detected`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(' × ')}]`);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ export const scopeResolutionPhase: PipelinePhase<ScopeResolutionOutput> = {
|
|||
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<ScopeResolutionOutput> = {
|
|||
});
|
||||
|
||||
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)`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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` +
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const warned = new Set<string>();
|
|||
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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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})`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ export const initEmbedder = async (): Promise<FeatureExtractionPipeline> => {
|
|||
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<FeatureExtractionPipeline> => {
|
|||
restoreStdout();
|
||||
process.stderr.write = realStderrWrite;
|
||||
}
|
||||
// eslint-disable-next-line no-console -- TODO(pino-migration)
|
||||
console.error(`GitNexus: Embedding model loaded (${device})`);
|
||||
return embedderInstance!;
|
||||
} catch {
|
||||
|
|
|
|||
|
|
@ -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<string, number>): 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',
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue