diff --git a/gitnexus/src/core/ingestion/cfg/visitors/typescript.ts b/gitnexus/src/core/ingestion/cfg/visitors/typescript.ts index 1382fdb66..3423da03c 100644 --- a/gitnexus/src/core/ingestion/cfg/visitors/typescript.ts +++ b/gitnexus/src/core/ingestion/cfg/visitors/typescript.ts @@ -76,8 +76,6 @@ const TS_FUNCTION_TYPES = new Set([ 'method_definition', 'generator_function_declaration', 'generator_function', - 'async_function_declaration', - 'async_arrow_function', ]); /** Statement node types that break a basic block (everything else coalesces). */ @@ -87,7 +85,6 @@ const CONTROL_FLOW_TYPES = new Set([ 'do_statement', 'for_statement', 'for_in_statement', - 'for_of_statement', 'switch_statement', 'try_statement', 'return_statement', @@ -103,7 +100,6 @@ const LOOP_OR_SWITCH_TYPES = new Set([ 'do_statement', 'for_statement', 'for_in_statement', - 'for_of_statement', 'switch_statement', ]); @@ -206,7 +202,6 @@ class TsCfgWalk { case 'for_statement': return this.visitFor(stmt); case 'for_in_statement': - case 'for_of_statement': return this.visitForIn(stmt); case 'switch_statement': return this.visitSwitch(stmt); diff --git a/gitnexus/test/helpers/literal-collectors.ts b/gitnexus/test/helpers/literal-collectors.ts index e75a44e2d..6e34e5165 100644 --- a/gitnexus/test/helpers/literal-collectors.ts +++ b/gitnexus/test/helpers/literal-collectors.ts @@ -183,6 +183,14 @@ function mode2Files(): string[] { if (existsSync(cap)) files.push(cap); } } + // CFG visitors (cfg/visitors/.ts) hard-code tree-sitter node-type and + // field literals directly; include them so the gate validates per-language + // CFG literals against the right grammar (basename → grammar via + // `fileLanguages`: c-cpp → C+C++, csharp → C#, java → Java, go → Go, + // typescript[-harvest] → TS). Without this, the gate stays green on dead + // literals in a new visitor — the exact failure KTD5 warns about. + const cfgVisitorsDir = join(INGESTION_DIR, 'cfg', 'visitors'); + if (existsSync(cfgVisitorsDir)) walkTs(cfgVisitorsDir, files); const exportDetection = join(INGESTION_DIR, 'export-detection.ts'); if (existsSync(exportDetection)) files.push(exportDetection); return files;