Part of #9. Phase 1 — level 1.
Learning goals
Trait objects and writer abstraction (TRPL Object-Oriented Programming Features — a
GraphWriter consumed by both a Cypher-snapshot and a Bolt writer is a textbook trait-object
case), cargo feature flags (neo4j feature gating the neo4rs driver so the default build
stays lean), string escaping discipline.
Task
A neo4j/ module mirroring the sibling analyzers' structure — a pure projection of the in-memory
IR, NOT an ingestion of analysis.json:
project.rs (IR → rows), rows.rs (RowBuilder: MERGE semantics, deferred edges kept only if
the target node materialized — the no-dangling rule), schema.rs (declarative labels/rel-types
- SCHEMA_VERSION, constraints DERIVED from labels),
cypher.rs (snapshot: constraints → scoped
wipe → batched UNWIND…MERGE), bolt.rs (incremental content-hash diff push, feature-gated).
- Labels:
RustApplication/RustModule/RustSymbol(merge)/RustStruct/RustEnum/RustTrait/ RustCallable/RustCallSite/RustExternal/...; rels RUST_DECLARES/RUST_HAS_METHOD/RUST_CALLS/ RUST_EXTENDS(supertraits+trait impls)/RUST_RESOLVES_TO/... — in lockstep with
SCHEMA_DECISIONS.md node kinds.
- CLI:
--emit neo4j (graph.cypher, or live push with --neo4j-uri), --emit schema
(static schema.json, no -i needed), --app-name.
Teacher's notes
- The conformance test IS the point: the projector may never emit a label/rel/property the
declarative schema doesn't declare — that test is what stops silent drift.
- Copy the shape from
codeanalyzer-clang/codeanalyzer_clang/neo4j/ (the freshest instantiation)
and translate the idiom to Rust.
Gate
- Conformance test green; snapshot renders with constraints + wipe + MERGE batches;
--emit schema output stable; deferred-edge rule proven by a test (edge to an unemitted
target is dropped, not dangling).
- Default
cargo build has NO neo4j driver dependency (feature-gate asserted in CI).
Part of #9. Phase 1 — level 1.
Learning goals
Trait objects and writer abstraction (TRPL Object-Oriented Programming Features — a
GraphWriterconsumed by both a Cypher-snapshot and a Bolt writer is a textbook trait-objectcase), cargo feature flags (
neo4jfeature gating theneo4rsdriver so the default buildstays lean), string escaping discipline.
Task
A
neo4j/module mirroring the sibling analyzers' structure — a pure projection of the in-memoryIR, NOT an ingestion of analysis.json:
project.rs(IR → rows),rows.rs(RowBuilder: MERGE semantics, deferred edges kept only ifthe target node materialized — the no-dangling rule),
schema.rs(declarative labels/rel-typescypher.rs(snapshot: constraints → scopedwipe → batched UNWIND…MERGE),
bolt.rs(incremental content-hash diff push, feature-gated).RustApplication/RustModule/RustSymbol(merge)/RustStruct/RustEnum/RustTrait/ RustCallable/RustCallSite/RustExternal/...; relsRUST_DECLARES/RUST_HAS_METHOD/RUST_CALLS/ RUST_EXTENDS(supertraits+trait impls)/RUST_RESOLVES_TO/...— in lockstep withSCHEMA_DECISIONS.md node kinds.
--emit neo4j(graph.cypher, or live push with--neo4j-uri),--emit schema(static schema.json, no
-ineeded),--app-name.Teacher's notes
declarative schema doesn't declare — that test is what stops silent drift.
codeanalyzer-clang/codeanalyzer_clang/neo4j/(the freshest instantiation)and translate the idiom to Rust.
Gate
--emit schemaoutput stable; deferred-edge rule proven by a test (edge to an unemittedtarget is dropped, not dangling).
cargo buildhas NO neo4j driver dependency (feature-gate asserted in CI).