diff --git a/gitnexus/src/core/ingestion/languages/cobol.ts b/gitnexus/src/core/ingestion/languages/cobol.ts index a28f87a8f..44891cef4 100644 --- a/gitnexus/src/core/ingestion/languages/cobol.ts +++ b/gitnexus/src/core/ingestion/languages/cobol.ts @@ -34,6 +34,11 @@ export const cobolProvider = defineLanguage({ exportChecker: () => false, importResolver: () => null, + // No `cfgVisitor`: COBOL is the deliberate non-goal of the PDG-language + // rollout (#2195). There is no installed tree-sitter grammar and COBOL's + // PERFORM / GO-TO control flow is exotic; the worker's `provider.cfgVisitor &&` + // gate therefore emits no CFG/PDG layer for COBOL (see worker-roundtrip.test.ts). + // ── Scope-resolution hooks ─────────────────────────────────────── emitScopeCaptures: emitCobolScopeCaptures, interpretImport: interpretCobolImport, diff --git a/gitnexus/src/core/ingestion/languages/vue.ts b/gitnexus/src/core/ingestion/languages/vue.ts index 08c085298..d6493a950 100644 --- a/gitnexus/src/core/ingestion/languages/vue.ts +++ b/gitnexus/src/core/ingestion/languages/vue.ts @@ -37,6 +37,7 @@ import { resolveTsImportTarget, } from './typescript/index.js'; import { emitVueScopeCaptures } from './vue/captures.js'; +import { createTypeScriptCfgVisitor } from '../cfg/visitors/typescript.js'; const VUE_SPECIFIC_BUILT_INS = [ 'ref', @@ -88,6 +89,11 @@ export const vueProvider = defineLanguage({ variableExtractor: createVariableExtractor(typescriptVariableConfig), classExtractor: vueClassExtractor, builtInNames: VUE_BUILT_INS, + // Vue SFC diff --git a/gitnexus/test/integration/cfg/pipeline-pdg.test.ts b/gitnexus/test/integration/cfg/pipeline-pdg.test.ts index c1b266733..cf3fd522b 100644 --- a/gitnexus/test/integration/cfg/pipeline-pdg.test.ts +++ b/gitnexus/test/integration/cfg/pipeline-pdg.test.ts @@ -219,6 +219,33 @@ const C_FAMILY: ReadonlyArray<{ lang: string; fixture: string }> = [ { lang: 'Go', fixture: 'go-hazards.go' }, ]; +// ── Remaining-language worker-mode PDG (#2195 capstone) ───────────────────── +// +// The same both-sinks worker proof, run for the eight languages whose CFG +// visitors completed the PDG-language rollout AFTER the C-family: the dynamic +// languages (Python, PHP, Ruby), the systems/app languages (Rust, Swift, +// Kotlin, Dart), AND Vue (whose provider reuses the TypeScript CfgVisitor — the +// .vue file routes through the worker's Vue→TypeScript grammar mapping and the +// SFC +`; + const cfgs = cfgsOfSfc(sfc); + const loop = cfgs.find((c) => c.blocks.some((b) => b.text.includes('sum = sum + x'))); + expect(loop).toBeDefined(); + if (!loop) return; + + // The non-terminating loop has a back-edge but EXIT must still be reachable + // from EVERY block (the structural escape edge feeds the post-dom pass). + expect(edgeKinds(loop).has('loop-back')).toBe(true); + expect(isExitReachableFromAllBlocks(loop)).toBe(true); + + // Control dependence is computable and non-empty — the worker's CDG pass + // would emit > 0 edges for this function (matches the pipeline assertion). + const cd = computeControlDependence(loop); + expect(cd.edges.length).toBeGreaterThan(0); + for (const e of cd.edges) { + expect(['T', 'F']).toContain(e.label); + } + }); +});