Skip to content

bug(parity): jelly-micro bind.js/fun.js self-referential dynamic call edge missing on native engine #2482

Description

@carlos-alm

Found while working on

#2326 (cargo clippy CI gate). Not caused by that change — reproduces identically on a clean origin/main checkout with no modifications, confirmed by building the native addon from origin/main in an isolated worktree and re-running the same check.

Divergence

node scripts/parity-compare.mjs --langs jelly-micro --hybrid:

=== jelly-micro: wasm vs native DIVERGED (0 node diffs, 2 edge diffs)
  [edge] [calls] bind/bind.js:f(constant) -> bind/bind.js:bind/bind.js(file) conf=0 dyn=1 technique=null  wasm=1 native=0
  [edge] [calls] fun/fun.js:fun/fun.js(file) -> fun/fun.js:fun/fun.js(file) conf=0 dyn=1 technique=null  wasm=1 native=0
=== jelly-micro: wasm vs hybrid DIVERGED (0 node diffs, 2 edge diffs)
  [edge] [calls] bind/bind.js:f(constant) -> bind/bind.js:bind/bind.js(file) conf=0 dyn=1 technique=null  wasm=1 hybrid=0
  [edge] [calls] fun/fun.js:fun/fun.js(file) -> fun/fun.js:fun/fun.js(file) conf=0 dyn=1 technique=null  wasm=1 hybrid=0

Both diffs are self-referential, dyn=1, conf=0, technique=null edges that the WASM engine emits but the Rust native engine (and the hybrid native-buildCallEdges path) do not.

Note

Related but distinct from #1687 (closed) — that issue's divergence targeted arguments/arguments.js:f(function) with conf=0.5; this one is a self-referential file-level edge with conf=0 in the same fixture files (bind/bind.js, fun/fun.js). Either #1687's fix didn't cover this case, or this is a fresh regression in the same area.

Repro

npm run build
cd crates/codegraph-core && npx napi build --platform --release && codesign --sign - --force codegraph-core.darwin-arm64.node && cp codegraph-core.darwin-arm64.node ../../node_modules/@optave/codegraph-darwin-arm64/codegraph-core.node
cd ../..
node scripts/parity-compare.mjs --langs jelly-micro --hybrid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions