Skip to content

feat: add generic affected and re-export support - #740

Closed
TheFedaikin wants to merge 3 commits into
Graphify-Labs:v7from
TheFedaikin:v7
Closed

feat: add generic affected and re-export support#740
TheFedaikin wants to merge 3 commits into
Graphify-Labs:v7from
TheFedaikin:v7

Conversation

@TheFedaikin

@TheFedaikin TheFedaikin commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a graph-level foundation for more reliable cross-language impact traversal:

  • Stabilizes local source identity/import resolution before query-time traversal.
  • Adds generic symbol-resolution facts for imports, re-exports, aliases, and local uses.
  • Ports JS/TS barrel re-export handling onto that generic layer.
  • Adds Python package re-export support.
  • Adds a minimal graphify affected CLI over graph.json.

Why

Large codebases often route symbols through barrels, package entrypoints, aliases, or repeated file names. Without resolving those edges to the original symbol, query and impact output is noisy or incomplete.

This PR improves that without changing storage.

What Changed

  • Resolves TS/Svelte local imports, directory index.*, .svelte.ts, tsconfig aliases, and workspace package imports.
  • Emits re_exports edges with context="export".
  • Resolves imports through JS/TS barrels to the original symbol.
  • Resolves Python __init__.py package re-exports to the original symbol.
  • Adds direct local calls edges for imported bindings when usage is import-aware.
  • Disambiguates duplicate node IDs by source path.
  • Rewires unique unresolved stubs to real definitions when safe.
  • Adds graphify affected <node-or-label> with --relation, --depth, and --graph.

Related

Related to #569 and the broader source-resolution/import-noise issues around large workspaces and ambiguous traversal.

Test Plan

uv run --with pytest python -m pytest tests/ -q --tb=short

Result:

685 passed, 6 skipped in 5.55s

Also refreshed the graph:

graphify update .

Result:

5301 nodes, 8914 edges, 659 communities

@TheFedaikin

Copy link
Copy Markdown
Contributor Author

@safishamsi fixed all of the tests and conflicts on my branch so it's easier to merge.

@TheFedaikin

Copy link
Copy Markdown
Contributor Author

closed in favor of #953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant