Skip to content

TypeScript parity: port the four bulk/projected accessors (callables overview, method bodies, decorated callables, callsites) from Python #298

Description

@rahlk

The TypeScript surface has none of the four bulk/projected accessors Python shipped in #180/#181, on either line (verified at v1.4.3 and release/2.0):

Python (template) TypeScript
get_callables_overview() -> List[PyCallableOverview] (backend.py:152, facade python_analysis.py:526) missing
get_method_bodies(signatures) -> Dict[str, str] (backend.py:157) missing
get_decorated_callables(markers) -> List[PyCallableOverview] (backend.py:162) missing
get_callsites_for(signatures) -> Dict[str, List[PyCallsite]] (backend.py:167) missing
PyCallableOverview (cldk/models/python/projections.py:32) no TS projection model

Scope (all four, one change)

  • TSCallableOverview projection model — the one real design decision: the field list. Open questions to settle before implementation (design-gate item, light pass since Bulk/projection accessors for the Python facade to avoid N+1 reconstruction on the Neo4j backend #180/feat(python): bulk/projected accessors for the Python facade (#180) #181 locked the shape): how TS-specific facets project (arrow/anonymous callable kinds, owning class vs interface, export visibility, decorators), and — same division of labor as Python — the overview excludes body/code text (get_method_bodies owns that).
  • Four @abstractmethods on TSAnalysisBackend, implemented on BOTH backends: TSCodeanalyzer (in-process over its existing _index() lookups) and TSNeo4jBackend (set-at-a-time, one Cypher round trip each — that is the point of the bulk surface).
  • Four thin facade delegates on TypeScriptAnalysis.
  • Dual-backend parity tests per accessor (template: the existing Python parity suite).

Version routing

Additive public API ⇒ minor bump: lands as 1.5.0 on the 1.x line (needs a maintenance branch cut from v1.4.3 — none exists yet), and must ALSO land on release/2.0 or 2.0.0 ships a parity regression against 1.5.

Follows the #180/#181 design; sibling of the Python bulk-accessor surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions