Summary
When the Rust native engine extracts prototype-based method definitions (via match_js_prototype_methods / emit_js_prototype_method in javascript.rs), the resulting Definition struct has complexity: None and cfg: None. Every other method/function definition in the Rust extractor calls compute_all_metrics and build_function_cfg.
This means codegraph complexity will silently produce null metrics for pre-ES6 prototype-defined methods in the native engine, while the WASM engine also doesn't compute complexity inline but downstream metrics may differ.
Location
crates/codegraph-core/src/extractors/javascript.rs — emit_js_prototype_method function (lines ~364-374)
Fix
Call compute_all_metrics and build_function_cfg on the RHS function node when emitting prototype method definitions, consistent with how other method definitions are handled.
Context
Identified during PR #1339 review (Claude code review). The PR itself is parity-correct for call-edge resolution; this is a secondary complexity-metrics gap that should be addressed separately.
Summary
When the Rust native engine extracts prototype-based method definitions (via
match_js_prototype_methods/emit_js_prototype_methodinjavascript.rs), the resultingDefinitionstruct hascomplexity: Noneandcfg: None. Every other method/function definition in the Rust extractor callscompute_all_metricsandbuild_function_cfg.This means
codegraph complexitywill silently produce null metrics for pre-ES6 prototype-defined methods in the native engine, while the WASM engine also doesn't compute complexity inline but downstream metrics may differ.Location
crates/codegraph-core/src/extractors/javascript.rs—emit_js_prototype_methodfunction (lines ~364-374)Fix
Call
compute_all_metricsandbuild_function_cfgon the RHS function node when emitting prototype method definitions, consistent with how other method definitions are handled.Context
Identified during PR #1339 review (Claude code review). The PR itself is parity-correct for call-edge resolution; this is a secondary complexity-metrics gap that should be addressed separately.