Consolidation (updated 2026-08-24)
This issue now covers all Neo4j v2 projection work as one consolidated pass, sequenced after L4 lands — the base relabel (L1/L2) plus the L3 dataflow overlay (J_CFG_NEXT/J_CDG/J_DDG) and the L4 SDG overlay (J_PARAM_*/J_SUMMARY). Rationale: do the Cypher/schema mapping once, against a JSON schema fully stabilized through L4, rather than reworking the projection at each level. The L3 (#183) and L4 (#184) issues therefore no longer carry a Neo4j overlay. Epic consequence: the v2 default-output flip (gated on the Neo4j projection) moves to post-L4; the analyzer major can still be cut on the JSON levels beforehand.
Spec
https://github.com/codellm-devkit/codeanalyzer-java/blob/main/docs/design/specs/schema-v2-l3-l4-design.md (§11 Neo4j projection)
Problem
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).
Scope — all v2 Neo4j families/relationships, in one pass after L4
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, props kind/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/out vertices + J_PARAM_IN, J_PARAM_OUT, J_SUMMARY.
Goals
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.
- Doing this after L4 means one schema bump, not three — at the cost of no Neo4j output until then.
Definition of done
--emit schema produces a schema.neo4j.json listing every v2 node family the JSON emits, through L4.
--emit neo4j (no URI) writes a graph.cypher that 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 explicit HAS_* containment); no dangling relationships.
Consolidation (updated 2026-08-24)
This issue now covers all Neo4j v2 projection work as one consolidated pass, sequenced after L4 lands — the base relabel (L1/L2) plus the L3 dataflow overlay (
J_CFG_NEXT/J_CDG/J_DDG) and the L4 SDG overlay (J_PARAM_*/J_SUMMARY). Rationale: do the Cypher/schema mapping once, against a JSON schema fully stabilized through L4, rather than reworking the projection at each level. The L3 (#183) and L4 (#184) issues therefore no longer carry a Neo4j overlay. Epic consequence: the v2 default-output flip (gated on the Neo4j projection) moves to post-L4; the analyzer major can still be cut on the JSON levels beforehand.Spec
https://github.com/codellm-devkit/codeanalyzer-java/blob/main/docs/design/specs/schema-v2-l3-l4-design.md (§11 Neo4j projection)
Problem
neo4j/SchemaCatalogis at v11.0.0with old node families (JCompilationUnit,JTypeis_*booleans,JCallablewithcode) andJ_CALLScarryingtype/weight/source_kind/destination_kind. It must project the full v2 CPG (L1 through L4).Scope — all v2 Neo4j families/relationships, in one pass after L4
Reuse the existing
GraphProjector/RowBuilder/GraphRows/CypherWriter/BoltWritermachinery; keep the dual-labelJSymbolmerge pattern and_moduleprovenance.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.@line:col/@tag, propskind/start_line/end_line/_module) +J_HAS_BODY_NODE,J_CFG_NEXT(kind),J_CDG,J_DDG(var,prov).formal_in/out+actual_in/outvertices +J_PARAM_IN,J_PARAM_OUT,J_SUMMARY.Goals
can://id + the baseJ_relationships (above)SchemaCatalogmajor version bump;--emit schemareflects every family through L4--emit neo4jruns at full implemented depth;-a/--graph-field-depthalongside--emit neo4jis an explicit non-zero errorCaveats and known risks
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.max_level(modulo explicitHAS_*containment); no dangling relationships.