Skip to content

fix(extraction): retain nested call evidence without guessed targets - #1844

Open
bompus wants to merge 1 commit into
colbymchenry:mainfrom
bompus:fix/upstream-nested-call-evidence
Open

fix(extraction): retain nested call evidence without guessed targets#1844
bompus wants to merge 1 commit into
colbymchenry:mainfrom
bompus:fix/upstream-nested-call-evidence

Conversation

@bompus

@bompus bompus commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

#1790 stopped Map.get / set / has from resolving to unrelated project methods by dropping nested identifier calls entirely. That also removed call-site evidence Steps and framework resolution need, so chains such as holder.values.get(readKey()) kept the argument call but lost the nested member.

This change keeps the full nested receiver text, including optional access, computed keys, and comments. Framework resolvers can still bind a proven target. Generic import and last-name matching will not treat an imported root or an unrelated get as the called member. Simple new Map() receivers still stay off project methods, and a project class that legitimately shadows Map still resolves. Rebuild existing indexes after this lands (extraction version 26 → 27).

Fixes #1794.
Related: #1566, #1790.

Validation

Based on upstream 3ed73bc127323e63153bf6ec8354afa82ce36aaf; head 95dccf90 contains only this fix and its tests.

  • Exact PR branch, WSL/Linux, Node 24.21.0: native kernel build succeeded (existing compiler warnings only). 239 tests passed across kernel-tsjs-parity, resolution, and ts-chained-receiver with CODEGRAPH_KERNEL_EXPECT=1 and one worker. The same resolution and ts-chained-receiver suites passed 218 tests with CODEGRAPH_KERNEL=0. TypeScript compilation and diff whitespace checks passed. check:agent-docs is a fork-only script and was not run on this branch.
  • Deployed downstream integration 61f73f20, including this behavior and other fork changes: 4,778 native tests and 4,776 WASM tests passed, zero failures; all five downstream source probes passed. Those are integration results, not a full-suite run of this exact PR branch.
  • Windows and the viewer build were not tested for this PR.

Keep JS/TS nested call-site text for Steps and framework resolution, and refuse last-name guesses that bound Map.get/set/has to unrelated project methods.
bompus added a commit to bompus/codegraph that referenced this pull request Sep 11, 2026
…field Rust sketch (#16)

Three linked design docs recording the 2026-09-11 assessment of a Rust
rewrite against the fork's PR history, the espn-draft retrieval research
and the query audit log:

- kernel-only-extraction-plan.md: remove the WASM path; phases for the
  error-recovery flip, SFC extractors calling the kernel, a parse-tree
  service for the three read-time consumers, tail-language port/drop
  decisions, and golden dumps replacing the parity oracle.
- resolution-binding-model-plan.md: a per-file bindings table emitted by
  extraction replaces the five regex families that answer export and
  binding status (colbymchenry#1721) and ends the colbymchenry#1566/colbymchenry#1790/colbymchenry#1794/colbymchenry#1844 cycle.
- greenfield-rust-core-sketch.md: what a from-scratch core must
  reproduce, what it would buy and cost, and why it is deferred behind
  the two incremental plans.
bompus added a commit to bompus/codegraph that referenced this pull request Sep 12, 2026
…ution

Phase 0 of docs/design/resolution-binding-model-plan.md.

The evaluation runner scored recall only, so a wrong edge — the thing
the resolution PR chain (colbymchenry#1713, colbymchenry#1718, colbymchenry#1746, colbymchenry#1844) exists to remove —
was invisible to it. scoring.ts gains scoreEdgeCase: an EdgeCase names
a kind, a target endpoint (file suffix + symbol) and optionally a source,
and expects the edge absent (known-wrong) or present (control).
evaluation-edge-scoring.test.ts pins it on a synthetic project with the
bare-import and sealed-module shapes and proves it flags a violated case
and a missing endpoint.

edge-cases.ts encodes the edges the PR bodies named on the commits they
measured (full SHAs): vite 8492422b (colbymchenry#1713 self-import + getEnv, colbymchenry#1718
two fuzzy nested calls, colbymchenry#1746 sealed defineConfig -> test-stacktrace.js
vite, one relative-import control), vitest 7c818153 (evaluatedModules),
svelte 5895c637 (bundle). npm run eval:precision -- <corpus> fetches the
pinned commit, indexes, scores, prints the resolved-edge histogram by
resolver (the LOST/GAINED methodology) and writes a report; the three
baseline reports at codegraph 1498c2f are committed:
vite 28,893 edges / fuzzy 16, vitest 75,035 / 28, svelte 70,432 / 159;
every absent case held, the control held.
bompus added a commit to bompus/codegraph that referenced this pull request Sep 12, 2026
…ution (#27)

Phase 0 of docs/design/resolution-binding-model-plan.md.

The evaluation runner scored recall only, so a wrong edge — the thing
the resolution PR chain (colbymchenry#1713, colbymchenry#1718, colbymchenry#1746, colbymchenry#1844) exists to remove —
was invisible to it. scoring.ts gains scoreEdgeCase: an EdgeCase names
a kind, a target endpoint (file suffix + symbol) and optionally a source,
and expects the edge absent (known-wrong) or present (control).
evaluation-edge-scoring.test.ts pins it on a synthetic project with the
bare-import and sealed-module shapes and proves it flags a violated case
and a missing endpoint.

edge-cases.ts encodes the edges the PR bodies named on the commits they
measured (full SHAs): vite 8492422b (colbymchenry#1713 self-import + getEnv, colbymchenry#1718
two fuzzy nested calls, colbymchenry#1746 sealed defineConfig -> test-stacktrace.js
vite, one relative-import control), vitest 7c818153 (evaluatedModules),
svelte 5895c637 (bundle). npm run eval:precision -- <corpus> fetches the
pinned commit, indexes, scores, prints the resolved-edge histogram by
resolver (the LOST/GAINED methodology) and writes a report; the three
baseline reports at codegraph 1498c2f are committed:
vite 28,893 edges / fuzzy 16, vitest 75,035 / 28, svelte 70,432 / 159;
every absent case held, the control held.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#1790 drops every identifier-rooted member call, not just built-in collections — 8 tests red on main

1 participant