Follow-up to #2243. Thanks for the 0.9.29 fix (#2250), it cleaned up the C# case. TypeScript still leaks, in a slightly different spot.
What happens
In a TypeScript graph, a large number of links entries have a source that is an absolute-scan-path-derived slug rather than a real node id. The slug is the scan path lowercased with every run of non-alphanumerics collapsed to _, followed by the file's repo-relative path and the function name, for example abs_scan_path_slug_packages_account_src_components_paymentmethods_prepaybalancecontainer_invoicebalancesubsection. The target of the same edge is a clean scope-relative id (packages_account_src_settings_basesettingssection_constructrowwithid).
Two things about the leaked source:
C# vs TypeScript in the same version
Same repo, same graphify 0.9.29, two scopes:
- C# scope, 79,336 nodes: 0 absolute-path slug endpoints.
- TypeScript scope, 74,271 nodes / 165,872 edges: 7,143 absolute-path slug endpoints.
So the 0.9.29 relativization landed for the C# extractor but not the TypeScript one.
Why it matters
The slug is derived from the absolute scan path, so the same source tree built on two machines (or two checkout paths) produces different graph.json files. We commit graphs to git, so every rebuild on a different path shows a spurious diff, and the underlying non-determinism is general. Same reproducibility and cross-machine caching problem as #2243.
Repro
It shows up in a TypeScript monorepo (a packages/* layout with cross-package imports). A minimal two-file TS project does not trigger it, and neither does a class with arrow-property handlers calling across two files, so it correlates with the larger structure rather than a single syntactic form. The leaked callers are handler-style functions (invoicebalancesubsection, handletabclick, handleapply) whose containing symbol does not appear in nodes. Happy to share a fuller extract from the affected graph if useful.
Suggested fix
Apply the same relativization as #2243/#1899 to the TypeScript extractor's edge-source identifiers, and/or materialize the caller node so the edge references a real scope-relative id instead of an absolute path.
Follow-up to #2243. Thanks for the 0.9.29 fix (#2250), it cleaned up the C# case. TypeScript still leaks, in a slightly different spot.
What happens
In a TypeScript graph, a large number of
linksentries have asourcethat is an absolute-scan-path-derived slug rather than a real node id. The slug is the scan path lowercased with every run of non-alphanumerics collapsed to_, followed by the file's repo-relative path and the function name, for exampleabs_scan_path_slug_packages_account_src_components_paymentmethods_prepaybalancecontainer_invoicebalancesubsection. Thetargetof the same edge is a clean scope-relative id (packages_account_src_settings_basesettingssection_constructrowwithid).Two things about the leaked source:
nodesentirely, so this is not only the id-relativization gap from 0.9.28: machine-slug node-ids still leak into links endpoints (residual of #1899, now in edges not nodes) #2243. The extractor is emitting acallsedge for a caller it never materialized as a node, and identifying that caller by absolute path.callsedges (the caller), not the target.C# vs TypeScript in the same version
Same repo, same graphify 0.9.29, two scopes:
So the 0.9.29 relativization landed for the C# extractor but not the TypeScript one.
Why it matters
The slug is derived from the absolute scan path, so the same source tree built on two machines (or two checkout paths) produces different
graph.jsonfiles. We commit graphs to git, so every rebuild on a different path shows a spurious diff, and the underlying non-determinism is general. Same reproducibility and cross-machine caching problem as #2243.Repro
It shows up in a TypeScript monorepo (a
packages/*layout with cross-package imports). A minimal two-file TS project does not trigger it, and neither does a class with arrow-property handlers calling across two files, so it correlates with the larger structure rather than a single syntactic form. The leaked callers are handler-style functions (invoicebalancesubsection,handletabclick,handleapply) whose containing symbol does not appear innodes. Happy to share a fuller extract from the affected graph if useful.Suggested fix
Apply the same relativization as #2243/#1899 to the TypeScript extractor's edge-source identifiers, and/or materialize the caller node so the edge references a real scope-relative id instead of an absolute path.