GitNexus/gitnexus/src
Gergő Magyar f18ff521fc
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
..
cli fix: make extension installs offline-first (#1161) 2026-05-29 20:04:41 +01:00
config fix(worker): analyze native worker aborts (#1833) 2026-05-26 17:28:39 +01:00
core fix(group): stop Node gRPC loadPackageDefinition gate from matching every member call (#1916) 2026-05-30 09:31:36 +01:00
lib feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
mcp fix: make extension installs offline-first (#1161) 2026-05-29 20:04:41 +01:00
server fix(windows): pass windowsHide:true to every child_process spawn-family call (#1794) 2026-05-24 09:51:21 +01:00
storage feat(ingestion): trace indirect call patterns — FastAPI Depends() and frontend HTTP consumers (#1852) 2026-05-28 05:33:30 +01:00
types feat(cpp): Add structured resolver suppression outcomes (#1785) 2026-05-24 07:34:40 +01:00