Describe the bug
TypeScriptAnalysis carries three accessors that PythonAnalysis gained scoping keywords for and
TypeScript never did. On a large application the unscoped call is the only call available, and it
is the expensive one:
| accessor |
PythonAnalysis |
TypeScriptAnalysis |
get_call_graph |
(*, roots=None, depth=None) |
() |
get_classes |
(*, module=None) |
() |
get_symbol_table |
(*, paths=None) |
() |
docs/agent-api-reference.md records the Python cost of the unscoped forms (12s / 10s / 12s on
odoo; get_call_graph() alone is 364,752 edges) precisely because the scoped form is the one an
agent should reach for. A TypeScript caller has no scoped form.
Expected behavior
The three take the same keyword-only optionals PythonAnalysis takes, with the same names,
defaults and semantics, on both the local and the Neo4j backend. roots=/depth= scope the call
graph; module= scopes the class map to one module key; paths= scopes the symbol table.
Additional context
Leg 2.5b (#343) recorded all five entries of
tests/analysis/typescript/test_typescript_public_surface.py's
KNOWN_ARGUMENT_DIVERGENCES as "a pre-existing 1.x-era gap rather than this leg's". True of
origin, but not of scope: these three are open scope items against the leg's own definition of
done (parity of the shared surface), and adding a keyword-only optional with a default would not
have touched the Iron Rule that no existing signature moves. The ledger comment now names them as
open scope pointing here; the two remaining entries (get_callers / get_callees, which keep
TypeScript's optional method argument) are genuinely benign and stay recorded as such.
CAVEATS
- Adding an optional keyword is not a break, but the default must stay the unscoped answer —
every existing TypeScript caller passes nothing today.
- Both backends must gain it together, or the divergence moves from "TypeScript vs Python" to
"TypeScript-local vs TypeScript-Neo4j", which is worse.
get_call_graph's roots=/depth= on TypeScript must decide what a module caller means at
a root (TS-11 keeps module callers where Python drops them); that is a design question, not a
mechanical port.
DEFINITION OF DONE
- The three signatures match
PythonAnalysis's exactly, on the facade and both backends.
KNOWN_ARGUMENT_DIVERGENCES in tests/analysis/typescript/test_typescript_public_surface.py is
down to get_callers / get_callees, deleted from rather than muted — the ledger's own
test_a_recorded_divergence_is_still_a_divergence forces that.
- A scoped call is measurably cheaper than the unscoped one on the reference graph, with the number
recorded the way the Python ones are in docs/agent-api-reference.md.
Describe the bug
TypeScriptAnalysiscarries three accessors thatPythonAnalysisgained scoping keywords for andTypeScript never did. On a large application the unscoped call is the only call available, and it
is the expensive one:
PythonAnalysisTypeScriptAnalysisget_call_graph(*, roots=None, depth=None)()get_classes(*, module=None)()get_symbol_table(*, paths=None)()docs/agent-api-reference.mdrecords the Python cost of the unscoped forms (12s / 10s / 12s onodoo;
get_call_graph()alone is 364,752 edges) precisely because the scoped form is the one anagent should reach for. A TypeScript caller has no scoped form.
Expected behavior
The three take the same keyword-only optionals
PythonAnalysistakes, with the same names,defaults and semantics, on both the local and the Neo4j backend.
roots=/depth=scope the callgraph;
module=scopes the class map to one module key;paths=scopes the symbol table.Additional context
Leg 2.5b (#343) recorded all five entries of
tests/analysis/typescript/test_typescript_public_surface.py'sKNOWN_ARGUMENT_DIVERGENCESas "a pre-existing 1.x-era gap rather than this leg's". True oforigin, but not of scope: these three are open scope items against the leg's own definition of
done (parity of the shared surface), and adding a keyword-only optional with a default would not
have touched the Iron Rule that no existing signature moves. The ledger comment now names them as
open scope pointing here; the two remaining entries (
get_callers/get_callees, which keepTypeScript's optional method argument) are genuinely benign and stay recorded as such.
CAVEATS
every existing TypeScript caller passes nothing today.
"TypeScript-local vs TypeScript-Neo4j", which is worse.
get_call_graph'sroots=/depth=on TypeScript must decide what a module caller means ata root (TS-11 keeps module callers where Python drops them); that is a design question, not a
mechanical port.
DEFINITION OF DONE
PythonAnalysis's exactly, on the facade and both backends.KNOWN_ARGUMENT_DIVERGENCESintests/analysis/typescript/test_typescript_public_surface.pyisdown to
get_callers/get_callees, deleted from rather than muted — the ledger's owntest_a_recorded_divergence_is_still_a_divergenceforces that.recorded the way the Python ones are in
docs/agent-api-reference.md.