GitNexus/gitnexus/bench/receiver-resolution/baseline.json
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

238 lines
6.7 KiB
JSON

{
"shapeArm": {
"vue": {
"plainChain": "N/A",
"plainDeepChain": "N/A",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "N/A",
"indexElement": "N/A",
"fieldReceiverCall": "N/A",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "N/A"
},
"cobol": {
"plainChain": "N/A",
"plainDeepChain": "N/A",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "N/A",
"indexElement": "N/A",
"fieldReceiverCall": "N/A",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "N/A"
},
"typescript": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "RESOLVES",
"nonNullAssert": "RESOLVES",
"awaitParen": "RESOLVES",
"explicitTypeArgs": "RESOLVES",
"indexElement": "RESOLVES",
"fourHopChain": "RESOLVES",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
},
"php": {
"arrowCallChain": "VISIBLE-GAP",
"arrowPropertyPath": "RESOLVES",
"plainChain": "RESOLVES",
"plainDeepChain": "VISIBLE-GAP",
"optionalChain": "VISIBLE-GAP",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "N/A",
"indexElement": "VISIBLE-GAP",
"fieldReceiverCall": "N/A",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
},
"cpp": {
"pointerArrowChain": "RESOLVES",
"valueDotChain": "RESOLVES",
"plainChain": "N/A",
"plainDeepChain": "RESOLVES",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "VISIBLE-GAP",
"indexElement": "RESOLVES",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
},
"go": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "N/A",
"indexElement": "RESOLVES",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "RESOLVES",
"decoratedFieldType": "RESOLVES"
},
"javascript": {
"plainChain": "VISIBLE-GAP",
"plainDeepChain": "VISIBLE-GAP",
"optionalChain": "VISIBLE-GAP",
"nonNullAssert": "N/A",
"awaitParen": "VISIBLE-GAP",
"explicitTypeArgs": "N/A",
"indexElement": "VISIBLE-GAP",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "N/A"
},
"python": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "RESOLVES",
"explicitTypeArgs": "N/A",
"indexElement": "RESOLVES",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
},
"java": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "RESOLVES",
"indexElement": "VISIBLE-GAP",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "N/A"
},
"csharp": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "VISIBLE-GAP",
"nonNullAssert": "VISIBLE-GAP",
"awaitParen": "RESOLVES",
"explicitTypeArgs": "VISIBLE-GAP",
"indexElement": "VISIBLE-GAP",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "VISIBLE-GAP"
},
"ruby": {
"plainChain": "VISIBLE-GAP",
"plainDeepChain": "VISIBLE-GAP",
"optionalChain": "VISIBLE-GAP",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "N/A",
"indexElement": "INVISIBLE-GAP",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "N/A"
},
"rust": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "VISIBLE-GAP",
"indexElement": "RESOLVES",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "RESOLVES",
"decoratedFieldType": "VISIBLE-GAP"
},
"c": {
"plainChain": "N/A",
"plainDeepChain": "VISIBLE-GAP",
"optionalChain": "N/A",
"nonNullAssert": "N/A",
"awaitParen": "N/A",
"explicitTypeArgs": "N/A",
"indexElement": "VISIBLE-GAP",
"fieldReceiverCall": "INVISIBLE-GAP",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "N/A"
},
"kotlin": {
"plainChain": "RESOLVES",
"plainDeepChain": "RESOLVES",
"optionalChain": "RESOLVES",
"nonNullAssert": "RESOLVES",
"awaitParen": "RESOLVES",
"explicitTypeArgs": "RESOLVES",
"indexElement": "RESOLVES",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
},
"swift": {
"plainChain": "VISIBLE-GAP",
"plainDeepChain": "VISIBLE-GAP",
"optionalChain": "VISIBLE-GAP",
"nonNullAssert": "VISIBLE-GAP",
"awaitParen": "VISIBLE-GAP",
"explicitTypeArgs": "N/A",
"indexElement": "INVISIBLE-GAP",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
},
"dart": {
"plainChain": "VISIBLE-GAP",
"plainDeepChain": "VISIBLE-GAP",
"optionalChain": "VISIBLE-GAP",
"nonNullAssert": "VISIBLE-GAP",
"awaitParen": "RESOLVES",
"explicitTypeArgs": "N/A",
"indexElement": "INVISIBLE-GAP",
"fieldReceiverCall": "RESOLVES",
"decoratedReceiverBase": "N/A",
"decoratedFieldType": "RESOLVES"
}
},
"countArm": {
"callDrops": 153,
"totalDropsAllKinds": 221,
"bySiteKind": {
"call": 153,
"read": 48,
"write": 20
},
"callDropsByExtension": {
".java": 49,
".py": 24,
".go": 19,
".ts": 17,
".zig": 13,
".cs": 8,
".tsx": 6,
".php": 4,
".rs": 4,
".kt": 4,
".js": 2,
".dart": 2,
".swift": 1
},
"callDropsByShape": {
"chain-field": 73,
"no-chain": 34,
"chain-call": 32,
"<<unclassified>>": 11,
"chain-mixed": 2,
"chain-unwrap": 1
},
"callDropsByOrigin": {
"in-program": 77,
"external": 44,
"unknown": 32
}
}
}