Fix #648: Wire TsconfigResolver in CLI commands#675
Conversation
|
✅ Health: 7.6 (unchanged)
🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)
🔥 Hotspots touched (5)
2 more
🔗 Hidden coupling (2 files)
💀 Dead code (1 finding)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-03 20:27 UTC |
|
The The blocker is the third site. A test that invokes the workspace path would catch this. The current regression test only exercises the helper on its own. Once that's fixed and green, this is ready. |
Summary
This PR fixes the false-positive
unreachable_filereports for TS/JS projects using path aliases (like@/components) in CLI commands.The root cause was that
TsconfigResolverwas only being wired up during the pipeline ingestion phase. Any CLI command that rebuilt the graph in-memory without this phase (such asdead-code,health, andworkspace) would fail to resolve aliases, leaving valid targets within_degree=0.Changes:
wire_tsconfig_resolverhelper function inrepowise.core.ingestion.tsconfig_resolver.repowise/core/pipeline/phases/ingestion.pyto use the shared helper.graph_builder.build()indead_code_cmd.py,health_cmd.py, andworkspace_cmd.py.Related Issues
Fixes #648
Test Plan
pytest)ruff check .)npm run build) (if frontend changes)Added a dedicated regression test (
test_tsconfig_cli_repro.py) that mimics the CLI command's in-memory graph rebuild with a mock@/*alias to ensure it properly connects to its target and suppresses the false unreachability finding.Checklist