Skip to content

neo4j(v2): drop bare labels + rename rel types to TS_* in the CanNode contract (graph schema 2.0.0) #66

Description

@rahlk

PROBLEM

After stage 1 (dual labels, graph schema 1.1.0), the graph still carries the bare specific labels and unprefixed relationship types. The breaking completion must land exactly once, inside the in-flight v2/CanNode contract (the fix/issue-46-bolt-symbol-labels line), so consumers absorb a single 2.0.0 instead of two consecutive majors.

SCOPE BOUNDARY

This is a change to the v2 contract line, not main's v1 emitter. CanNode stays unprefixed by design: it merges on can:// ids, which embed the language, so cross-language collision is impossible at the merge layer — do not prefix it. analysis.json untouched.

GOALS

  1. Drop the bare specific labels: nodes carry only the TS* twin (plus CanNode).
  2. Rename every relationship type to TS_* (TS_HAS_MODULE, TS_DECLARES, TS_HAS_METHOD, TS_HAS_FIELD, TS_HAS_BODY_NODE, TS_RESOLVES_TO, TS_CALLS, TS_CFG_NEXT, TS_CDG, TS_DDG, TS_SUMMARY, TS_PARAM_IN, TS_PARAM_OUT, TS_EXTENDS, TS_IMPLEMENTS).
  3. SCHEMA_VERSION2.0.0; conformance test asserts no undeclared (and no bare) label or rel type is emitted.
  4. Regenerate schema.neo4j.json; release notes flag the breaking rename with the one-line migration (re-analyze; update queries Callable→TSCallable, CALLS→TS_CALLS).

CAVEATS AND KNOWN RISKS

  • The v2 line also changes the merge key (Symbol{signature}CanNode{id}); sequencing inside that branch matters — land the prefix after the CanNode merge-label switch so the conformance test churns once.
  • python-sdk's TS Neo4j backend breaks on this release by design; the SDK child must merge and release before the pin moves (lockstep rule in the epic).

DEFINITION OF DONE

  • On the fixture app: zero nodes match any bare specific label; zero rels match any unprefixed type; CanNode count unchanged from pre-change v2 output.
  • Conformance test green; schema_version = "2.0.0" stamped.

Absorbs #9 and #10.

Part of #64

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