codegraph icon indicating copy to clipboard operation
codegraph copied to clipboard

fix: include anonymous callback and file-read dependents

Open bohe76 opened this issue 6 months ago • 0 comments

Summary

  • walk anonymous function and arrow callback bodies without creating synthetic anonymous symbols, preserving call edges from wrappers such as Deno.serve(async () => handler()) and test callbacks like it(..., async () => run())
  • treat static project file paths passed to file-read APIs such as readFileSync() and Deno.readTextFileSync() as file dependencies so affected can find source-contract tests
  • make MCP subprocess tests wait for child process exit and retry temp directory removal on Windows to avoid EBUSY cleanup failures

Validation

  • npx vitest run __tests__/pr19-improvements.test.ts __tests__/graph.test.ts __tests__/mcp-initialize.test.ts __tests__/mcp-roots.test.ts --minWorkers=1 --maxWorkers=1 --testTimeout=30000 --hookTimeout=30000 --no-file-parallelism
  • npm run build
  • npx vitest run --minWorkers=1 --maxWorkers=1 --testTimeout=30000 --hookTimeout=30000 --no-file-parallelism — 35 passed, 2 skipped; 820 tests passed, 9 skipped
  • smoke-tested against a real TS/Deno project: callers runCrawl, callers confirmPayment, and affected supabase/functions/_shared/payment.ts now return the expected caller/test files

bohe76 avatar May 26 '26 01:05 bohe76