Repository navigation
Description
Is your feature request related to a problem? Please describe.
neo4j/SchemaCatalog is at v1 1.0.0 with old node families (JCompilationUnit, JType is_* booleans, JCallable with code) and J_CALLS carrying type/weight/source_kind/destination_kind. It must project the full v2 CPG (L1 through L4).
Describe the solution you'd like
- Base v2 node families keyed by
can://id + the baseJ_relationships (above) — feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #198 / PR feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #201 -
SchemaCatalogmajor version bump;--emit schemareflects every family through L4 (2.0.0; L4 families declared) — feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #198 / PR feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #201 - L3 overlay families/relationships — feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #198 / PR feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #201
- L4 overlay families/relationships (
J_PARAM_*/J_SUMMARY) — remaining, after L4 (codeanalyzer-java: L4 SDG — param_in/out + semantic DDG #184) -
--emit neo4jruns at full implemented depth;-a/--graph-field-depthalongside--emit neo4jis an explicit non-zero error — feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #198 / PR feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #201
Describe alternatives you've considered
Not stated in the original issue.
Additional context
Status (updated 2026-08-28)
Base relabel (L1/L2) + L3 overlay landed via #198 (PR #201); only the L4 SDG overlay remains here. The projection was de-consolidated and shipped pre-L4: #198 projected the base v2 families and the L3 dataflow overlay (J_CFG_NEXT/J_CDG/J_DDG), bumped the graph catalog to 2.0.0 (with the L4 families declared but not projected), and performed the v2 default-output flip (--schema defaults to v2, released as 3.0.0). This issue now tracks only the remaining L4 SDG overlay (J_PARAM_*/J_SUMMARY projection), to land after L4 (#184).
Original consolidation plan (2026-08-24, superseded)
This issue originally covered all Neo4j v2 projection work as one consolidated pass sequenced after L4 lands (base + L3 + L4), to do the Cypher/schema mapping once against an L4-stable schema, with the default-output flip moving to post-L4. #198 revised that: base+L3 (and the flip) shipped before L4, so only the L4 overlay remains here — two catalog touches (2.0.0 now, an L4 bump later) rather than one.
Spec
https://github.com/codellm-devkit/codeanalyzer-java/blob/main/docs/design/specs/schema-v2-l3-l4-design.md (§11 Neo4j projection)
Scope — v2 Neo4j families/relationships (base + L3 landed via #198; L4 overlay remaining)
Reuse the existing GraphProjector/RowBuilder/GraphRows/CypherWriter/BoltWriter machinery; keep the dual-label JSymbol merge pattern and _module provenance.
- Base (L1/L2): node families
JApplication,JModule,JSymbol(+ specific type-kind label),JCallable,JField,JParameter;J_-prefixed relationships (D9)J_HAS_MODULE,J_DECLARES,J_HAS_CALLABLE,J_HAS_FIELD,J_RESOLVES_TO,J_CALLS(weight,prov),J_EXTENDS,J_IMPLEMENTS. - L3 overlay: body/CFG nodes (merge key
@line:col/@tag, propskind/start_line/end_line/_module) +J_HAS_BODY_NODE,J_CFG_NEXT(kind),J_CDG,J_DDG(var,prov). - L4 overlay:
formal_in/out+actual_in/outvertices +J_PARAM_IN,J_PARAM_OUT,J_SUMMARY.
Caveats and known risks
- Families rename = major graph-schema change; moves in lockstep with the JSON schema.
- Deferred-edge (no-dangling) discipline; unresolved-string fallback rides on the source node's props.
- Originally planned as one post-L4 schema bump; feat(neo4j)!: schema v2 graph projection; v2 becomes the default schema (3.0.0) #198 instead shipped base+L3 now (
2.0.0), leaving one further catalog bump for the L4 overlay.
Definition of done
--emit schemaproduces aschema.neo4j.jsonlisting every v2 node family the JSON emits, through L4.--emit neo4j(no URI) writes agraph.cypherthat loads clean against an empty Neo4j and is idempotent.- Cross-projection gate: Neo4j node/edge counts at full depth match the JSON at
max_level(modulo explicitHAS_*containment); no dangling relationships.
Activity
codeanalyzer-java→ canonical schema v2 + L3/L4 dataflow (analyzer + SDK) .github#42[-]codeanalyzer-java: Neo4j v2 base relabel[/-][+]codeanalyzer-java: Neo4j v2 projection — consolidated base relabel + L3/L4 overlays (after L4)[/+]docs(design): consolidate Neo4j projection into one post-L4 pass (#182)
feat(l3): intraprocedural dataflow (CFG/CDG/DDG) — AST engine (#195)
[-]codeanalyzer-java: Neo4j v2 projection — consolidated base relabel + L3/L4 overlays (after L4)[/-][+]codeanalyzer-java: Neo4j v2 projection — L4 SDG overlay (after L4; base+L3 landed via #198)[/+]