diff --git a/gitnexus/src/core/ingestion/import-processor.ts b/gitnexus/src/core/ingestion/import-processor.ts index f2c17af96..b08482716 100644 --- a/gitnexus/src/core/ingestion/import-processor.ts +++ b/gitnexus/src/core/ingestion/import-processor.ts @@ -5,8 +5,7 @@ import { isLanguageAvailable, loadParser, loadLanguage } from '../tree-sitter/pa import { getProvider, getProviderForFile, providersWithImplicitWiring } from './languages/index.js'; import type { LanguageProvider } from './language-provider.js'; import { generateId } from '../../lib/utils.js'; -import { getLanguageFromFilename, SupportedLanguages } from 'gitnexus-shared'; -import { isRegistryPrimary } from './registry-primary-flag.js'; +import { getLanguageFromFilename } from 'gitnexus-shared'; import { isVerboseIngestionEnabled } from './utils/verbose.js'; import { yieldToEventLoop } from './utils/event-loop.js'; import type { ExtractedImport } from './workers/parse-worker.js'; @@ -43,8 +42,6 @@ function wireImplicitImports( const grouped = new Map(); for (const file of files) { - const lang = getLanguageFromFilename(file); - if (lang && isRegistryPrimary(lang)) continue; const provider = getProviderForFile(file); if (!provider?.implicitImportWirer) continue; let list = grouped.get(provider); @@ -285,11 +282,6 @@ export const processImports = async ( // 1. Check language support first const language = getLanguageFromFilename(file.path); if (!language) continue; - // Registry-primary gate: when REGISTRY_PRIMARY_=1, the - // scope-based pipeline phase (`pythonScopePhase`, etc.) owns - // IMPORTS/CALLS emission for this language. Skip the legacy path - // here so we don't double-emit edges. - if (isRegistryPrimary(language)) continue; if (!isLanguageAvailable(language)) { if (skippedByLang) { skippedByLang.set(language, (skippedByLang.get(language) ?? 0) + 1); @@ -475,10 +467,6 @@ export const processImportsFromExtracted = async ( } for (const imp of fileImports) { - // Registry-primary gate: skip when the scope-based phase owns - // emission for this language. `imp.language` is set by the parse - // worker; trust it here. - if (isRegistryPrimary(imp.language)) continue; totalImportsFound++; const provider = getProvider(imp.language); diff --git a/gitnexus/src/core/ingestion/python-scope-emit.ts b/gitnexus/src/core/ingestion/python-scope-emit.ts index 251849e13..6459f1dea 100644 --- a/gitnexus/src/core/ingestion/python-scope-emit.ts +++ b/gitnexus/src/core/ingestion/python-scope-emit.ts @@ -179,12 +179,11 @@ export function runPythonScopeResolution( nodeLookup, ); - // IMPORTS edges: mirror the legacy file-to-file shape so existing - // queries that aggregate by `File → File` continue to work. Done here - // (not in `emit-references.emitScopeGraph`) because that path emits - // scope-to-scope edges, which are a different schema. Keeping the - // legacy shape avoids churn in downstream consumers and tests. - const importsEmitted = emitImportEdges(graph, indexes.imports, indexes.scopeTree); + // IMPORTS edges are emitted by the legacy `processImports` path + // (which heritage resolution depends on for `ctx.resolve` to find + // imported symbols). We intentionally do NOT emit IMPORTS here to + // avoid duplicates and to keep heritage's resolution chain intact. + const importsEmitted = 0; return { filesProcessed: parsedFiles.length,