-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
follow-upDeferred work from PR reviews that needs trackingDeferred work from PR reviews that needs tracking
Description
Problem
The native engine has a scope bug where it extracts local const variables inside functions as top-level constant nodes, while the WASM engine correctly limits constant extraction to program-level declarations.
This causes a parity divergence between engines in the build-parity test. Currently the test works around this by filtering kind != 'constant' from the comparison queries.
Root Cause
crates/codegraph-core/src/extractors/javascript.rs — the find_parent_of_types guard needs to be tightened so that only program-level constant declarations are extracted.
Expected Behavior
Both engines should produce identical constant-kind nodes for the same input. Once this is fixed:
- Remove the
kind != 'constant'exclusion fromtests/integration/build-parity.test.ts - The parity test should pass without any kind filters
Related
- PR refactor(db): lazy-load better-sqlite3 and remove standalone napi functions (6.17) #673 (where the filter was flagged by review)
- Issue fix(wasm): ast-store-visitor does not extract call-site AST nodes #674 (similar WASM parity gap for
ast_nodescall-site extraction)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
follow-upDeferred work from PR reviews that needs trackingDeferred work from PR reviews that needs tracking