Skip to content

fix(sdg): param_in/param_out carry the bound formal's var in JSON and on J_PARAM_IN/OUT - #250

Merged
rahlk merged 1 commit into
mainfrom
fix/issue-249-param-edge-var
Sep 9, 2026
Merged

rahlk merged 1 commit into
mainfrom
fix/issue-249-param-edge-var

Conversation

@rahlk

@rahlk rahlk commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #249. Same defect and same direction as codeanalyzer-python#195 / codeanalyzer-python#196.

The catalog declared var on J_PARAM_IN and J_PARAM_OUT and V2GraphProjector emitted both with RowBuilder.props() — no properties at all — so a Cypher predicate on r.var went three-valued across every call boundary and silently excluded the path. The variable was already known where the edges are built: SdgVertices.addActualsAndEdges binds each actual_in:i to a named callee formal and each actual_out to the callee's @formal_out. JIdEdge just had nowhere to carry it.

JIdEdge.var now holds it — the bound parameter's name on param_in, $ret on param_out — and the projector writes it on every edge. summary edges share JIdEdge and keep the bare shape; Gson runs without serializeNulls, so an unset var is omitted rather than written as null.

Tests: V2Neo4jSchemaConformanceTest.paramEdgesCarryEveryDeclaredProperty asserts every emitted edge of both types carries every declared property — on all of them, not some, because a partially present property is the same trap one step along. SdgVerticesTest pins the two values (y and $ret) on the dataflow-test fixture.

Gates: ./gradlew test — 562 of 563 pass. The one failure is CodeAnalyzerIntegrationTest :: initializationError, Testcontainers not finding a Docker environment on this machine; it fails identically on origin/main without this change.

… on J_PARAM_IN/OUT

The catalog declared `var` on J_PARAM_IN and J_PARAM_OUT and the projector
emitted both with no properties, so a Cypher predicate on `r.var` went
three-valued across every call boundary and silently dropped the path. The
variable was already known where the edges are built — each actual binds a
named callee formal — but JIdEdge had nowhere to carry it.

JIdEdge.var now holds it: the bound parameter's name on param_in, `$ret` on
param_out. Summary edges keep the bare shape (Gson omits an unset var
rather than writing null). The conformance test now asserts every emitted
edge of both types carries every declared property, on all of them rather
than some — a partially present property is the same trap one step along.

Same defect and same direction as codeanalyzer-python#195.

Closes #249
@rahlk
rahlk merged commit 6536737 into main Sep 9, 2026
@rahlk
rahlk deleted the fix/issue-249-param-edge-var branch September 9, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

J_PARAM_IN/J_PARAM_OUT declare a var property the projection never writes

1 participant