Skip to content

typescript/neo4j: adopt TS-prefixed labels and TS_ rel types; lockstep the analyzer pin #268

Description

@rahlk

PROBLEM

cldk/analysis/typescript/neo4j/neo4j_backend.py matches the TypeScript analyzer's bare Neo4j labels and relationship types (:Application, :Module, :Symbol, :Callable, CALLS, HAS_CALLSITE, …) in ~20 Cypher queries, and pyproject.toml pins codeanalyzer-typescript==0.4.3. The analyzer is namespacing its graph in two stages (see the epic); the SDK must track both without breaking its public API.

SCOPE BOUNDARY

Internal query layer + version pin only — every public accessor keeps its name and return type. The Python analyzer's Py* backend is untouched.

GOALS

  1. Stage 1 (analyzer graph schema 1.1.0, dual labels): adopt the TS* twin labels in queries (forward-compatible with stage 2; bare labels still work, so this can ride any regular release). Bump the pin to the 1.1.0-emitting analyzer release.
  2. Stage 2 (graph schema 2.0.0): switch relationship types to TS_*, drop any remaining bare-label matches, and follow the v2 merge-key change (Symbol{signature}CanNode{id}) per the v2 contract. Bump the pin ONLY once the analyzer 2.0.0 release is out (lockstep rule).
  3. Read schema_version off :Application/:TSApplication and fail fast with a clear producer/consumer-mismatch error instead of silently returning empty results.

CAVEATS AND KNOWN RISKS

  • The stage-2 query rewrite lands together with the v2 model remap; coordinate with that work rather than shipping label changes alone against a v1 database.
  • Tests that spin fixtures against a live Neo4j must load graphs produced by the matching analyzer version — mismatched fixtures produce empty-result false greens; the fail-fast version check in goal 3 is the guard.

DEFINITION OF DONE

  • TS Neo4j backend tests green against a graph emitted by the pinned analyzer at each stage.
  • Public API surface diff is empty (stage 1) / documented in the major-release notes (stage 2).
  • Pin moves only after the corresponding analyzer release exists on PyPI.

Part of codellm-devkit/codeanalyzer-typescript#64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions