Problem
parseFilesWasmForBackfill accepts an opts.symbolsOnly flag that is intended to skip AST/complexity/CFG/dataflow visitors for callers that only consume definitions/calls/typeMap (native post-passes). However, when filePaths.length <= INLINE_BACKFILL_THRESHOLD (16 files), the function falls back to parseFilesWasmInline, which ignores opts.symbolsOnly and always runs full extraction.
This means the symbolsOnly optimization introduced in PR #1436 is a no-op for typical 1-file incremental rebuilds (which are exactly the path the post-pass scoping fix targets).
Impact
Fix
Add an analysis parameter to parseFilesWasmInline and plumb EXTRACT_ONLY through when opts.symbolsOnly is true. This requires modifying the extractor entry points (extractSymbolsQuery/extractSymbolsWalk) to accept and respect an analysis-mode flag, skipping their AST/complexity/CFG/dataflow sub-walks.
Deferred from PR #1436 review (Greptile P2, Claude flagged as non-blocking).
Problem
parseFilesWasmForBackfillaccepts anopts.symbolsOnlyflag that is intended to skip AST/complexity/CFG/dataflow visitors for callers that only consume definitions/calls/typeMap (native post-passes). However, whenfilePaths.length <= INLINE_BACKFILL_THRESHOLD(16 files), the function falls back toparseFilesWasmInline, which ignoresopts.symbolsOnlyand always runs full extraction.This means the
symbolsOnlyoptimization introduced in PR #1436 is a no-op for typical 1-file incremental rebuilds (which are exactly the path the post-pass scoping fix targets).Impact
symbolsOnlyFix
Add an
analysisparameter toparseFilesWasmInlineand plumbEXTRACT_ONLYthrough whenopts.symbolsOnlyis true. This requires modifying the extractor entry points (extractSymbolsQuery/extractSymbolsWalk) to accept and respect an analysis-mode flag, skipping their AST/complexity/CFG/dataflow sub-walks.Deferred from PR #1436 review (Greptile P2, Claude flagged as non-blocking).