Repository navigation
Feature/neo4j all tools - #2806
Closed
haiderRizvii wants to merge 2 commits into
Closed
haiderRizvii wants to merge 2 commits into
haiderRizvii wants to merge 2 commits into
Conversation
* feat: add Neo4j as a graph backend
index_repository accepts graph_db (http://host:7474), graph_user,
graph_password and graph_database (CLI: --graph-db ...), with
NEO4J_USER / NEO4J_PASSWORD / NEO4J_DATABASE as fallbacks.
- src/neo4j: HTTP client for Neo4j's transactional endpoint (WinHTTP
for https on Windows), config + in-process credential cache, sync of a
published project database into Neo4j as an atomic generation swap,
and a remote store that answers the graph read primitives.
- The pipeline mirrors every publish (full, incremental, no-op) into
Neo4j; a <project>.db.graph.json marker (no password) keeps later
re-indexes syncing to the same target. An unchanged re-run re-uploads
when Neo4j no longer holds the published generation.
- store: a remote-ops seam routes node/edge lookups, degrees, counts and
every BFS to Neo4j; reads fall back to the identical local copy when
Neo4j is unreachable or holds another generation.
- query_graph native:true runs read-only Cypher in Neo4j; index_status
reports graph_backend; delete_project drops the Neo4j graph.
- The index supervisor passes the password to the worker through its
environment, never on its command line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(java): never resolve a call onto a Field
Java has no callable fields: `lock.lock()` invokes ReentrantLock.lock,
not the `lock` field, but the unique_name strategy bound it to the
field. cbm_call_onto_field_policy now drops every Java call that lands
on a Field (sequential and parallel resolvers share the policy).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(docker): cbm-graph image to build code graphs into Neo4j
docker/graph builds the binary in a container and indexes a mounted
repository (read-only) into Neo4j. cbm-graph.cmd / cbm-graph.ps1 wrap it
on Windows; an extra .cbmignore (e.g. a fleet-wide one) is merged in and
re-runs are incremental through a named cache volume.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build: make the fork installable from its own releases
- install.sh / install.ps1 / scripts/setup* download from
haiderRizvii/codebase-memory-mcp; `update` re-runs the installer
shipped beside the binary, so it updates from the fork too.
- fork-release.yml: build all eight targets (VirusTotal optional),
smoke-test, publish a full "latest" release with checksums.txt.
- release.yml stops at preflight outside the upstream repository; it
publishes through upstream's VirusTotal/npm/PyPI/MCP Registry accounts.
- UI issue link points at the fork; URL allowlists updated.
- README: fork notice, install commands, Neo4j backend section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: satisfy the security and no-skips gates for the Neo4j backend
- security-network-source-audit.py: new configured-tcp transport, pinned
to src/neo4j/neo4j_http.c and to a getaddrinfo() walk over the parsed
graph_db host with a stream-socket hint; self-tests cover the accepted
shape and reject other files, other hosts, datagram sockets and
addresses outside the resolved list.
- security-allowlist.txt: the two configured-tcp calls and the
graph-backend marker write.
- mcp.c: describe graph_db without a literal example URL.
- test_neo4j.c: register the live test only when a server is configured
instead of SKIP(), which the no-skips policy forbids.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(neo4j): narrow a variable's scope (cppcheck variableScope)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(neo4j): reject malformed responses; make fallback visible
Review follow-up (Copilot):
- A 2xx body is accepted only when "results" holds exactly one entry per
statement, each with columns/data arrays and rows matching the
columns (cbm_neo4j_result_shape_error). A malformed reply used to read
as "no rows": an empty graph to readers, and generation 0 to the sync,
whose stale-generation cleanup could then delete the live graph. The
sync additionally requires exactly one integer generation row.
- A Neo4j-backed project answered from the local index now says so in
every tool reply: a content notice plus structuredContent.graph_backend
{status: sqlite_fallback, reason}. (The local index is the newest
generation; the fallback is current, Neo4j is not.)
- A failed background sync is recorded as last_sync_error in the
project's marker, keeping the last good synced_generation;
index_status reports local_generation, in_sync and last_sync_error.
- clang-format 20 over the Neo4j sources and the store routing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Route the remaining store reads through the remote backend: structured search_graph (local regex/LIKE predicates applied to remote candidates), QN-suffix and overload lookups, caller/callee names, file listing and get_graph_schema (new prop_keys; sync_format 2 forces a one-time resync). Every tool reply now names its source (neo4j, neo4j+local, or sqlite_fallback) and logs a graph.backend line; reads that still need the local copy (BM25/semantic search, architecture aggregates, impact walk, file outlines) are marked as local. Also: renamed .db files still find their Neo4j marker; the project's remembered login is tried before NEO4J_PASSWORD; a rejected login is not retried for 60 s (avoids Neo4j's lockout); debug log per Cypher round trip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Checklist
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)