You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Neo4j backends: enforce read-only access (driver/session mode), all languages #160
Is your feature request related to a problem? Please describe.
PROBLEM
The Neo4j backends are read-only in practice but not by construction. A sweep of cldk/ finds no MERGE, CREATE, execute_write, or write transaction anywhere — every backend goes through session.run(query, **params) and returns record.data(). But the driver is opened with GraphDatabase.driver(neo4j_uri, auth=...) (e.g. cldk/analysis/java/neo4j/neo4j_backend.py:113) and sessions are taken with self._driver.session(database=...), neither of which requests read access. Nothing stops a future write from silently succeeding against a production graph.
SCOPE BOUNDARY
Enforcement only. The original "separate ingestor" half of this issue is moot: there is no ingestion code in this SDK to separate out — graphs are populated outside it. This issue does not add an ingestor, and does not change any query.
GOALS
Open the driver with default_access_mode=READ_ACCESS (or take explicit read sessions) in all three backends: Java, Python, TypeScript.
A write attempted through a backend fails loudly rather than succeeding silently.
CAVEATS AND KNOWN RISKS
Read access mode routes to followers in a cluster; against a single instance the behaviour is unchanged, so this is cheap, but on a cluster it changes which server serves the query.
This is enforcement of an invariant that already holds. It should be a no-op for every existing test — if any test breaks, that test was writing through a read path and the breakage is the finding.
DEFINITION OF DONE
All three Neo4j backends request read access explicitly.
A test asserts that a write through a backend session raises rather than committing.
The existing backend test suites pass unchanged.
Re-scoped 2026-08-03: originally "read-only client + separate ingestor". The ingestor half was dropped after verification showed no write path exists in cldk/ at all — see the PROBLEM section for the evidence.
changed the title [-]Split Neo4j TS backend into read-only client + ingestor[/-][+]Neo4j TS backend: read-only client + separate ingestor[/+]on Jun 20, 2026
changed the title [-]Neo4j TS backend: read-only client + separate ingestor[/-][+]Neo4j backends: read-only client + separate ingestor (all languages)[/+]on Jun 20, 2026
changed the title [-]Neo4j backends: read-only client + separate ingestor (all languages)[/-][+]Neo4j backends: enforce read-only access (driver/session mode), all languages[/+]on Aug 3, 2026
Activity
[-]Split Neo4j TS backend into read-only client + ingestor[/-][+]Neo4j TS backend: read-only client + separate ingestor[/+][-]Neo4j TS backend: read-only client + separate ingestor[/-][+]Neo4j backends: read-only client + separate ingestor (all languages)[/+]Merge pull request #165 from codellm-devkit/minor/fix-160-161-162-163…
[-]Neo4j backends: read-only client + separate ingestor (all languages)[/-][+]Neo4j backends: enforce read-only access (driver/session mode), all languages[/+]