Problem
When ingesting from the repo root, Python import names (cgis.*) don't match the file-path FQNs (src.cgis.*). This produces ~2853 phantom unresolved cross-island edges because the resolver can't match raw_call:cgis.foo to the node src.cgis.foo.
Solution
Add --source-root / -s (repeatable) to cgis ingest. The pipeline builds FQNs relative to the nearest source root instead of CWD.
Implementation sketch
IngestionPipeline.__init__ gets source_roots: list[str] | None = None
file_path_to_module_fqn(path, source_root) — compute relative to source_root
- CLI:
--source-root / -s with Multiple=True in cgis ingest
- Multiple roots → independent sub-graphs in one DB/JSON without FQN collisions (e.g.
--source-root src --source-root ui/src)
Test cases
# FQN should be cgis.* not src.cgis.*
uv run cgis ingest . --source-root src --output graph.json
# Two independent sub-graphs without collisions
uv run cgis ingest . --source-root src --source-root ui/src --output graph.json
Unit test: ingest src/cgis with source_root="src" → node IDs start with cgis., without it → src.cgis..
Problem
When ingesting from the repo root, Python import names (
cgis.*) don't match the file-path FQNs (src.cgis.*). This produces ~2853 phantom unresolved cross-island edges because the resolver can't matchraw_call:cgis.footo the nodesrc.cgis.foo.Solution
Add
--source-root / -s(repeatable) tocgis ingest. The pipeline builds FQNs relative to the nearest source root instead of CWD.Implementation sketch
IngestionPipeline.__init__getssource_roots: list[str] | None = Nonefile_path_to_module_fqn(path, source_root)— compute relative to source_root--source-root / -swithMultiple=Trueincgis ingest--source-root src --source-root ui/src)Test cases
Unit test: ingest
src/cgiswithsource_root="src"→ node IDs start withcgis., without it →src.cgis..