GitNexus/gitnexus-shared
Sravan1011 7947d0b230 fix(#2965): system headers must not resolve to in-repo files
C and C++ use two syntactically distinct include forms:
  #include <x.h>   -- angle-bracket: search system include paths only
  #include "x.h"  -- quoted: search relative to the including file first

The old suffix-match fallback in resolveCImportTarget had no awareness
of this distinction, so a repo containing its own stdio.h would capture
every #include <stdio.h> and resolve it to the local file.

Fix:
- Add isSystem?: boolean to the wildcard variant of ParsedImportSyntax
- interpretCImport / interpretCppImport now set isSystem from the
  @import.system tree-sitter capture (present for angle-bracket form)
- resolveImportTarget in both cScopeResolver and cppScopeResolver
  short-circuits to null when context.parsedImport.isSystem is true,
  refusing to suffix-match system headers against workspace files
- Remove C and C++ from KNOWN_GAPS in the conformance test; add proper
  test cases with a parsedImport factory that distinguishes angle-bracket
  (isSystem:true) from quoted (isSystem:false) includes

Test: all 36 external-import-conformance cases pass, including the two
new c/cpp arms that were previously in KNOWN_GAPS.
2026-09-21 21:13:48 +05:30
..
src fix(#2965): system headers must not resolve to in-repo files 2026-09-21 21:13:48 +05:30
package-lock.json chore(deps)(deps-dev): bump typescript in /gitnexus-shared (#2941) 2026-08-13 06:23:16 +01:00
package.json chore(deps)(deps-dev): bump typescript in /gitnexus-shared (#2941) 2026-08-13 06:23:16 +01:00
tsconfig.json feat: unify web and cli ingestion pipeline (#536) 2026-03-28 14:07:11 +00:00