You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output uses two incompatible path conventions:
TSModule.file_path and TSSynthesizedCallable.path are project-relative POSIX paths;
every regular TSCallable.path is the absolute host path returned by ts-morph.
This leaks checkout-specific host information and makes otherwise identical analysis artifacts differ across machines/containers. It also forces consumers to special-case regular versus synthesized callables.
src/syntactic_analysis/builders.ts assigns sigNode.getSourceFile().getFilePath() / filePath directly, while module and synthesized builders normalize through fileKeyOf(...).
Expected behavior
Source identity in the portable artifact should use one project-relative POSIX convention. Absolute paths may be useful in local diagnostics, but should not be serialized as canonical data.
Acceptance criteria
Serialize TSCallable.path using the same project-relative fileKey convention as modules and synthesized callables.
Cover normal functions, methods, accessors, nested callables, and implicit constructors.
Ensure no serialized canonical path starts with the analysis input root.
Add a determinism test that analyzes identical source trees under two different temporary parent directories and compares canonical JSON after excluding timestamps (ideally byte-for-byte if timestamp metadata permits).
Preserve absolute paths only in transient diagnostics if needed.
Problem
The output uses two incompatible path conventions:
TSModule.file_pathandTSSynthesizedCallable.pathare project-relative POSIX paths;TSCallable.pathis the absolute host path returned by ts-morph.This leaks checkout-specific host information and makes otherwise identical analysis artifacts differ across machines/containers. It also forces consumers to special-case regular versus synthesized callables.
Reproduction
In the OWASP Juice Shop
6244c59export:file_pathvalues are relative.Example:
{ "symbol_table": { "app.ts": { "file_path": "app.ts", "functions": { "app.app": { "path": "/Users/.../juice-shop/app.ts" } } } }, "synthesized_callables": { "...": { "path": "server.ts" } } }src/syntactic_analysis/builders.tsassignssigNode.getSourceFile().getFilePath()/filePathdirectly, while module and synthesized builders normalize throughfileKeyOf(...).Expected behavior
Source identity in the portable artifact should use one project-relative POSIX convention. Absolute paths may be useful in local diagnostics, but should not be serialized as canonical data.
Acceptance criteria
TSCallable.pathusing the same project-relativefileKeyconvention as modules and synthesized callables.