GitNexus/gitnexus/test/fixtures
Gergo Magyar 6a1e2a9ed0 fix(cpp): scope-aware isSuperReceiver classification (U1)
The C++ isSuperReceiver hook used a regex `/^[A-Z]\w*::/` that
misclassified any uppercase-qualified call as a super-receiver call.
Singleton::getInstance(), std::Foo::bar(), and PascalCase namespace
calls all entered the super branch, where the absence of an enclosing
class (or wrong MRO context) dropped the resolution entirely.

Fix:
- New optional ScopeResolver hook isSuperReceiverInContext(text,
  callerScope, scopes). Languages where super classification depends
  on caller context define it; receiver-bound-calls.ts prefers it
  when defined and falls back to the simple isSuperReceiver(text)
  otherwise. Other migrated languages (Python, Java, C#, PHP, Go,
  TypeScript) are unchanged.
- C++ implementation: parse the LHS of '::' from the receiver text,
  resolve via findClassBindingInScope, and return true only when
  the LHS is a class-like def in the caller's enclosing class's MRO.
  Returns false for namespace LHS, unresolved LHS, self-class LHS
  (qualified self-calls aren't super), and any non-'::' form.
- Extended the C++ tree-sitter query to capture the LHS of
  qualified_identifier as @reference.receiver so qualified static
  member calls (Singleton::getInstance()) reach the receiver-bound
  Case 2 (class-name receiver) path. Without the receiver capture,
  qualified calls had no explicit receiver and could not resolve
  through any receiver-bound branch.

Test: cpp-namespace-qualified-not-super fixture. Singleton::getInstance()
from a free function asserts exactly 1 CALLS edge through the
qualified-call path. Passes under both REGISTRY_PRIMARY_CPP=1 and =0.

All 2113 resolver integration tests pass; all 147 cpp tests pass under
both modes.
2026-05-13 15:45:49 +01:00
..
cross-file-binding feat(php): migrate PHP to scope-based resolution model (#938) [supersedes #1124] (#1497) 2026-05-12 16:56:31 +01:00
expo-app feat: add Expo Router file-based route detection (#503) 2026-03-25 11:05:55 +00:00
group fix(group): add configurable cross-link path exclusions to reduce false positives (#1093) 2026-04-28 08:22:14 +01:00
lang-resolution fix(cpp): scope-aware isSuperReceiver classification (U1) 2026-05-13 15:45:49 +01:00
mini-repo/src test: add integration test coverage and fix KuzuDB fork crashes (#209) 2026-03-08 18:00:45 +00:00
orm-repo/src feat: add ORM dataflow detection (Prisma + Supabase) (#511) 2026-03-26 08:48:40 +00:00
pipeline-golden/mini-repo feat(analyze): incremental indexing (parse cache + DB writeback + scope-res short-circuit) (#1479) 2026-05-12 13:14:56 +01:00
python-scope-integration feat(python): scope-based call resolution + registry-primary flip + perf + generalization (RFC #909 Ring 3) (#980) 2026-04-21 15:50:00 +01:00
sample-code feat: add Dart language support (#204) 2026-03-26 08:42:49 +00:00
api-impact-seed.ts feat: deep flow detection — consumer access tracking, middleware chains, error shapes, api_impact tool (#482) 2026-03-23 22:13:48 +00:00
local-backend-seed.ts fix(mcp): project tool_map flows from handlers (#1113) 2026-04-27 17:13:02 +01:00
search-seed.ts test: add integration test coverage and fix KuzuDB fork crashes (#209) 2026-03-08 18:00:45 +00:00