GitNexus/gitnexus/scripts
samuel mbabhazi 51ce19d77a
fix(impact): avoid upstream file seeds for private types (#3740)
* fix(impact): do not seed the owning file for a type the index recorded as not exported

The #480 seed adds the file that DEFINES a Class or Interface to the
walk, so the file's IMPORTS edges stand in for the type's importers.
For a type recorded as isExported = false no importer can name it, and
the file's importers came back as its direct dependants: a private
interface used by one function in its file reported eight route files
at depth 1, direct: 8, MEDIUM (#3602, second reproduction).

The DEFINES seed query now also returns n.isExported, matched on the
target's own label since not every node table has the column, and a
row with false is left out of the frontier. true and NULL keep the seed.

Refs #3602

* fix(impact): skip the owning-file seed only where a false export verdict is file-private

`isExported = false` is a narrower fact than "no other file can name it"
in most languages: Java package-private, C# and Kotlin `internal`, Go
lowercase, Python and Dart `_name`, a Rust item seen from a child module,
a C/C++ `static` in a header. Skipping the #480 file seed on every
`false` turned the over-approximation into a false negative for them.

The meaning of a stored verdict is a property of the language, so it
lives on the provider: `LanguageProvider.notExportedIsFilePrivate`, set
on TypeScript, JavaScript, Vue (an ES module is the file), Swift (false
only for `private`/`fileprivate`) and Zig (no `pub`; `export fn` is
recorded true). The seed resolves the provider from the file's path only
for a `false` row and skips the file only when the flag is set.

Two regressions in the same test file: a Java package-private class and
a Kotlin `internal` class, both recorded `false`, keep their importers
as direct dependants.

Refs #3602

* fix(impact): require an ES export in the file before trusting a false verdict

The stored verdict is the provider's export checker, which for an
ECMAScript file answers "under an `export` statement?" whatever the
module kind: a CommonJS class (`module.exports = Foo`) and a top-level
declaration of a global script are both recorded `false`, and both can
be named from other files. Trusting the provider flag alone skipped the
owning-file seed for them.

The index does not record the module kind, but it records the checker's
`true`, which only ES `export` syntax produces. The skip now also
requires a `true` declaration in the same file (Function, Class or
Interface: the tables that carry the column and that a File DEFINES).
A CommonJS file, a script, or a module whose exports all live in
`Const`/`TypeAlias` keeps the seed, as before this fix.

The Java and Kotlin cases now declare a public sibling class, so only
the provider verdict keeps their seed; two new cases cover a CommonJS
module and a global script.

Refs #3602

* fix(impact): preserve uncertain type dependencies

* fix(impact): retain exported type alias dependencies

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2026-10-28 08:09:10 +00:00
..
bench fix(mcp): bound query previews and advertise repo defaults (#3728) 2026-10-26 08:53:47 +00:00
spikes feat(ingestion): M0 — taint/PDG substrate (schema + seams + spikes) (#2080) (#2092) 2026-06-08 18:56:10 +01:00
arm64-prebuild.cjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
assert-native-parsers.mjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
assert-publish-fts-coverage.cjs fix(lbug): ship FTS per-platform and recover in-place native aborts (#3274) 2026-09-14 08:52:24 +01:00
assert-publish-grammar-coverage.cjs fix(embeddings): keep ONNX off the install and analyze critical path (#3287) 2026-09-15 12:11:47 +01:00
assert-web-assets.mjs fix(build): build the web UI from prepack, not from every npm ci (#3166) 2026-09-04 13:28:11 +01:00
bench-scope-resolution.ts refactor(ingestion): delete legacy call-resolution DAG + heritage processor (RING4-1, #942) (#2023) 2026-06-04 11:07:37 +01:00
build-tree-sitter-grammars.cjs feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
build-web.js fix(build): build the web UI from prepack, not from every npm ci (#3166) 2026-09-04 13:28:11 +01:00
build.js chore: compile first-party packages with TypeScript 7 (#3311) 2026-09-17 22:16:00 +01:00
cross-platform-shard.ts fix(ci): rebalance native tests and stabilize flaky gates (#3719) 2026-10-25 09:38:21 +00:00
cross-platform-tests.ts fix(impact): avoid upstream file seeds for private types (#3740) 2026-10-28 08:09:10 +00:00
ensure-fts.ts fix(lbug): ship FTS per-platform and recover in-place native aborts (#3274) 2026-09-14 08:52:24 +01:00
execution-reporter.ts chore(deps): consolidate open dependabot updates (#3496) 2026-10-06 07:23:35 +00:00
install-duckdb-extension.mjs fix(docker): verify bundled FTS artifacts (#3669) 2026-10-21 17:27:30 +00:00
prepare-tree-sitter-bundle.cjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
rebuild-bundled-grammar-prebuilds.cjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
run-benchmarks.ts fix(ci): require every test to execute across the CI matrix (#3479) 2026-10-06 07:34:17 +03:00
run-cross-platform.ts fix(ci): require every test to execute across the CI matrix (#3479) 2026-10-06 07:34:17 +03:00
shard-arg.ts fix(ci): shard platform-sensitive matrix + spawn built CLI to fix Windows cross-platform timeout (#2394) 2026-07-08 09:09:11 +01:00
smoke-package-managers.mjs fix(cli): recover pnpm and Bun invocation paths (#3721) 2026-10-25 21:05:02 +00:00
sync-plugin-manifests.mjs feat: add Factory AI (Droid) integration (#2543) 2026-09-24 19:12:40 +01:00
test-completeness.ts fix(ci): require every test to execute across the CI matrix (#3479) 2026-10-06 07:34:17 +03:00