Skip to content

fix(wasm): ast-store-visitor does not extract call-site AST nodes #674

@carlos-alm

Description

@carlos-alm

Deferred from PR #673 review.

Original reviewer comment: #673 (comment)

Problem: The native engine extracts call_expression nodes into ast_nodes with kind = 'call', but the WASM ast-store-visitor.ts does not. The WASM astTypes map in src/ast-analysis/rules/javascript.ts only maps new_expression, throw_statement, await_expression, string, template_string, and regex -- it does not include call_expression: 'call'.

Impact: The build-parity.test.ts ast_nodes assertion cannot run without filtering out call rows, which violates the CLAUDE.md policy against documenting bugs as expected behavior.

Fix: Add call_expression: 'call' to the astTypes map in src/ast-analysis/rules/javascript.ts and update the ast-store-visitor.ts enterNode handler to extract call-site names (function name from call_expression nodes). Then remove the it.skip on the ast_nodes parity test.

Files involved:

  • src/ast-analysis/rules/javascript.ts (add call_expression: 'call')
  • src/ast-analysis/visitors/ast-store-visitor.ts (add call-site name extraction logic)
  • tests/integration/build-parity.test.ts (un-skip the ast_nodes test)

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upDeferred work from PR reviews that needs tracking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions