Skip to content

bug(parity): native engine emits far fewer dataflow vertices than WASM for JS/TS/pts-javascript fixtures #2483

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 --dataflow --langs javascript,typescript,pts-javascript:

PARITY FAILED — 3/3 fixture(s) diverged: javascript, pts-javascript, typescript
  • pts-javascript: 6 df-vertex diffs (all wasm=1 native=0), e.g. array-from.js:mapCallback|param|item, dispatch-table.js:runDispatch|param|key, spread.js:consumer1|param|x, etc.
  • typescript: 20 df-vertex diffs (all wasm=1 native=0) — params, locals, and returns across barrel-consumer.ts, hierarchy.ts, index.ts, serializer.ts.
  • javascript fixture also diverges (see full run output; truncated here for brevity).

In every case the WASM engine records the dataflow vertex and the native engine does not — this isn't a handful of edge-case misses, it's most params/locals/returns for the affected functions, suggesting the native dataflow-vertex path may not be wired up for these node shapes (or the fixtures use a code pattern the native DataflowRules for JS/TS don't cover, distinct from the already-tracked Dart-specific gaps in #2356/#2357/#2359).

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 --dataflow --langs javascript,typescript,pts-javascript

Note

The script's own usage comment notes --dataflow "requires migration v18" — worth checking whether the test DB in these fixture builds actually has that migration applied, or whether this is a genuine extraction-logic gap in the native DataflowRules for JS/TS.

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