Problem
Three fields the Python Neo4j projection already carries on the graph never reach the model, because no reconstruct function reads them. Each surfaces as an empty value that is indistinguishable from "the analyzer found nothing".
| model field |
what the graph holds |
what the model gets |
PyModule.id / PyClass.id / PyCallable.id |
the can:// id, on every node |
"" |
PyAttribute.initializer |
:PyAttribute.initializer (e.g. 'default', 'name') |
None |
PyCallsite.arguments |
:PyBodyNode.arguments_json |
[] |
The id one is the most visible: it is the node's canonical address, it is present on every projected node — the teardown in test_python_neo4j_backend.py matches on it — and the in-memory backend populates it. So the same model, describing the same code, carries its address in process and an empty string over Neo4j.
How it was found
These were uncovered while fixing #360. The write-gated parity module had been skipped through every leg, so nothing compared the two backends field by field. Each of the three is now asserted in both halves by that module — the graph property is asserted present, and the model field is asserted empty — so closing any of them breaks the test loudly rather than silently passing.
Scope boundary
In scope: read the three properties in cldk/analysis/python/neo4j/reconstruct.py and drop the corresponding tolerance in the parity module.
Out of scope: the tolerances in that module whose cause is a genuine projection loss — source, imports and body are not projected at all, and those are asserted empty on purpose.
Goals
Caveats and known risks
arguments_json is a JSON string on the node; decoding it must tolerate a malformed or absent value without failing the whole reconstruction, and must not silently swallow a decode error into [] — that would recreate the ambiguity this issue is about.
- Check the TypeScript and Java projections for the same three gaps before assuming this is Python-only. The parity clause means a field recovered in one language should be recovered in all of them where the graph carries it.
Definition of done
- The three fields round-trip through the Neo4j backend with the same values the in-process backend gives, asserted by the parity module rather than by inspection.
Problem
Three fields the Python Neo4j projection already carries on the graph never reach the model, because no
reconstructfunction reads them. Each surfaces as an empty value that is indistinguishable from "the analyzer found nothing".PyModule.id/PyClass.id/PyCallable.idcan://id, on every node""PyAttribute.initializer:PyAttribute.initializer(e.g.'default','name')NonePyCallsite.arguments:PyBodyNode.arguments_json[]The
idone is the most visible: it is the node's canonical address, it is present on every projected node — the teardown intest_python_neo4j_backend.pymatches on it — and the in-memory backend populates it. So the same model, describing the same code, carries its address in process and an empty string over Neo4j.How it was found
These were uncovered while fixing #360. The write-gated parity module had been skipped through every leg, so nothing compared the two backends field by field. Each of the three is now asserted in both halves by that module — the graph property is asserted present, and the model field is asserted empty — so closing any of them breaks the test loudly rather than silently passing.
Scope boundary
In scope: read the three properties in
cldk/analysis/python/neo4j/reconstruct.pyand drop the corresponding tolerance in the parity module.Out of scope: the tolerances in that module whose cause is a genuine projection loss —
source,importsandbodyare not projected at all, and those are asserted empty on purpose.Goals
idis populated on the reconstructedPyModule,PyClassandPyCallable, and equals the in-memory backend's id for the same nodePyAttribute.initializeris read from the node propertyPyCallsite.argumentsis read fromarguments_jsontests/analysis/python/test_python_neo4j_backend.pyflip from "asserted empty" to exact parity, and the module docstring's tolerance list shrinks by three entriesCaveats and known risks
arguments_jsonis a JSON string on the node; decoding it must tolerate a malformed or absent value without failing the whole reconstruction, and must not silently swallow a decode error into[]— that would recreate the ambiguity this issue is about.Definition of done