refactor(native): remove call kind from AST node extraction#734
refactor(native): remove call kind from AST node extraction#734carlos-alm merged 4 commits intomainfrom
Conversation
Call sites are already captured in FileSymbols.calls during extraction and stored as graph edges. The call entries in ast_nodes were written but never queried by any command or feature — dead data that the JS side had to filter out for engine parity. Rust: - Remove call_types from LangAstConfig and all 19 per-language configs - Remove call extraction block from walk_ast_nodes_with_config_depth - Remove call_expression match arm from JS walk_ast_nodes_depth - Remove extract_js_call_ast and extract_call_receiver helpers TypeScript: - Remove call_expression:'call' from JS/TS astTypes map - Remove call handling from ast-store-visitor (extractCallName, extractCallReceiver, walkCallArguments, walkSubtree, findChildByKind) - Remove 'call' from ASTNodeKind type and AST_NODE_KINDS Closes #701
|
Claude finished @carlos-alm's task —— View job Review Complete ✅I've conducted a thorough review of this PR following the 5-phase methodology: Todo List
Phase 1: Root Cause Analysis ✅Problem Being Solved: Removing dead code - specifically AST node extraction for Evidence:
Why This Approach: Clean removal of unused functionality across both engines (native Rust + WASM) maintains consistency and reduces maintenance burden. Phase 2: Configuration Change Detection ✅No configuration rule relaxations found. The changes are pure code removals:
Phase 3: Test Integrity Verification ✅Tests properly updated, not weakened:
This is exactly the right approach - tests verify the new behavior rather than just accepting lower standards. Phase 4: Code Quality Review ✅Excellent systematic removal:
No security concerns, no performance regressions. The removal is clean and complete. Phase 5: Backlog Compliance Assessment ✅Zero-dep: ✓ (removes code, adds no dependencies) Root Cause AnalysisProblem Being Solved: Dead code removal - AST Backlog Compliance
Critical ConcernsNone. This is exemplary dead code removal. Final Recommendation
|
Greptile SummaryThis PR removes the Key changes:
Confidence Score: 5/5Safe to merge — pure dead-code removal with no behavioral change to any live feature. All changes are strictly subtractive, no existing query or command consumed No files require special attention. The transitional guards in Important Files Changed
Reviews (2): Last reviewed commit: "fix: accept call kind transitionally in ..." | Re-trigger Greptile |
|
Fixed in 86c3ae5 — updated both the command description (line 7) and Also fixed the CI failures: the tests were asserting no |
Summary
callAST node extraction from native Rust engine —call_typesfield removed fromLangAstConfigstruct and all 19 per-language configs, call extraction block removed fromwalk_ast_nodes_with_config_depthand JS-specificwalk_ast_nodes_depthcallAST node extraction from WASM visitor —call_expression: 'call'removed fromastTypes, all call-specific helpers (extractCallName,extractCallReceiver,walkCallArguments,walkSubtree,findChildByKind) removed fromast-store-visitor.ts'call'fromASTNodeKindtype andAST_NODE_KINDSconstantCall sites are already captured in
FileSymbols.callsduring extraction and stored as graph edges. Thecallentries inast_nodeswere written but never queried by any command or feature.Net: −344 lines of dead code.
Closes #701
Test plan
tsc --noEmit)