Skip to content

Conversation

@shivasurya
Copy link
Owner

@shivasurya shivasurya commented Oct 26, 2025

Add foundational data structures for Python call graph construction:

New Types:

  • CallSite: Represents function call locations with arguments and resolution status
  • CallGraph: Maps functions to callees with forward/reverse edges
  • ModuleRegistry: Maps Python file paths to module paths
  • ImportMap: Tracks imports per file for name resolution
  • Location: Source code position tracking
  • Argument: Function call argument metadata

Checklist:

  • Tests passing (gradle testGo)?
  • Lint passing (golangci-lint run this requires golangci-lint)?

Add foundational data structures for Python call graph construction:

New Types:
- CallSite: Represents function call locations with arguments and resolution status
- CallGraph: Maps functions to callees with forward/reverse edges
- ModuleRegistry: Maps Python file paths to module paths
- ImportMap: Tracks imports per file for name resolution
- Location: Source code position tracking
- Argument: Function call argument metadata

Features:
- 100% test coverage with comprehensive unit tests
- Bidirectional call graph edges (forward and reverse)
- Support for ambiguous short names in module registry
- Helper functions for module path manipulation

This establishes the foundation for 3-pass call graph algorithm:
- Pass 1 (next PR): Module registry builder
- Pass 2 (next PR): Import extraction and resolution
- Pass 3 (next PR): Call graph construction

Related: Phase 1 - Call Graph Construction & 3-Pass Algorithm

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@shivasurya shivasurya self-assigned this Oct 26, 2025
@shivasurya shivasurya added enhancement New feature or request python labels Oct 26, 2025
@safedep
Copy link

safedep bot commented Oct 26, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

@codecov
Copy link

codecov bot commented Oct 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.61%. Comparing base (a36e8e9) to head (78cf062).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
+ Coverage   73.03%   73.61%   +0.57%     
==========================================
  Files          23       24       +1     
  Lines        2518     2573      +55     
==========================================
+ Hits         1839     1894      +55     
  Misses        638      638              
  Partials       41       41              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shivasurya shivasurya merged commit 69ad493 into main Oct 29, 2025
5 checks passed
@shivasurya shivasurya deleted the shiva/callgraph-infra-1 branch October 29, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants