Summary
Between graphifyy 0.9.13 and 0.9.16, the source_file field on nodes changed from a path relative to the scan root to a bare filename (basename only) — for every node, not just the cases mentioned in the release notes. This removes the only field that carried the file's directory, so a graph.json can no longer be resolved back to files on disk by joining source_file onto the scan/code root.
I'm not sure whether this is intended. The 0.9.14/0.9.16 notes describe making paths portable/relative for narrow cases (VS solution-folder nodes → "now relative"; out-of-root reference targets and degenerate symbols → "now portable"), but a relative path is already free of absolute-path/username leaks, so the wholesale reduction to basename seems to go beyond what's documented. Hence this report/question.
Environment
graphifyy 0.9.13 (baseline) vs 0.9.16 (observed change)
- Windows 11, Python 3.14
- Language: C# (nodes are
_origin: ast, so this is AST-derived and independent of the semantic backend)
Steps to reproduce
- Extract any C# tree that has files in nested subdirectories:
graphify extract <ROOT> --out <OUT>
- Inspect
source_file on the nodes in the resulting graph.json.
- Compare the same extraction under 0.9.13 and 0.9.16.
Expected
source_file is a path relative to the scan root (as in 0.9.13), e.g. keeping the subdirectory so the file is locatable via <root>/<source_file>.
Actual
source_file is the bare filename only; the directory component is gone.
Same file, both versions (example):
| version |
source_file |
| 0.9.13 |
src/Data/Database/RepositoryTests/OrderRepositoryTests.cs |
| 0.9.16 |
OrderRepositoryTests.cs |
Aggregate over one representative graph (~120k source_file occurrences):
| version |
with a path separator (/) |
basename only |
| 0.9.13 |
117,897 |
7,335 |
| 0.9.16 |
0 |
119,341 |
No other field carries the path in 0.9.16. Node keys are [id, label, source_file, source_location, file_type, community, norm_label, type, metadata]; source_location is a line only (e.g. "L14"), and a scan of every string value on every node finds 0 nodes containing a directory separator in any .cs-bearing value.
The full directory does survive, but only slugified and lossy, inside the type node id, e.g.:
id = c_..._src_data_database_repositorytests_orderrepositorytests_...
i.e. lowercased with ., /, \, -, spaces all collapsed to _ (and truncated). Because those distinct characters all map to _, this can't be reversed to a filesystem path reliably.
Impact
Any downstream tooling that resolves nodes back to source by joining source_file onto the scan/code root breaks: 0% of files resolve after the change. The lossy id slug is not a viable substitute.
Questions
- Is the basename-only
source_file for in-root files intended, or an over-broad side effect of the out-of-root / degenerate-symbol leak fixes?
- If intended: is there (or could there be) a field carrying the portable relative path (as the 0.9.14 "now relative" direction suggests), so a
graph.json remains resolvable against its root without parsing the id slug?
Summary
Between
graphifyy0.9.13 and 0.9.16, thesource_filefield on nodes changed from a path relative to the scan root to a bare filename (basename only) — for every node, not just the cases mentioned in the release notes. This removes the only field that carried the file's directory, so agraph.jsoncan no longer be resolved back to files on disk by joiningsource_fileonto the scan/code root.I'm not sure whether this is intended. The 0.9.14/0.9.16 notes describe making paths portable/relative for narrow cases (VS solution-folder nodes → "now relative"; out-of-root reference targets and degenerate symbols → "now portable"), but a relative path is already free of absolute-path/username leaks, so the wholesale reduction to basename seems to go beyond what's documented. Hence this report/question.
Environment
graphifyy0.9.13 (baseline) vs 0.9.16 (observed change)_origin: ast, so this is AST-derived and independent of the semantic backend)Steps to reproduce
graphify extract <ROOT> --out <OUT>source_fileon the nodes in the resultinggraph.json.Expected
source_fileis a path relative to the scan root (as in 0.9.13), e.g. keeping the subdirectory so the file is locatable via<root>/<source_file>.Actual
source_fileis the bare filename only; the directory component is gone.Same file, both versions (example):
source_filesrc/Data/Database/RepositoryTests/OrderRepositoryTests.csOrderRepositoryTests.csAggregate over one representative graph (~120k
source_fileoccurrences):/)No other field carries the path in 0.9.16. Node keys are
[id, label, source_file, source_location, file_type, community, norm_label, type, metadata];source_locationis a line only (e.g."L14"), and a scan of every string value on every node finds 0 nodes containing a directory separator in any.cs-bearing value.The full directory does survive, but only slugified and lossy, inside the type node
id, e.g.:i.e. lowercased with
.,/,\,-, spaces all collapsed to_(and truncated). Because those distinct characters all map to_, this can't be reversed to a filesystem path reliably.Impact
Any downstream tooling that resolves nodes back to source by joining
source_fileonto the scan/code root breaks: 0% of files resolve after the change. The lossyidslug is not a viable substitute.Questions
source_filefor in-root files intended, or an over-broad side effect of the out-of-root / degenerate-symbol leak fixes?graph.jsonremains resolvable against its root without parsing theidslug?