GitNexus/gitnexus/src/core
Gergő Magyar 498fa9a6df fix(group): stop Node gRPC loadPackageDefinition gate from matching every member call (#1916)
LOAD_PACKAGE_DEFINITION_SPEC matched `loadPackageDefinition` via a single
`function: [ (identifier) @fn (#eq?) (member_expression property:(property_identifier) @fn (#eq?)) ]`
alternation. Under the pinned tree-sitter@0.21.1 binding a top-level alternation
whose branches reuse one capture name collapses to a single pattern with a shared
predicate bucket: the member-expression branch's `@fn` is left unbound and its
`#eq?` is never enforced, so that branch matches EVERY `obj.method(...)` call
(`console.log(...)`, `logger.info(...)`, …). Since virtually every TS/JS file has
some member call, the `usesLoadPackage` gate was effectively always-open and
`new pkg.<Capitalized>Service(...)` was emitted as a spurious gRPC consumer — the
exact false positive the gate was added to prevent.

Split the spec into two single-branch PatternSpecs; each compiles to its own
Parser.Query with an independent predicate bucket where the `#eq?` is enforced
correctly. `runCompiledPatterns` concatenates their matches, so the
`.length > 0` gate is unchanged. `mk` now accepts a spec or a spec array.

Adds test_extract_ts_qualified_ctor_without_loadPackageDefinition_is_ignored, a
negative regression test verified to FAIL on the pre-fix code and PASS with the
fix: a file with no loadPackageDefinition but an unrelated member call +
`new authProto.auth.v1.AuthService(...)` must emit no consumer.

grpc-extractor suite 65/65; tsc + prettier + pre-commit hook clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 09:31:36 +01:00
..
augmentation fix(augment): add CONTAINS fallback when FTS indexes unavailable (#1476) 2026-05-11 16:39:10 +01:00
embeddings fix: make extension installs offline-first (#1161) 2026-05-29 20:04:41 +01:00
graph feat(python): scope-based call resolution + registry-primary flip + perf + generalization (RFC #909 Ring 3) (#980) 2026-04-21 15:50:00 +01:00
group fix(group): stop Node gRPC loadPackageDefinition gate from matching every member call (#1916) 2026-05-30 09:31:36 +01:00
incremental feat(analyze): incremental indexing (parse cache + DB writeback + scope-res short-circuit) (#1479) 2026-05-12 13:14:56 +01:00
ingestion feat(cpp): add template partial ordering (#1885) 2026-05-29 21:38:19 +01:00
lbug fix: make extension installs offline-first (#1161) 2026-05-29 20:04:41 +01:00
platform fix: add platform-aware semantic fallback (#1150) 2026-04-28 12:21:25 +01:00
search feat: Add analyze --repair-fts, enforce FTS verification, and harden repair safeguards (#1720) 2026-05-20 13:37:04 +01:00
tree-sitter fix(windows): 32767-char tree-sitter crash + VECTOR extension SIGSEGV (#1433) 2026-05-10 16:00:36 +01:00
wiki fix(wiki): add budget-aware grouping to prevent context overflow on large repos (#627) (#1832) 2026-05-26 12:32:07 +01:00
embedding-mode.ts feat: add optional limit arg to --embeddings flag (closes #382) (#1375) 2026-05-06 16:31:28 +01:00
git-staleness.ts fix(windows): pass windowsHide:true to every child_process spawn-family call (#1794) 2026-05-24 09:51:21 +01:00
logger.ts feat(core): adopt pino structured logger (#1336) 2026-05-07 20:56:25 +01:00
run-analyze.ts fix: make extension installs offline-first (#1161) 2026-05-29 20:04:41 +01:00