GitNexus/gitnexus/bench/receiver-resolution
Gergo Magyar 36141609a1 fix(scope): fail closed on namespace factory returns the lookup cannot prove
Review follow-up for the namespace factory return lookup (#3498). Each case
below either resolved to the wrong class or crashed; each now types the
receiver correctly or records a receiver-unresolved drop.

- Disk mode: the namespace-name set walked `scopeTree.byId`, which throws
  after the out-of-core seal, so an inline-only `rp.make().m()` partition
  aborted analyze under GITNEXUS_DISK_SCOPE_INDEX=1. It is now built from the
  finalized `scopes.imports` edges, resolved namespace edges only. This also
  removes the run-to-run edge/drop drift the lazy build caused.
- Hoisted method returns: TS and Dart hoist a method's return annotation to
  the module under the method name, and Go binds receiver methods at package
  scope, so `m.create()` could take `WidgetFactory.create(): Widget`. The
  return binding must now start where a module-local `Function` of that name
  is declared.
- `import pkg.sub` binds `pkg` but targets `pkg/sub.py`; such an edge only
  counts when its target file is the module the local name binds.
- A dotted return (`-> models.Order`) is not followed further: the next step
  would read `models` in the caller's namespace map, not the producer's.
- Zig: the `const x = rp.make()` binding decided namespace-vs-file-struct from
  the filename's case and lost `list.push`-style edges on lowercase
  file-structs. That binding form is reverted; the inline form is unaffected.
- Shared-position drops: a site's identity is now `receiver.member`, so
  `rp.untyped().untyped()` records its outer drop while a call and its own
  callee read still count once.

Tests: temp-repo regression rows for each case in the TypeScript, Go and
Python suites, a lowercase file-struct row in Zig, an awaited Dart row (an
awaited Future is not unwrapped yet, so it records a drop), and data-driven
unit cases for recordSiteMember.

Corpus A/B against origin/main: identical CALLS/ACCESSES edges outside the
new fixtures; the drop set outside them is unchanged from the previous head.
Receiver bench: +1 call drop (the awaited Dart row). Dart scope-capture
fingerprint moves for the same fixture row only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:45:32 +00:00
..
baseline.json fix(scope): fail closed on namespace factory returns the lookup cannot prove 2026-10-21 08:45:32 +00:00
BASELINE.md fix(scope): fail closed on namespace factory returns the lookup cannot prove 2026-10-21 08:45:32 +00:00
measure.mjs fix(resolution): resolve Go pointer-receiver calls, and report the program boundary instead of hedging (#2766) (#2782) 2026-08-01 22:42:18 +01:00