From e0b78a37706e476b5200a2e561acec75c8e85e96 Mon Sep 17 00:00:00 2001 From: carlos-alm <127798846+carlos-alm@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:38:58 -0600 Subject: [PATCH] fix(test): remove constant-kind exclusion from parity test (#676) The native engine's find_parent_of_types scope guard was fixed in #649 (added generator_function_declaration and generator_function). Both engines now use identical scope filters for constant extraction, so the kind != 'constant' workaround in the parity test is no longer needed. Closes #676 --- tests/integration/build-parity.test.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/integration/build-parity.test.ts b/tests/integration/build-parity.test.ts index 94f46cfe..f88a31d7 100644 --- a/tests/integration/build-parity.test.ts +++ b/tests/integration/build-parity.test.ts @@ -36,14 +36,8 @@ function copyDirSync(src, dest) { function readGraph(dbPath) { const db = new Database(dbPath, { readonly: true }); - // PARITY BUG (#676): Native engine extracts local `const` variables inside - // functions as top-level constants; WASM correctly limits to program-level. - // Fix: crates/codegraph-core/src/extractors/javascript.rs (find_parent_of_types guard) - // Remove this exclusion once #676 is resolved. const nodes = db - .prepare( - "SELECT name, kind, file, line FROM nodes WHERE kind != 'constant' ORDER BY name, kind, file, line", - ) + .prepare('SELECT name, kind, file, line FROM nodes ORDER BY name, kind, file, line') .all(); const edges = db .prepare(` @@ -51,14 +45,11 @@ function readGraph(dbPath) { FROM edges e JOIN nodes n1 ON e.source_id = n1.id JOIN nodes n2 ON e.target_id = n2.id - WHERE n1.kind != 'constant' AND n2.kind != 'constant' ORDER BY n1.name, n2.name, e.kind `) .all(); const roles = db - .prepare( - "SELECT name, role FROM nodes WHERE role IS NOT NULL AND kind != 'constant' ORDER BY name, role", - ) + .prepare('SELECT name, role FROM nodes WHERE role IS NOT NULL ORDER BY name, role') .all(); // ast_nodes may not exist on older schemas — read if available